计量中心项目
This commit is contained in:
16
jlzx-single/yxt-single-attend/pom.xml
Normal file
16
jlzx-single/yxt-single-attend/pom.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<artifactId>yxt-single-attend</artifactId>
|
||||
<groupId>com.yxt.attend</groupId>
|
||||
<version>0.0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>yxt-single-attend-api</module>
|
||||
<module>yxt-single-attend-biz</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
72
jlzx-single/yxt-single-attend/yxt-single-attend-api/pom.xml
Normal file
72
jlzx-single/yxt-single-attend/yxt-single-attend-api/pom.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-parent</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.yxt.attend</groupId>
|
||||
<artifactId>yxt-single-attend-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-core</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-oa-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-base</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-annotations</artifactId>
|
||||
<version>2.0.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/7/31 21:38
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-App2Attend",
|
||||
name = "yxt-attend",
|
||||
path = "v2/appattends",
|
||||
fallback = App2AttendApiFallback.class)
|
||||
public interface App2AttendApi {
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/normalRecord")
|
||||
@ApiOperation(value = "首页打卡扫码")
|
||||
public ResultBean normalRecord(@RequestBody AppAttendTwoQuery appAttendTwoQuery);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/7/31 21:38
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class App2AttendApiFallback {
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import com.yxt.attend.api.attendance.Attendance;
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/8/3 10:07
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class App2AttendQuery implements Query {
|
||||
private static final long serialVersionUID = 8173853859208332747L;
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String dwSid;
|
||||
@ApiModelProperty(value = "用户sid")
|
||||
private String userSid;
|
||||
@ApiModelProperty(value = "年")
|
||||
private String year;
|
||||
@ApiModelProperty(value = "月")
|
||||
private String month;
|
||||
private String date;
|
||||
private int qdlx;
|
||||
private Attendance attendance;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 10:57
|
||||
* @description app考勤
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AppAttend",
|
||||
name = "yxt-attend",
|
||||
path = "v1/appattends",
|
||||
fallback = AppAttendApiFallback.class)
|
||||
public interface AppAttendApi {
|
||||
|
||||
/**
|
||||
* 待审批申请单数量
|
||||
*
|
||||
* @param usersid 用户sid
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/getDbAttendErrandCount/{usersid}")
|
||||
@ApiOperation(value = "待审批申请单数量")
|
||||
public ResultBean getDbAttendErrandCount(@ApiParam(value = "用户sid", required = true) @PathVariable("usersid") String usersid);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/getYbAttendErrandCount/{usersid}")
|
||||
@ApiOperation(value = "待审批申请单数量")
|
||||
public ResultBean getYbAttendErrandCount(@ApiParam(value = "用户sid", required = true) @PathVariable("usersid") String usersid);
|
||||
|
||||
|
||||
/**
|
||||
* 获取考勤设置信息
|
||||
*
|
||||
* @param dwsid 单位sid
|
||||
* @param usersid 用户sid
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/getAttendanceInfo/{dwsid}/{usersid}")
|
||||
@ApiOperation(value = "获取考勤设置信息")
|
||||
public ResultBean<Map<String, Object>> getAttendanceInfo(@ApiParam(value = "单位sid", required = true) @PathVariable("dwsid") String dwsid,
|
||||
@ApiParam(value = "用户sid", required = true) @PathVariable("usersid") String usersid);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/getKqjwd")
|
||||
@ApiOperation(value = "获取考勤二维码的经纬度")
|
||||
public ResultBean getKqjwd(@RequestBody AppAttendQuery appAttendQuery);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/getSignBtnState")
|
||||
@ApiOperation(value = "查看上午、下午按钮签到状态")
|
||||
public ResultBean getSignBtnState(@RequestBody AppAttendOnQuery appAttendOnQuery);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/getSbBySbsidAndWbdwsid")
|
||||
@ApiOperation(value = "传递用户所选经纬度")
|
||||
public ResultBean getSbBySbsidAndWbdwsid(@RequestBody AppAttendTwoQuery appAttendTwoQuery);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/appPunch")
|
||||
@ApiOperation(value = "app首页扫码打卡")
|
||||
public ResultBean appPunch(@RequestBody AppAttendTwoQuery appAttendTwoQuery);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/delCurAttendance/{qdxxendsid}")
|
||||
@ApiOperation(value = "删除当次签到")
|
||||
public ResultBean delCurAttendance(@ApiParam(value = "sid", required = true) @PathVariable("qdxxendsid") String qdxxendsid);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/getAttendErrandCount/{dwSid}/{userSid}")
|
||||
@ApiOperation(value = "获取申请数量")
|
||||
public ResultBean getAttendErrandCount(@ApiParam(value = "单位sid", required = true) @PathVariable("dwSid") String dwSid, @ApiParam(value = "用户sid", required = true) @PathVariable("userSid") String userSid);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/getAttendErrandInfo")
|
||||
@ApiOperation(value = " 获取单位除自己外的所有人员(可申请的审批人列表)")
|
||||
public ResultBean getAttendErrandInfo(@RequestBody AppAttendThreeQuery appAttendThreeQuery);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/attendErrandList")
|
||||
@ApiOperation(value = "获取待审批的人员列表")
|
||||
public ResultBean attendErrandList(@RequestBody AppAttendFourQuery appAttendFourQuery);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/showAttendErrand/{sid}")
|
||||
@ApiOperation(value = "获取申请单详情")
|
||||
public ResultBean showAttendErrand(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/approveAttendErrand/{sid}/{type}")
|
||||
@ApiOperation(value = "审批差旅、外勤、休假")
|
||||
public ResultBean approveAttendErrand(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid, @ApiParam(value = "type", required = true) @PathVariable("type") String state);
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("/cancelAttendErrand/{sid}")
|
||||
@ApiOperation(value = " 撤销申请")
|
||||
public ResultBean cancelAttendErrand(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid, @RequestBody AppAttendTwoQuery appAttendTwoQuery);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 10:58
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class AppAttendApiFallback {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/27 14:40
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AppAttendFourQuery implements Query {
|
||||
|
||||
private String type;
|
||||
private String usersid;
|
||||
private String month;
|
||||
@ApiModelProperty(value = "1:审批人列表,2待审批人列表")
|
||||
private String lx;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/24 16:14
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AppAttendOnQuery implements Query {
|
||||
|
||||
private String usersid;
|
||||
|
||||
private String dwsid;
|
||||
@ApiModelProperty(value = "签到次数")
|
||||
private String qdfs;
|
||||
@ApiModelProperty(value = "上午、下午、加班")
|
||||
private String btn;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 15:51
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AppAttendQuery implements Query {
|
||||
|
||||
private String type;
|
||||
private String usersid;
|
||||
private String dwsid;
|
||||
private String bmid;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/27 9:50
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AppAttendThreeQuery implements Query {
|
||||
|
||||
private String usersid;
|
||||
private String dwsid;
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yxt.attend.api.appattend;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/24 16:41
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AppAttendTwoQuery implements Query {
|
||||
|
||||
@ApiModelProperty(value = "设备sid")
|
||||
private String sbsid;
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String dwsid;
|
||||
@ApiModelProperty(value = "地理位置")
|
||||
private String dlwz;
|
||||
@ApiModelProperty(value = "用户sid")
|
||||
private String usersid;
|
||||
private String name;
|
||||
@ApiModelProperty(value = "打卡次数类型:v2扫码接口不需要传这个值")
|
||||
private String qdlx;
|
||||
@ApiModelProperty(value = "经纬度")
|
||||
private String jwd;
|
||||
|
||||
private String xuhao;
|
||||
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/18 13:50
|
||||
* @description 考勤签到表(日考勤)
|
||||
*/
|
||||
@Data
|
||||
public class Attendance extends BaseEntity {
|
||||
private static final long serialVersionUID = 3630444632560623291L;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String xm;
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String dwmc;
|
||||
/**
|
||||
* 单位类别
|
||||
*/
|
||||
private String dwlb;
|
||||
/**
|
||||
* 用户sid
|
||||
*/
|
||||
private String userSid;
|
||||
/**
|
||||
* 年
|
||||
*/
|
||||
private String year;
|
||||
/**
|
||||
* 月
|
||||
*/
|
||||
private String month;
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
private String day;
|
||||
/**
|
||||
* 类型:0、正常1、外勤2、差旅3、休假4、离职5、入职
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 打卡类型:1:2次,2:4次
|
||||
*/
|
||||
private Integer signType;
|
||||
/**
|
||||
* 打卡时间
|
||||
*/
|
||||
private String signTime;
|
||||
/**
|
||||
* 打卡地点
|
||||
*/
|
||||
private String signDlwz;
|
||||
/**
|
||||
* 打卡去向:1、单位2、外勤3、差旅4、休假5、离职6、入职
|
||||
*/
|
||||
private Integer signDest;
|
||||
/**
|
||||
* 打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休9、离职10、入职
|
||||
*/
|
||||
private Integer signState;
|
||||
/**
|
||||
* 打卡次数类型:1、上午签到,2、上午签退,3、下午签到,4、下午签退5、加班签到6、加班签退
|
||||
*/
|
||||
private Integer signNumType;
|
||||
/**
|
||||
* 地理位置经纬度
|
||||
*/
|
||||
private String dlxx;
|
||||
/**
|
||||
* 版本:查询考勤信息
|
||||
*/
|
||||
private Integer version;
|
||||
/**
|
||||
* 1、自动默认2、手动签卡
|
||||
*/
|
||||
private String isAuto;
|
||||
/**
|
||||
* 部门路径
|
||||
*/
|
||||
private String deptPath;
|
||||
/**
|
||||
* 加班有无结束打卡:0、未结束1、结束
|
||||
*/
|
||||
private Integer ovTimeIsEnd;
|
||||
/**
|
||||
* 当次加班时长
|
||||
*/
|
||||
private Double ovTimeThis;
|
||||
/**
|
||||
* 当日加班总时长
|
||||
*/
|
||||
private Double ovTimeSum;
|
||||
/**
|
||||
* 申请单目的地
|
||||
*/
|
||||
private String signDestDlwz;
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.attend.api.attendance.parameter.ParameterQuery;
|
||||
import com.yxt.attend.api.attendance.parameter.ParameterQuery2;
|
||||
import com.yxt.attend.api.attendance.parameter.ParameterQuery4;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrand;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandQuery;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandVo;
|
||||
import com.yxt.attend.api.attendstatistics.AttendStatisticsVo;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:24
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-Attendance",
|
||||
name = "yxt-attend",
|
||||
path = "v1/attendances",
|
||||
fallback = AttendanceApiFallback.class)
|
||||
public interface AttendanceApi {
|
||||
|
||||
public ResultBean selectList();
|
||||
|
||||
@PostMapping(value = "/selectOvTime/{dwSid}/{day}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "检查传入年月后有无签卡方式的设置")
|
||||
public ResultBean<List<Attendance>> selectOvTime(@ApiParam(value = "单位sid", required = true) @PathVariable("dwSid") String dwSid,
|
||||
@ApiParam(value = "day", required = true) @PathVariable("day") String day);
|
||||
|
||||
@PostMapping(value = "/updateBySidOne/{sid}/{ovTimeIsEnd}")
|
||||
@ResponseBody
|
||||
public ResultBean updateBySidOne(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid,
|
||||
@ApiParam(value = "ovTimeIsEnd", required = true) @PathVariable("ovTimeIsEnd") Integer ovTimeIsEnd);
|
||||
|
||||
|
||||
@PostMapping(value = "/index")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "日考勤页面初始化")
|
||||
public ResultBean<Map<String, Object>> index();
|
||||
|
||||
|
||||
@PostMapping(value = "/userList/{year}/{month}/{userSid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "打卡数据")
|
||||
ResultBean<List<AttendanceVo2>> userList(@ApiParam(value = "year", required = true) @PathVariable("year") String year,
|
||||
@ApiParam(value = "month", required = true) @PathVariable("month") String month,@ApiParam(value = "userSid", required = true) @PathVariable("userSid") String userSid);
|
||||
|
||||
|
||||
/**获取考勤信息
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/list")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "获取日考勤列表")
|
||||
ResultBean<PagerVo<AttendanceListOneVo>> list(@Valid @RequestBody PagerQuery<AttendanceQuery> pagerQuery);
|
||||
|
||||
|
||||
|
||||
@PostMapping(value = "/selectOverTime")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "单日加班详情-和app共用")
|
||||
ResultBean<Map<String, Object>> selectOverTime(@Valid @RequestBody ParameterQuery q);
|
||||
|
||||
|
||||
@PostMapping(value = "/overTimeList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "加班详情签退列表")
|
||||
ResultBean<List<Attendance>> overTimeList(@Valid @RequestBody ParameterQuery q);
|
||||
|
||||
/**
|
||||
* 申请单记录页面
|
||||
* @param request
|
||||
*/
|
||||
@PostMapping(value = "/errandRecord")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "申请单记录页面")
|
||||
ResultBean<Map<String, Object>> errandRecord();
|
||||
|
||||
|
||||
/**
|
||||
* 查询差旅、外勤、休假申请
|
||||
* @param request
|
||||
*/
|
||||
@PostMapping(value = "/errandList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询差旅、外勤、休假申请")
|
||||
ResultBean<PagerVo<AttendErrandVo>> errandList(@Valid @RequestBody PagerQuery<AttendErrandQuery> pagerQuery);
|
||||
|
||||
|
||||
/**
|
||||
* 申请单详情
|
||||
* @param request
|
||||
*/
|
||||
@PostMapping(value = "/errendDetail")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "申请单详情")
|
||||
ResultBean<AttendErrandVo> errendDetail(@Valid @RequestBody ParameterQuery2 q);
|
||||
|
||||
/**
|
||||
* 申请单详情
|
||||
* @param request
|
||||
*/
|
||||
@PostMapping(value = "/appErrendDetail")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "app申请单详情")
|
||||
ResultBean<AttendErrandVo> appErrendDetail(@Valid @RequestBody ParameterQuery2 q);
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param request
|
||||
*/
|
||||
@PostMapping(value = "/appShow")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "详情")
|
||||
ResultBean<Map<String, Object>> appShow();
|
||||
|
||||
|
||||
@PostMapping(value = "/appAttendanceDetail")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "手机端正常打卡详情页")
|
||||
ResultBean<Attendance> appAttendanceDetail(@Valid @RequestBody ParameterQuery q);
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param request
|
||||
*/
|
||||
@PostMapping(value = "/show")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "详情")
|
||||
ResultBean<Map<String, Object>> show(@Valid @RequestBody AttendanceOneQuery q);
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param request
|
||||
*/
|
||||
@PostMapping(value = "/getDayCount")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "获取当月考勤记录")
|
||||
ResultBean<List<AttendStatisticsVo>> getDayCount(@Valid @RequestBody ParameterQuery4 p);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.yxt.attend.api.attendance.parameter.ParameterQuery;
|
||||
import com.yxt.attend.api.attendance.parameter.ParameterQuery2;
|
||||
import com.yxt.attend.api.attendance.parameter.ParameterQuery4;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrand;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandQuery;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandVo;
|
||||
import com.yxt.attend.api.attendstatistics.AttendStatisticsVo;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:25
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class AttendanceApiFallback implements AttendanceApi{
|
||||
|
||||
@Override
|
||||
public ResultBean selectList() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<Attendance>> selectOvTime(String dwSid, String day) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean updateBySidOne(String sid, Integer ovTimeIsEnd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> index() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<AttendanceListOneVo>> list(@Valid PagerQuery<AttendanceQuery> pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> selectOverTime(@Valid ParameterQuery q) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<Attendance>> overTimeList(@Valid ParameterQuery q) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> errandRecord() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<AttendErrandVo>> errandList(@Valid PagerQuery<AttendErrandQuery> pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<AttendErrandVo> errendDetail(@Valid ParameterQuery2 q) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<AttendErrandVo> appErrendDetail(@Valid ParameterQuery2 q) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> appShow() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Attendance> appAttendanceDetail(@Valid ParameterQuery q) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> show(@Valid AttendanceOneQuery q) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<AttendanceVo2>> userList(String year, String month, String userSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<AttendStatisticsVo>> getDayCount(@Valid ParameterQuery4 p) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/25 17:10
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceListOneVo implements Vo {
|
||||
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String staffSid;
|
||||
|
||||
private String usid;
|
||||
|
||||
private String name;
|
||||
private String deptName;
|
||||
private String signTime1;
|
||||
private String signDlwz1;
|
||||
private String signDest1;
|
||||
|
||||
private String signState1;
|
||||
private String day1;
|
||||
private String signDestDlwz1;
|
||||
|
||||
private String signTime4;
|
||||
|
||||
private String signDlwz4;
|
||||
private String signDest4;
|
||||
|
||||
private String signState4;
|
||||
private String day4;
|
||||
private String signDestDlwz4;
|
||||
private String adDeptPath;
|
||||
|
||||
|
||||
private String signTime2;
|
||||
private String signDlwz2;
|
||||
private String signDest2;
|
||||
private String signState2;
|
||||
private String day2;
|
||||
private String signDestDlwz2;
|
||||
|
||||
private String signTime3;
|
||||
private String signDlwz3;
|
||||
private String signDest3;
|
||||
private String signState3;
|
||||
private String day3;
|
||||
private String signDestDlwz3;
|
||||
private String OTNum;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private String errendType;
|
||||
private String aeVacationType;
|
||||
private String errendDlwz;
|
||||
private String ovTimeSum;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/25 17:20
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceListQuery implements Query {
|
||||
|
||||
|
||||
@ApiModelProperty("部门")
|
||||
private String dept;
|
||||
|
||||
@ApiModelProperty("人员姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("考勤日期")
|
||||
private String date;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/25 17:10
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceListVo implements Vo {
|
||||
|
||||
|
||||
@ApiModelProperty("单位sid")
|
||||
private String dwSid;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("所在部门")
|
||||
private String deptPath;
|
||||
|
||||
@ApiModelProperty("出勤天数")
|
||||
private int attendanceDay;
|
||||
|
||||
@ApiModelProperty("加班天数")
|
||||
private int overtimeDay;
|
||||
|
||||
@ApiModelProperty("差旅天数")
|
||||
private int tripDay;
|
||||
|
||||
@ApiModelProperty("休假天数 ")
|
||||
private int vacationDay;
|
||||
|
||||
@ApiModelProperty("缺勤天数")
|
||||
private int absenceDay;
|
||||
|
||||
@ApiModelProperty("打卡应签次数")
|
||||
private int supposedNum;
|
||||
|
||||
@ApiModelProperty("打卡正常次数")
|
||||
private int normalNum;
|
||||
|
||||
@ApiModelProperty("加班次数")
|
||||
private int ovTimeNum;
|
||||
|
||||
@ApiModelProperty("迟到次数")
|
||||
private int lateNum;
|
||||
|
||||
@ApiModelProperty("早退次数")
|
||||
private int earlyNum;
|
||||
|
||||
@ApiModelProperty("漏签次数")
|
||||
private int missNum;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("年")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty("月")
|
||||
private String month;
|
||||
|
||||
@ApiModelProperty("全月天数")
|
||||
private Double allDay;
|
||||
|
||||
@ApiModelProperty("全勤天数")
|
||||
private Double allAttendanceDay;
|
||||
|
||||
|
||||
@ApiModelProperty("差旅次数")
|
||||
private Integer tripNum;
|
||||
|
||||
@ApiModelProperty("外出次数")
|
||||
private Integer outNum;
|
||||
|
||||
|
||||
@ApiModelProperty("休假次数")
|
||||
private Integer vacationNum;
|
||||
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:40
|
||||
* @description 日考勤查询条件
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceOneQuery implements Query {
|
||||
@ApiModelProperty(value = "年份")
|
||||
private String year;
|
||||
@ApiModelProperty("月份")
|
||||
private String month;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:40
|
||||
* @description 日考勤查询条件
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceQuery implements Query {
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String dept;
|
||||
@ApiModelProperty("姓名")
|
||||
private String xm;
|
||||
|
||||
@ApiModelProperty("考勤日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
private String day;
|
||||
|
||||
@ApiModelProperty("签到方式")
|
||||
private String signType;
|
||||
|
||||
private String userSid;
|
||||
|
||||
private String userType;
|
||||
|
||||
private String dwSid;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 9:31
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceVo implements Vo {
|
||||
//姓名
|
||||
private String name;
|
||||
//所在部门
|
||||
private String deptName;
|
||||
//上午签到(打卡时间)
|
||||
private String signTime1;
|
||||
//位置(打卡地点)
|
||||
private String signDlwz1;
|
||||
//下午签退
|
||||
//位置
|
||||
//去向
|
||||
//加班天数
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.yxt.attend.api.attendance;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 9:31
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendanceVo2 implements Vo {
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String xm;
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String dwmc;
|
||||
/**
|
||||
* 单位类别
|
||||
*/
|
||||
private String dwlb;
|
||||
/**
|
||||
* 用户sid
|
||||
*/
|
||||
private String userSid;
|
||||
/**
|
||||
* 年
|
||||
*/
|
||||
private String year;
|
||||
/**
|
||||
* 月
|
||||
*/
|
||||
private String month;
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
private String day;
|
||||
/**
|
||||
* 类型:0、正常1、外勤2、差旅3、休假4、离职5、入职
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 打卡类型:1:2次,2:4次
|
||||
*/
|
||||
private Integer signType;
|
||||
/**
|
||||
* 打卡时间
|
||||
*/
|
||||
private String signTime;
|
||||
/**
|
||||
* 打卡地点
|
||||
*/
|
||||
private String signDlwz;
|
||||
/**
|
||||
* 打卡去向:1、单位2、外勤3、差旅4、休假5、离职6、入职
|
||||
*/
|
||||
private Integer signDest;
|
||||
/**
|
||||
* 打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休9、离职10、入职
|
||||
*/
|
||||
private Integer signState;
|
||||
/**
|
||||
* 打卡次数类型:1、上午签到,2、上午签退,3、下午签到,4、下午签退5、加班签到6、加班签退
|
||||
*/
|
||||
private Integer signNumType;
|
||||
/**
|
||||
* 地理位置经纬度
|
||||
*/
|
||||
private String dlxx;
|
||||
/**
|
||||
* 版本:查询考勤信息
|
||||
*/
|
||||
private Integer version;
|
||||
/**
|
||||
* 1、自动默认2、手动签卡
|
||||
*/
|
||||
private String isAuto;
|
||||
/**
|
||||
* 部门路径
|
||||
*/
|
||||
private String deptPath;
|
||||
/**
|
||||
* 加班有无结束打卡:0、未结束1、结束
|
||||
*/
|
||||
private Integer ovTimeIsEnd;
|
||||
/**
|
||||
* 当次加班时长
|
||||
*/
|
||||
private Double ovTimeThis;
|
||||
/**
|
||||
* 当日加班总时长
|
||||
*/
|
||||
private Double ovTimeSum;
|
||||
/**
|
||||
* 申请单目的地
|
||||
*/
|
||||
private String signDestDlwz;
|
||||
|
||||
private String sid;
|
||||
|
||||
private String sum;//加班天数
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yxt.attend.api.attendance.parameter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:40
|
||||
* @description 日考勤查询条件
|
||||
*/
|
||||
@Data
|
||||
public class ParameterQuery implements Query {
|
||||
@ApiModelProperty(value = "用户sid")
|
||||
private String usid;
|
||||
@ApiModelProperty(value = "考勤日期")
|
||||
@NotBlank(message = "考勤日期不能为空")
|
||||
private String date;
|
||||
@ApiModelProperty(value = "签到方式/两次、四次")
|
||||
private String signNumType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yxt.attend.api.attendance.parameter;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:40
|
||||
* @description 日考勤查询条件
|
||||
*/
|
||||
@Data
|
||||
public class ParameterQuery2 implements Query {
|
||||
|
||||
@ApiModelProperty(value = "用户sid")
|
||||
private String usid;
|
||||
|
||||
@ApiModelProperty(value = "考勤日期")
|
||||
private String date;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yxt.attend.api.attendance.parameter;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:40
|
||||
* @description 日考勤查询条件
|
||||
*/
|
||||
@Data
|
||||
public class ParameterQuery3 implements Query {
|
||||
|
||||
@ApiModelProperty(value = "用户sid")
|
||||
private String usid;
|
||||
|
||||
@ApiModelProperty(value = "考勤日期")
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty(value = "签到方式/两次、四次")
|
||||
private String signNumType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.yxt.attend.api.attendance.parameter;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:40
|
||||
* @description 日考勤查询条件
|
||||
*/
|
||||
@Data
|
||||
public class ParameterQuery4 implements Query {
|
||||
@ApiModelProperty(value = "用户sid")
|
||||
@NotBlank(message = "用户sid不能为空")
|
||||
private String usid;
|
||||
|
||||
@ApiModelProperty(value = "考勤日期 年份",required = true)
|
||||
@NotBlank(message = "考勤日期 年份不能为空")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(value = "考勤日期 月份",required = true)
|
||||
@NotBlank(message = "考勤日期 月份不能为空")
|
||||
private String month;
|
||||
|
||||
@ApiModelProperty(value = "签到方式/两次、四次",required = true)
|
||||
@NotBlank(message = "签到方式不能为空")
|
||||
private String signNumType;
|
||||
|
||||
@ApiModelProperty(value = "上午签到设置时间")
|
||||
private String amSignIn;
|
||||
|
||||
@ApiModelProperty(value = "上午签退设置时间")
|
||||
private String amSignOut;
|
||||
|
||||
@ApiModelProperty(value = "下午签到设置时间")
|
||||
private String pmSignIn;
|
||||
|
||||
@ApiModelProperty(value = "下午签退设置时间")
|
||||
private String pmSignOut;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.yxt.attend.api.attenderrand;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import com.yxt.jlzx.oa.api.form.Form;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @author hanwiejia
|
||||
* 考勤申请
|
||||
*/
|
||||
@Data
|
||||
@TableName("attend_errand")
|
||||
public class AttendErrand extends Form {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String userSid;//申请人sid
|
||||
|
||||
private String applicant;//申请人
|
||||
|
||||
private String dwSid;//单位sid
|
||||
|
||||
private String currentTime;//申请时间
|
||||
|
||||
private String submitTime;//提交时间
|
||||
|
||||
private String currentDlwz;//当前位置
|
||||
|
||||
private String destDlwz;//外出地点、目的地
|
||||
|
||||
private String startTime;//起始时间
|
||||
|
||||
private String endTime;//结束时间
|
||||
|
||||
private double dayCount;//差旅、外勤、休假天数
|
||||
|
||||
private String approverSid;//审批人sid
|
||||
|
||||
private String approver;//审批人
|
||||
|
||||
private String reason;//事由
|
||||
|
||||
private String approverTime;//审批、撤销时间
|
||||
|
||||
private int type;//类型:1、差旅2、外勤3、休假
|
||||
|
||||
private int vacationType;//休假类型:1、事假2、病假3、婚假4、产假5、丧假6、年假7、排休
|
||||
|
||||
private String vacationCategory;//请假类别:1、日假2、时假
|
||||
|
||||
private String deptPath;//部门路径
|
||||
|
||||
private String orderSid;//流程实例sid
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.yxt.attend.api.attenderrand;
|
||||
|
||||
import com.yxt.common.core.api.BaseApi;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* @author hanweijia
|
||||
* @date 2020/11/19 15:24
|
||||
* @description 考勤申请表
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AttendErrand",
|
||||
name = "yxt-attend",
|
||||
path = "v1/attenderrands",
|
||||
fallback = AttendErrandApiFallback.class)
|
||||
public interface AttendErrandApi extends BaseApi<AttendErrandVo, AttendErrandDto, AttendErrandQuery>{
|
||||
|
||||
@PutMapping("updates/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据sid修改")
|
||||
public ResultBean updates(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid) throws Exception;
|
||||
|
||||
@PutMapping("getHanld/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询自己的待办")
|
||||
public ResultBean getHanld(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.yxt.attend.api.attenderrand;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:25
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class AttendErrandApiFallback implements AttendErrandApi{
|
||||
|
||||
@Override
|
||||
public ResultBean<List<AttendErrandVo>> list(@Valid AttendErrandQuery query) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<AttendErrandVo>> pageList(@Valid PagerQuery<AttendErrandQuery> pagerQuery) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean save(@Valid AttendErrandDto dto) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean update(@Valid AttendErrandDto dto, String sid) throws Exception {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<AttendErrandVo> getVo(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean updates(String sid) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean getHanld(String sid) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.yxt.attend.api.attenderrand;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.yxt.jlzx.oa.api.form.FormDto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:10
|
||||
* @description 新建申请dto参数
|
||||
*/
|
||||
@Data
|
||||
public class AttendErrandDto extends FormDto{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "申请人sid", required = true)
|
||||
@NotBlank(message = "申请人sid不能为空")
|
||||
private String userSid;//申请人sid
|
||||
|
||||
@ApiModelProperty(value = "申请人", required = false)
|
||||
private String applicant;//申请人
|
||||
|
||||
@ApiModelProperty(value = "单位sid", required = false)
|
||||
private String dwSid;//单位sid
|
||||
|
||||
@ApiModelProperty(value = "申请时间", required = true)
|
||||
@NotBlank(message = "申请时间不能为空")
|
||||
private String currentTime;//申请时间
|
||||
|
||||
@ApiModelProperty(value = "提交时间", required = false)
|
||||
private String submitTime;//提交时间
|
||||
|
||||
@ApiModelProperty(value = "当前位置", required = true)
|
||||
@NotBlank(message = "当前位置不能为空")
|
||||
private String currentDlwz;//当前位置
|
||||
|
||||
@ApiModelProperty(value = "外出地点", required = true)
|
||||
private String destDlwz;//外出地点、目的地
|
||||
|
||||
@ApiModelProperty(value = "起始时间", required = true)
|
||||
@NotBlank(message = "起始时间不能为空")
|
||||
private String startTime;//起始时间
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = true)
|
||||
@NotBlank(message = "结束时间不能为空")
|
||||
private String endTime;//结束时间
|
||||
|
||||
@ApiModelProperty(value = "差旅、外勤、休假天数", required = true)
|
||||
@NotNull(message = "差旅、外勤、休假天数不能为空")
|
||||
private double dayCount;//差旅、外勤、休假天数
|
||||
|
||||
@ApiModelProperty(value = "审批人sid", required = false)
|
||||
private String approverSid;//审批人sid
|
||||
|
||||
@ApiModelProperty(value = "审批人", required = false)
|
||||
private String approver;//审批人
|
||||
|
||||
@ApiModelProperty(value = "请假事由", required = false)
|
||||
private String reason;//事由
|
||||
|
||||
@ApiModelProperty(value = "审批、撤销时间", required = false)
|
||||
private String approverTime;//审批、撤销时间
|
||||
|
||||
|
||||
@ApiModelProperty(value = "请假类型", required = true)
|
||||
private int type;//类型:1、差旅2、外勤3、休假
|
||||
|
||||
@ApiModelProperty(value = "休假类型", required = true)
|
||||
private int vacationType;//休假类型:1、事假2、病假3、婚假4、产假5、丧假6、年假7、排休
|
||||
|
||||
|
||||
@ApiModelProperty(value = "请假类别", required = true)
|
||||
private String vacationCategory;//请假类别:1、日假2、时假
|
||||
|
||||
@ApiModelProperty(value = "所在部门", required = false)
|
||||
// @NotBlank(message = "所在部门不能为空")
|
||||
private String deptPath;//部门路径
|
||||
|
||||
@ApiModelProperty(value = "流程实例sid", required = false)
|
||||
private String orderSid;//流程实例sid
|
||||
|
||||
@ApiModelProperty(value = "提交状态", required = false)
|
||||
private String state;//提交时间
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yxt.attend.api.attenderrand;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:40
|
||||
* @description 日考勤查询条件
|
||||
*/
|
||||
@Data
|
||||
public class AttendErrandQuery implements Query {
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
@NotBlank(message = "用户单位sid不能为空")
|
||||
private String dwSid;
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
@NotBlank(message = "用户sid不能为空")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("用户表isadmin字段,是否为管理员(1为管理员)")
|
||||
private String isadmin;
|
||||
|
||||
@ApiModelProperty("用户所在部门 路径")
|
||||
private String dept;
|
||||
|
||||
@ApiModelProperty("申请人")
|
||||
private String applicant;
|
||||
|
||||
@ApiModelProperty("审批人")
|
||||
private String approver;
|
||||
|
||||
@ApiModelProperty("审核状态")
|
||||
private String state;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty("申请类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("休假类型")
|
||||
private String vacationType;
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
package com.yxt.attend.api.attenderrand;
|
||||
|
||||
import com.yxt.common.base.utils.DateUtils;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import com.yxt.jlzx.oa.api.form.FormItem;
|
||||
import com.yxt.jlzx.oa.api.form.FormItems;
|
||||
import com.yxt.jlzx.oa.api.form.FormVo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 9:31
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendErrandVo extends FormVo {
|
||||
@ApiModelProperty(value = "申请人sid")
|
||||
private String userSid;//申请人sid
|
||||
|
||||
@ApiModelProperty(value = "申请人")
|
||||
private String applicant;//申请人
|
||||
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
@NotBlank(message = "单位sid不能为空")
|
||||
private String dwSid;//单位sid
|
||||
|
||||
@ApiModelProperty(value = "申请时间")
|
||||
private String currentTime;//申请时间
|
||||
|
||||
@ApiModelProperty(value = "提交时间")
|
||||
private String submitTime;//提交时间
|
||||
|
||||
@ApiModelProperty(value = "当前位置")
|
||||
private String currentDlwz;//当前位置
|
||||
|
||||
@ApiModelProperty(value = "外出地点")
|
||||
private String destDlwz;//外出地点、目的地
|
||||
|
||||
@ApiModelProperty(value = "起始时间")
|
||||
private String startTime;//起始时间
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;//结束时间
|
||||
|
||||
@ApiModelProperty(value = "差旅、外勤、休假天数")
|
||||
private double dayCount;//差旅、外勤、休假天数
|
||||
|
||||
@ApiModelProperty(value = "审批人sid")
|
||||
private String approverSid;//审批人sid
|
||||
|
||||
@ApiModelProperty(value = "审批人")
|
||||
private String approver;//审批人
|
||||
|
||||
@ApiModelProperty(value = "请假事由")
|
||||
private String reason;//事由
|
||||
|
||||
@ApiModelProperty(value = "审批、撤销时间")
|
||||
private String approverTime;//审批、撤销时间
|
||||
|
||||
|
||||
@ApiModelProperty(value = "请假类型key")
|
||||
private int type;//类型:1、差旅2、外勤3、休假
|
||||
|
||||
@ApiModelProperty(value = "请假类型value")
|
||||
private String typeVal;//类型:1、差旅2、外勤3、休假
|
||||
|
||||
@ApiModelProperty(value = "休假类型")
|
||||
private int vacationType;//休假类型:1、事假2、病假3、婚假4、产假5、丧假6、年假7、排休
|
||||
|
||||
|
||||
@ApiModelProperty(value = "请假类别")
|
||||
private String vacationCategory;//请假类别:1、日假2、时假
|
||||
|
||||
@ApiModelProperty(value = "所在部门")
|
||||
private String deptPath;//部门路径
|
||||
|
||||
|
||||
@ApiModelProperty(value = "流程实例sid")
|
||||
private String orderSid;//流程实例sid
|
||||
|
||||
|
||||
@ApiModelProperty(value = "审批状态")
|
||||
private String state;//流程实例sid
|
||||
|
||||
|
||||
@ApiModelProperty(value = "申请单sid")
|
||||
private String sid;//流程实例sid
|
||||
|
||||
@Override
|
||||
public Map toFormItemsMap()
|
||||
{
|
||||
|
||||
Map<String,Object> map=super.toFormItemsMap();
|
||||
List<FormItem> formList=(List<FormItem>)map.get("formItems");
|
||||
|
||||
FormItem item=new FormItem();
|
||||
item.setLeft_title("请假类型");
|
||||
item.setRight_text(this.typeVal);
|
||||
formList.add(item);
|
||||
|
||||
FormItem item1=new FormItem();
|
||||
item1.setLeft_title("申请人员");
|
||||
item1.setRight_text(this.applicant );
|
||||
formList.add(item1);
|
||||
|
||||
FormItem item2=new FormItem();
|
||||
item2.setLeft_title("所在部门");
|
||||
item2.setRight_text(this.deptPath );
|
||||
formList.add(item2);
|
||||
|
||||
|
||||
FormItem item3=new FormItem();
|
||||
item3.setLeft_title("申请时间");
|
||||
item3.setRight_text(this.currentTime);
|
||||
formList.add(item3);
|
||||
|
||||
FormItem item4=new FormItem();
|
||||
item4.setLeft_title("申请位置");
|
||||
item4.setRight_text(this.currentDlwz);
|
||||
formList.add(item4);
|
||||
|
||||
FormItem item7=new FormItem();
|
||||
item7.setLeft_title("目的地");
|
||||
item7.setRight_text(this.destDlwz);
|
||||
formList.add(item7);
|
||||
|
||||
FormItem item8=new FormItem();
|
||||
item8.setLeft_title("开始时间");
|
||||
item8.setRight_text(this.startTime);
|
||||
formList.add(item8);
|
||||
|
||||
FormItem item9=new FormItem();
|
||||
item9.setLeft_title("结束时间");
|
||||
item9.setRight_text(this.endTime);
|
||||
formList.add(item9);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态生成表单项目(填报时)
|
||||
*/
|
||||
@Override
|
||||
public Map<String,Object> getFormItemsMap() {
|
||||
|
||||
Map<String, Object> map = super.getFormItemsMap();
|
||||
List<FormItems> formList = (List<FormItems>) map.get("formItems");
|
||||
|
||||
|
||||
FormItems item1 = new FormItems();
|
||||
item1.setLeft_title("请假类型");
|
||||
item1.getRight_text().setControlId("type");
|
||||
item1.getRight_text().setDataType("int");
|
||||
item1.getRight_text().setDefaultText("");
|
||||
item1.getRight_text().setReadOnly(0);
|
||||
item1.getRight_text().setList_key(Collections.emptyList());
|
||||
item1.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item1);
|
||||
|
||||
|
||||
FormItems item2 = new FormItems();
|
||||
item2.setLeft_title("申请人员");
|
||||
item2.getRight_text().setControlId("applicant");
|
||||
item2.getRight_text().setDataType("String");
|
||||
item2.getRight_text().setDefaultText("");
|
||||
item2.getRight_text().setReadOnly(0);
|
||||
item2.getRight_text().setList_key(Collections.emptyList());
|
||||
item2.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item2);
|
||||
|
||||
FormItems item3 = new FormItems();
|
||||
item3.setLeft_title("所在部门 ");
|
||||
item3.getRight_text().setControlId("deptPath");
|
||||
item3.getRight_text().setDataType("String");
|
||||
item3.getRight_text().setDefaultText("");
|
||||
item3.getRight_text().setReadOnly(0);
|
||||
item3.getRight_text().setList_key(Collections.emptyList());
|
||||
item3.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item3);
|
||||
|
||||
FormItems item4 = new FormItems();
|
||||
item4.setLeft_title("申请时间");
|
||||
item4.getRight_text().setControlId("currentTime");
|
||||
item4.getRight_text().setDataType("String");
|
||||
item4.getRight_text().setDefaultText("");
|
||||
item4.getRight_text().setReadOnly(0);
|
||||
item4.getRight_text().setList_key(Collections.emptyList());
|
||||
item4.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item4);
|
||||
|
||||
FormItems item5 = new FormItems();
|
||||
item5.setLeft_title("申请位置");
|
||||
item5.getRight_text().setControlId("currentDlwz");
|
||||
item5.getRight_text().setDataType("String");
|
||||
item5.getRight_text().setDefaultText("");
|
||||
item5.getRight_text().setReadOnly(0);
|
||||
item5.getRight_text().setList_key(Collections.emptyList());
|
||||
item5.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item5);
|
||||
|
||||
FormItems item6 = new FormItems();
|
||||
item6.setLeft_title("目的地");
|
||||
item6.getRight_text().setControlId("destDlwz");
|
||||
item6.getRight_text().setDataType("String");
|
||||
item6.getRight_text().setDefaultText("");
|
||||
item6.getRight_text().setReadOnly(0);
|
||||
item6.getRight_text().setList_key(Collections.emptyList());
|
||||
item6.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item6);
|
||||
|
||||
FormItems item7 = new FormItems();
|
||||
item7.setLeft_title("开始时间");
|
||||
item7.getRight_text().setControlId("startTime");
|
||||
item7.getRight_text().setDataType("String");
|
||||
item7.getRight_text().setDefaultText("");
|
||||
item7.getRight_text().setReadOnly(0);
|
||||
item7.getRight_text().setList_key(Collections.emptyList());
|
||||
item7.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item7);
|
||||
|
||||
FormItems item8 = new FormItems();
|
||||
item8.setLeft_title("结束时间");
|
||||
item8.getRight_text().setControlId("endTime");
|
||||
item8.getRight_text().setDataType("String");
|
||||
item8.getRight_text().setDefaultText("");
|
||||
item8.getRight_text().setReadOnly(0);
|
||||
item8.getRight_text().setList_key(Collections.emptyList());
|
||||
item8.getRight_text().setList_value(Collections.emptyList());
|
||||
formList.add(item8);
|
||||
|
||||
map.put("formItems", formList);
|
||||
|
||||
return map;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.attend.api.attenderrand;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/16 09:38
|
||||
* @description 表单保存时返回的数据
|
||||
*/
|
||||
@Data
|
||||
public class FormResultVo implements Vo {
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "taskSid")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 表单sid
|
||||
*/
|
||||
@ApiModelProperty(value = "formSid")
|
||||
private String formSid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yxt.attend.api.attendholiday;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/18 10:56
|
||||
* @description 休假日期设置
|
||||
*/
|
||||
@Data
|
||||
public class AttendHolidaySet extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 年
|
||||
*/
|
||||
private String year;
|
||||
/**
|
||||
* 月
|
||||
*/
|
||||
private String month;
|
||||
/**
|
||||
* 日
|
||||
*/
|
||||
private String day;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yxt.attend.api.attendholiday;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:17
|
||||
* @description 休假日期设置
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AttendHolidaySet",
|
||||
name = "yxt-attend",
|
||||
path = "v1/attendholidaysets",
|
||||
fallback = AttendHolidaySetApiFallback.class)
|
||||
public interface AttendHolidaySetApi {
|
||||
|
||||
@PostMapping(value = "/save", headers = "token")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "休息日设置保存")
|
||||
public ResultBean save(@RequestBody AttendHolidaySetDto attendHolidaySetDto);
|
||||
|
||||
@PostMapping(value = "/list/{year}", headers = "token")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "公休日列表")
|
||||
public ResultBean<List<AttendHolidaySetVo>> list(@ApiParam(value = "年", required = true) @PathVariable("year") String year);
|
||||
|
||||
@PostMapping(value = "checkIsHoliDay")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据日期判断是否为公休")
|
||||
public boolean checkIsHoliDay(@RequestBody AttendHolidaySetQuery attendHolidaySetQuery);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yxt.attend.api.attendholiday;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:20
|
||||
* @description 休息日设置容错处理
|
||||
*/
|
||||
@Component
|
||||
public class AttendHolidaySetApiFallback implements AttendHolidaySetApi {
|
||||
@Override
|
||||
public ResultBean save(AttendHolidaySetDto attendHolidaySetDto) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<AttendHolidaySetVo>> list(String year) {
|
||||
return new ResultBean<List<AttendHolidaySetVo>>().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkIsHoliDay(AttendHolidaySetQuery attendHolidaySetQuery) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.yxt.attend.api.attendholiday;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:33
|
||||
* @description 休息日设置
|
||||
*/
|
||||
@Data
|
||||
public class AttendHolidaySetDto {
|
||||
@ApiModelProperty(value = "要设置的年份")
|
||||
private String year;
|
||||
@ApiModelProperty(value = "1月公休日,休假日期")
|
||||
private String janDays;
|
||||
@ApiModelProperty(value = "2月公休日,休假日期")
|
||||
private String febDays;
|
||||
@ApiModelProperty(value = "3月公休日,休假日期")
|
||||
private String marDays;
|
||||
@ApiModelProperty(value = "4月公休日,休假日期")
|
||||
private String aprDays;
|
||||
@ApiModelProperty(value = "5月公休日,休假日期")
|
||||
private String mayDays;
|
||||
@ApiModelProperty(value = "6月公休日,休假日期")
|
||||
private String junDays;
|
||||
@ApiModelProperty(value = "7月公休日,休假日期")
|
||||
private String julDays;
|
||||
@ApiModelProperty(value = "8月公休日,休假日期")
|
||||
private String augDays;
|
||||
@ApiModelProperty(value = "9月公休日,休假日期")
|
||||
private String sepDays;
|
||||
@ApiModelProperty(value = "10月公休日,休假日期")
|
||||
private String octDays;
|
||||
@ApiModelProperty(value = "11月公休日,休假日期")
|
||||
private String novDays;
|
||||
@ApiModelProperty(value = "12月公休日,休假日期")
|
||||
private String decDays;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yxt.attend.api.attendholiday;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/20 15:23
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendHolidaySetQuery implements Query {
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String dwSid;
|
||||
@ApiModelProperty(value = "年")
|
||||
private String year;
|
||||
@ApiModelProperty(value = "月")
|
||||
private String month;
|
||||
@ApiModelProperty(value = "日期")
|
||||
private String day;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yxt.attend.api.attendholiday;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/20 14:49
|
||||
* @description 公休日列表
|
||||
*/
|
||||
@Data
|
||||
public class AttendHolidaySetVo implements Vo {
|
||||
@ApiModelProperty(value = "月份")
|
||||
private String month;
|
||||
@ApiModelProperty(value = "休假日期")
|
||||
private String day;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yxt.attend.api.attendschedule;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/18 11:30
|
||||
* @description 考勤表定时任务
|
||||
*/
|
||||
@Data
|
||||
public class AttendSchedule extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 上午签到定时器
|
||||
*/
|
||||
private String amSignInCron;
|
||||
/**
|
||||
* 上午签退定时器
|
||||
*/
|
||||
private String amSignOutCron;
|
||||
/**
|
||||
* 下午签到定时器
|
||||
*/
|
||||
private String pmSignInCron;
|
||||
/**
|
||||
* 下午签退定时器
|
||||
*/
|
||||
private String pmSignOutCron;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yxt.attend.api.attendschedule;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 10:45
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AttendSchedule",
|
||||
name = "yxt-attend",
|
||||
path = "v1/attendschedules",
|
||||
fallback = AttendScheduleApiFallback.class)
|
||||
public interface AttendScheduleApi {
|
||||
|
||||
public ResultBean<List<AttendSchedule>> listOne();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yxt.attend.api.attendschedule;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 10:45
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class AttendScheduleApiFallback implements AttendScheduleApi {
|
||||
@Override
|
||||
public ResultBean<List<AttendSchedule>> listOne() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.yxt.attend.api.attendsigntype;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/18 11:45
|
||||
* @description 签卡方式设置
|
||||
*/
|
||||
@Data
|
||||
public class AttendSignType extends BaseEntity {
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 类型:1、每日两次签卡2、每日4次签卡
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 起始年月
|
||||
*/
|
||||
private String startDate;
|
||||
/**
|
||||
* 结束年月
|
||||
*/
|
||||
private String endDate;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yxt.attend.api.attendsigntype;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.text.ParseException;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 10:46
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AttendSignType",
|
||||
name = "yxt-attend",
|
||||
path = "v1/attendsigntypes",
|
||||
fallback = AttendSignTypeApiFallback.class)
|
||||
public interface AttendSignTypeApi {
|
||||
|
||||
@PostMapping(value = "/saveSignType")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "保存签到信息设置")
|
||||
public ResultBean saveSignType(@Valid @RequestBody AttendSignTypeDto attendSignTypeDto) throws ParseException;
|
||||
|
||||
@PostMapping(value = "/checkSignTypeAfterDate/{dwSid}/{startDate}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "检查传入年月后有无签卡方式的设置")
|
||||
public ResultBean checkSignTypeAfterDate(@ApiParam(value = "单位sid", required = true) @PathVariable("dwSid") String dwSid,
|
||||
@ApiParam(value = "起始年月", required = true) @PathVariable("startDate") String startDate);
|
||||
|
||||
@PostMapping(value = "/checkByDate/{dwSid}/{startDate}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据日期查询是否设置签卡方式")
|
||||
public ResultBean checkByDate(@ApiParam(value = "单位sid", required = true) @PathVariable("dwSid") String dwSid,
|
||||
@ApiParam(value = "起始年月", required = true) @PathVariable("startDate") String startDate);
|
||||
|
||||
|
||||
@PostMapping(value = "/getAttendnceSetDate/{dwSid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "考勤信息回显")
|
||||
public ResultBean getAttendnceSetDate(@ApiParam(value = "单位sid", required = true) @PathVariable("dwSid") String dwSid);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.attend.api.attendsigntype;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 10:47
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class AttendSignTypeApiFallback {
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.yxt.attend.api.attendsigntype;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 17:35
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendSignTypeDto implements Dto {
|
||||
|
||||
private String dwSid;
|
||||
@ApiModelProperty(value = "类型:1、每日两次签卡2、每日4次签卡")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "起始年月", required = true)
|
||||
@NotBlank(message = "请选择起始年月")
|
||||
private String startDate;
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.yxt.attend.api.attendstatistics;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/18 11:50
|
||||
* @description 考勤统计表(月考勤)
|
||||
*/
|
||||
@Data
|
||||
public class AttendStatistics extends BaseEntity {
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 用户sid
|
||||
*/
|
||||
private String userSid;
|
||||
/**
|
||||
* 年
|
||||
*/
|
||||
private String year;
|
||||
/**
|
||||
* 月
|
||||
*/
|
||||
private String month;
|
||||
/**
|
||||
* 全月天数
|
||||
*/
|
||||
private Double allDay;
|
||||
/**
|
||||
* 全勤天数
|
||||
*/
|
||||
private Double allAttendanceDay;
|
||||
/**
|
||||
* 出勤天数
|
||||
*/
|
||||
private Double attendanceDay;
|
||||
/**
|
||||
* 差旅天数
|
||||
*/
|
||||
private Double tripDay;
|
||||
/**
|
||||
* 加班天数
|
||||
*/
|
||||
private Double overtimeDay;
|
||||
/**
|
||||
* 休假天数
|
||||
*/
|
||||
private Double vacationDay;
|
||||
/**
|
||||
* 缺勤天数
|
||||
*/
|
||||
private Double absenceDay;
|
||||
/**
|
||||
* 应签次数
|
||||
*/
|
||||
private Integer supposedNum;
|
||||
/**
|
||||
* 正常次数
|
||||
*/
|
||||
private Integer normalNum;
|
||||
/**
|
||||
* 迟到次数
|
||||
*/
|
||||
private Integer lateNum;
|
||||
/**
|
||||
* 早退次数
|
||||
*/
|
||||
private Integer earlyNum;
|
||||
/**
|
||||
* 差旅次数
|
||||
*/
|
||||
private Integer tripNum;
|
||||
/**
|
||||
* 外出次数
|
||||
*/
|
||||
private Integer outNum;
|
||||
/**
|
||||
* 休假次数
|
||||
*/
|
||||
private Integer vacationNum;
|
||||
/**
|
||||
* 漏签次数
|
||||
*/
|
||||
private Integer missNum;
|
||||
/**
|
||||
* 加班次数
|
||||
*/
|
||||
private Integer ovTimeNum;
|
||||
/**
|
||||
* 部门路径
|
||||
*/
|
||||
private String deptPath;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.yxt.attend.api.attendstatistics;
|
||||
|
||||
import com.yxt.attend.api.attendance.AttendanceListQuery;
|
||||
import com.yxt.attend.api.attendance.AttendanceListVo;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 10:48
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AttendStatistics",
|
||||
name = "yxt-attend",
|
||||
path = "v1/attendstatistics",
|
||||
fallback = AttendStatisticsApiFallback.class)
|
||||
public interface AttendStatisticsApi {
|
||||
|
||||
@PostMapping(value = "/pagerList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "月考勤列表")
|
||||
public ResultBean<PagerVo<AttendanceListVo>> pagerList(@Valid @RequestBody PagerQuery<AttendanceListQuery> pagerQuery);
|
||||
|
||||
@PostMapping(value = "/userList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "月考勤列表-历史记录列表")
|
||||
public ResultBean userList(@Valid @RequestBody AttendStatisticsOneQuery attendStatisticsOneQuery);
|
||||
|
||||
|
||||
@PostMapping(value = "/monthIndex")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "月考勤页面初始化")
|
||||
public ResultBean<Map<String, Object>> monthIndex();
|
||||
|
||||
@PostMapping(value = "/getAttendHolidayNum")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据年月获取公休日、缺勤天数、应签次数、漏签次数")
|
||||
public ResultBean<Map<String, Object>> getAttendHolidayNum(@Valid @RequestBody AttendStatisticsOneQuery attendStatisticsOneQuery);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.yxt.attend.api.attendstatistics;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.yxt.attend.api.attendance.AttendanceListQuery;
|
||||
import com.yxt.attend.api.attendance.AttendanceListVo;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 10:48
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class AttendStatisticsApiFallback implements AttendStatisticsApi{
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<AttendanceListVo>> pagerList(@Valid PagerQuery<AttendanceListQuery> pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean userList(@Valid AttendStatisticsOneQuery attendStatisticsOneQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> monthIndex() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> getAttendHolidayNum(
|
||||
@Valid AttendStatisticsOneQuery attendStatisticsOneQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.yxt.attend.api.attendstatistics;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/25 11:39
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendStatisticsDto implements Dto {
|
||||
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 用户sid
|
||||
*/
|
||||
private String userSid;
|
||||
/**
|
||||
* 年
|
||||
*/
|
||||
private String year;
|
||||
/**
|
||||
* 月
|
||||
*/
|
||||
private String month;
|
||||
/**
|
||||
* 全月天数
|
||||
*/
|
||||
private Double allDay;
|
||||
/**
|
||||
* 全勤天数
|
||||
*/
|
||||
private Double allAttendanceDay;
|
||||
/**
|
||||
* 出勤天数
|
||||
*/
|
||||
private Double attendanceDay;
|
||||
/**
|
||||
* 差旅天数
|
||||
*/
|
||||
private Double tripDay;
|
||||
/**
|
||||
* 加班天数
|
||||
*/
|
||||
private Double overtimeDay;
|
||||
/**
|
||||
* 休假天数
|
||||
*/
|
||||
private Double vacationDay;
|
||||
/**
|
||||
* 缺勤天数
|
||||
*/
|
||||
private Double absenceDay;
|
||||
/**
|
||||
* 应签次数
|
||||
*/
|
||||
private Integer supposedNum;
|
||||
/**
|
||||
* 正常次数
|
||||
*/
|
||||
private Integer normalNum;
|
||||
/**
|
||||
* 迟到次数
|
||||
*/
|
||||
private Integer lateNum;
|
||||
/**
|
||||
* 早退次数
|
||||
*/
|
||||
private Integer earlyNum;
|
||||
/**
|
||||
* 差旅次数
|
||||
*/
|
||||
private Integer tripNum;
|
||||
/**
|
||||
* 外出次数
|
||||
*/
|
||||
private Integer outNum;
|
||||
/**
|
||||
* 休假次数
|
||||
*/
|
||||
private Integer vacationNum;
|
||||
/**
|
||||
* 漏签次数
|
||||
*/
|
||||
private Integer missNum;
|
||||
/**
|
||||
* 部门路径
|
||||
*/
|
||||
private String deptPath;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yxt.attend.api.attendstatistics;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/28 11:00
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendStatisticsOneQuery {
|
||||
|
||||
private String year;
|
||||
private String month;
|
||||
private String userSid;
|
||||
private String dwSid;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.yxt.attend.api.attendstatistics;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 14:25
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendStatisticsQuery implements Query {
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.yxt.attend.api.attendstatistics;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 9:31
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendStatisticsVo implements Vo {
|
||||
//考勤统计列表字段
|
||||
@ApiModelProperty("序号")
|
||||
private Integer col;
|
||||
|
||||
@ApiModelProperty("星期")
|
||||
private String week;
|
||||
|
||||
@ApiModelProperty("上午签到")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private String amSignIn;
|
||||
|
||||
@ApiModelProperty("上午签到位置")
|
||||
private String signDlwz1;
|
||||
|
||||
@ApiModelProperty("上午打卡去向:1、单位2、外勤3、差旅4、休假5、离职6、入职")
|
||||
private String signDest1;
|
||||
|
||||
@ApiModelProperty("上午申请去向目的地")
|
||||
private String signDestDlwz1;
|
||||
|
||||
@ApiModelProperty("上午签退")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private String amSignOut;
|
||||
|
||||
@ApiModelProperty("上午签退位置")
|
||||
private String signDlwz2;
|
||||
|
||||
@ApiModelProperty("上午签退去向:1、单位2、外勤3、差旅4、休假5、离职6、入职")
|
||||
private String signDest2;
|
||||
|
||||
@ApiModelProperty("上午签退申请目的地")
|
||||
private String signDestDlwz2;
|
||||
|
||||
@ApiModelProperty("下午上班打卡")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private String pmSignIn;
|
||||
|
||||
@ApiModelProperty("下午打卡位置")
|
||||
private String signDlwz3;
|
||||
|
||||
@ApiModelProperty("下午打卡去向")
|
||||
private String signDest3;
|
||||
|
||||
@ApiModelProperty("下午签退申请目的地")
|
||||
private String signDestDlwz3;
|
||||
|
||||
@ApiModelProperty("下午下班打卡")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private String pmSignOut;
|
||||
|
||||
@ApiModelProperty("下午打卡位置")
|
||||
private String signDlwz4;
|
||||
|
||||
@ApiModelProperty("下午打卡去向")
|
||||
private String signDest4;
|
||||
|
||||
@ApiModelProperty("下午签退申请目的地")
|
||||
private String signDestDlwz4;
|
||||
|
||||
@ApiModelProperty("加班天数")
|
||||
private String tdNum;
|
||||
|
||||
@ApiModelProperty("打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休9、离职10、入职")
|
||||
private String signState1;
|
||||
|
||||
@ApiModelProperty("打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休9、离职10、入职")
|
||||
private String signState2;
|
||||
|
||||
@ApiModelProperty("打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休9、离职10、入职")
|
||||
private String signState3;
|
||||
|
||||
@ApiModelProperty("打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休9、离职10、入职")
|
||||
private String signState4;
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("打卡时间")
|
||||
private String signTime;
|
||||
|
||||
@ApiModelProperty("当前天")
|
||||
private String day;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yxt.attend.api.attendtimetable;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/18 13:47
|
||||
* @description 工作日作息时间表
|
||||
*/
|
||||
@Data
|
||||
public class AttendTimetable extends BaseEntity {
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String dwSid;
|
||||
/**
|
||||
* 起始年月
|
||||
*/
|
||||
private String startDate;
|
||||
/**
|
||||
* 结束年月
|
||||
*/
|
||||
private String endDate;
|
||||
/**
|
||||
* 上午签到时间
|
||||
*/
|
||||
private String amSignIn;
|
||||
/**
|
||||
* 上午签到前期限
|
||||
*/
|
||||
private String amSignInFrontTerm;
|
||||
/**
|
||||
* 上午签到后期限
|
||||
*/
|
||||
private String amSignInAfterTerm;
|
||||
/**
|
||||
* 上午签退时间
|
||||
*/
|
||||
private String amSignOut;
|
||||
/**
|
||||
* 上午签退前期限
|
||||
*/
|
||||
private String amSignOutFrontTerm;
|
||||
/**
|
||||
* 上午签退后期限
|
||||
*/
|
||||
private String amSignOutAfterTerm;
|
||||
/**
|
||||
* 下午签到时间
|
||||
*/
|
||||
private String pmSignIn;
|
||||
/**
|
||||
* 下午签到前期限
|
||||
*/
|
||||
private String pmSignInFrontTerm;
|
||||
/**
|
||||
* 下午签到后期限
|
||||
*/
|
||||
private String pmSignInAfterTerm;
|
||||
/**
|
||||
* 下午签退时间
|
||||
*/
|
||||
private String pmSignOut;
|
||||
|
||||
/**
|
||||
* 下午签退前期限
|
||||
*/
|
||||
private String pmSignOutFrontTerm;
|
||||
/**
|
||||
* 下午签退后期限
|
||||
*/
|
||||
private String pmSignOutAfterTerm;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yxt.attend.api.attendtimetable;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 11:53
|
||||
* @description 工作日作息时间
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AttendTimetable",
|
||||
name = "yxt-attend",
|
||||
path = "v1/attendtimetables",
|
||||
fallback = AttendTimetableApiFallback.class)
|
||||
public interface AttendTimetableApi {
|
||||
|
||||
@PostMapping(value = "/checkTimetableAfterDate/{dwSid}/{startDate}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "检查传入年月后有无考勤作息时间的设置")
|
||||
public ResultBean checkTimetableAfterDate(@ApiParam(value = "单位sid", required = true) @PathVariable("dwSid") String dwSid,
|
||||
@ApiParam(value = "起始年月", required = true) @PathVariable("startDate") String startDate);
|
||||
|
||||
@PostMapping(value = "/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "保存作息时间设置")
|
||||
public ResultBean save(@RequestBody AttendTimetableDto attendTimetableDto) throws ParseException;
|
||||
|
||||
@PostMapping(value = "/list")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "作息时间设置回显")
|
||||
public ResultBean list(@RequestBody AttendTimetableQuery attendTimetableQuery);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.attend.api.attendtimetable;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/21 11:54
|
||||
* @description 工作日作息时间容错处理
|
||||
*/
|
||||
@Component
|
||||
public class AttendTimetableApiFallback implements AttendTimetableApi {
|
||||
@Override
|
||||
public ResultBean checkTimetableAfterDate(String dwSid, String startDate) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean save(AttendTimetableDto attendTimetableDto) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean list(AttendTimetableQuery attendTimetableQuery) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yxt.attend.api.attendtimetable;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/24 9:30
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendTimetableDto implements Dto {
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String dwSid;
|
||||
@ApiModelProperty(value = "起始年月")
|
||||
private String startDate;
|
||||
@ApiModelProperty(value = "上午签到时间")
|
||||
private String amSignIn;
|
||||
@ApiModelProperty(value = "上午签到前期限")
|
||||
private String amSignInFrontTerm;
|
||||
@ApiModelProperty(value = "上午签到后期限")
|
||||
private String amSignInAfterTerm;
|
||||
@ApiModelProperty(value = "上午签退时间")
|
||||
private String amSignOut;
|
||||
@ApiModelProperty(value = "上午签退前期限")
|
||||
private String amSignOutFrontTerm;
|
||||
@ApiModelProperty(value = "上午签退后期限")
|
||||
private String amSignOutAfterTerm;
|
||||
@ApiModelProperty(value = "下午签到时间")
|
||||
private String pmSignIn;
|
||||
@ApiModelProperty(value = "下午签到前期限")
|
||||
private String pmSignInFrontTerm;
|
||||
@ApiModelProperty(value = "下午签到后期限")
|
||||
private String pmSignInAfterTerm;
|
||||
@ApiModelProperty(value = "下午签退时间")
|
||||
private String pmSignOut;
|
||||
@ApiModelProperty(value = "下午签退前期限")
|
||||
private String pmSignOutFrontTerm;
|
||||
@ApiModelProperty(value = "下午签退后期限")
|
||||
private String pmSignOutAfterTerm;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yxt.attend.api.attendtimetable;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/28 14:47
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class AttendTimetableQuery implements Query {
|
||||
|
||||
private String dwSid;
|
||||
private String year;
|
||||
private String month;
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/2 16:59
|
||||
* @description App我的工作接口
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-AppWork",
|
||||
name = "yxt-jlzx-attend",
|
||||
path = "v1/appwork",
|
||||
fallback = AppWorkApiFallBack.class)
|
||||
public interface AppWorkApi {
|
||||
|
||||
@PostMapping("/doingworksCount")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "待办工作分页列表数量")
|
||||
ResultBean doingWorksCount(PagerQuery<WorkQuery> pagerQuery);
|
||||
/**
|
||||
* 待办工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/doingworks")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "待办工作分页列表")
|
||||
ResultBean<PagerVo<WorkDoAppVo>> doingWorks(@Valid @RequestBody PagerQuery<WorkQuery> query);
|
||||
|
||||
/**
|
||||
* 已办工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/didworks")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "已办工作分页列表")
|
||||
ResultBean<PagerVo<WorkDidAppVo>> didWorks(@Valid @RequestBody PagerQuery<WorkQuery> query);
|
||||
|
||||
|
||||
|
||||
@PostMapping("/myAttenderrand")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "我的申请列表")
|
||||
ResultBean<PagerVo<WorkDidAppVo>> myAttenderrand(@Valid @RequestBody PagerQuery<WorkQuery> query);
|
||||
/**
|
||||
* 审批记录列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/recordlist")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "审批记录列表(不分页)")
|
||||
ResultBean<WorkRecordOneVo> recordList(@Valid @RequestBody WorkRecordQuery query);
|
||||
|
||||
|
||||
//待阅工作
|
||||
//ResultBean<PagerVo<WfTaskVo>> unreadWorks(PagerQuery<WfTaskQuery> query);
|
||||
|
||||
//已阅工作
|
||||
//ResultBean<PagerVo<WfHistTaskDidVo>> didWorks(PagerQuery<WfHistTaskQuery> query);
|
||||
|
||||
/**
|
||||
* 流工作类别列表及筛选条件
|
||||
*
|
||||
* @param pagerQuery 查询条件
|
||||
* @return 工作类别列表及筛选条件
|
||||
*/
|
||||
@PostMapping("/WorkTypeTree")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "工作类别列表及筛选条件")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "state", value = "状态:0已办,1待办", required = true),
|
||||
// @ApiImplicitParam(name = "usersid", value = "用户sid", required = true)
|
||||
//
|
||||
// })
|
||||
ResultBean<List<WorkTypeTreeVo>> getWorkTypeTree(
|
||||
// @ApiParam(value = "usersid", required = true) @PathVariable("usersid") String userSid,
|
||||
// @ApiParam(value = "state", required = true) @PathVariable("state") Integer state
|
||||
@RequestBody WorkQuery workQuery
|
||||
);
|
||||
|
||||
@GetMapping("/selectNum/{userSid}/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询流程数量")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sid", value = "流程sid", required = true),
|
||||
@ApiImplicitParam(name = "userSid", value = "用户sid", required = true)
|
||||
|
||||
})
|
||||
public ResultBean selectNum(@ApiParam(value = "userSid", required = true) @PathVariable("userSid") String userSid, @ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
@GetMapping("/selectReadNum/{userSid}/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询待阅数量")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sid", value = "流程sid", required = true),
|
||||
@ApiImplicitParam(name = "userSid", value = "用户sid", required = true)
|
||||
|
||||
})
|
||||
public ResultBean selectReadNum(@ApiParam(value = "userSid", required = true) @PathVariable("userSid") String userSid, @ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 待阅工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
// @PostMapping("/doingworks")
|
||||
// @ResponseBody
|
||||
// @ApiOperation(value = "待阅工作分页列表")
|
||||
// ResultBean<PagerVo<WorkDoAppVo>> doingReads(@Valid @RequestBody PagerQuery<MessageQuery> query);
|
||||
|
||||
/**
|
||||
* 已办工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
// @PostMapping("/didworks")
|
||||
// @ResponseBody
|
||||
// @ApiOperation(value = "已阅工作分页列表")
|
||||
// ResultBean<PagerVo<WorkDidAppVo>> didReads(@Valid @RequestBody PagerQuery<MessageQuery> query);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
public class AppWorkApiFallBack implements AppWorkApi {
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDoAppVo>> doingWorks(
|
||||
@Valid PagerQuery<WorkQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDidAppVo>> didWorks(
|
||||
@Valid PagerQuery<WorkQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean selectNum(String userSid,String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean selectReadNum(String userSid, String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<WorkRecordOneVo> recordList(@Valid WorkRecordQuery query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<WorkTypeTreeVo>> getWorkTypeTree(WorkQuery workQuery) {
|
||||
return new ResultBean<List<WorkTypeTreeVo>>().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDidAppVo>> myAttenderrand(@Valid PagerQuery<WorkQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean doingWorksCount(PagerQuery<WorkQuery> pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ResultBean<PagerVo<WorkDoAppVo>> doingReads(@Valid PagerQuery<MessageQuery> query) {
|
||||
// // TODO Auto-generated method stub
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ResultBean<PagerVo<WorkDidAppVo>> didReads(@Valid PagerQuery<MessageQuery> query) {
|
||||
// // TODO Auto-generated method stub
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.oa.api.seal.SealApiFallBack;
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/2 23:03
|
||||
* @description web我的工作接口
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-Work",
|
||||
name = "yxt-attend",
|
||||
path = "v1/work",
|
||||
fallback = WorkApiFallBack.class)
|
||||
public interface WorkApi {
|
||||
|
||||
/**
|
||||
* 待办工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/doingworks")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "待办工作分页列表")
|
||||
ResultBean<PagerVo<WorkDoVo>> doingWorks(@Valid @RequestBody PagerQuery<WorkQuery> query);
|
||||
|
||||
|
||||
/**
|
||||
* 待办工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/doingWorksNum")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "我的工作待办数量")
|
||||
ResultBean<Long> doingWorksNum(@Valid @RequestBody PagerQuery<WorkQuery> pagerQuery);
|
||||
|
||||
/**
|
||||
* 已办工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/didworks")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "已办工作分页列表")
|
||||
ResultBean<PagerVo<WorkDidVo>> didWorks(@Valid @RequestBody PagerQuery<WorkQuery> query);
|
||||
/**
|
||||
* 共文库查看
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/didworksadmin")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "已办工作分页列表")
|
||||
ResultBean<PagerVo<WorkDidVo>> didworksadmin(@Valid @RequestBody PagerQuery<WorkQuery> query);
|
||||
|
||||
/**
|
||||
* 审批记录列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/recordlist")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "审批记录列表(不分页)")
|
||||
ResultBean<List<WorkRecordVo>> recordList(@Valid @RequestBody WorkRecordQuery query);
|
||||
|
||||
|
||||
|
||||
|
||||
//待阅工作
|
||||
//ResultBean<PagerVo<WfTaskVo>> unreadWorks(PagerQuery<WfTaskQuery> query);
|
||||
|
||||
//已阅工作
|
||||
//ResultBean<PagerVo<WfHistTaskDidVo>> didWorks(PagerQuery<WfHistTaskQuery> query);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
public class WorkApiFallBack implements WorkApi{
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDoVo>> doingWorks(
|
||||
@Valid PagerQuery<WorkQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDidVo>> didWorks(
|
||||
@Valid PagerQuery<WorkQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDidVo>> didworksadmin(PagerQuery<WorkQuery> query) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResultBean<List<WorkRecordVo>> recordList(
|
||||
@Valid WorkRecordQuery query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Long> doingWorksNum(@Valid PagerQuery<WorkQuery> pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
public class WorkDidAppVo implements Vo {
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "taskSid")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processName;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例sid")
|
||||
private String orderSid;
|
||||
/**
|
||||
* 文件标题
|
||||
*/
|
||||
@ApiModelProperty(value = "文件标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 发起部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "发起部门名称")
|
||||
private String createDeptName;
|
||||
/**
|
||||
* 表单sid
|
||||
*/
|
||||
@ApiModelProperty(value = "表单sid")
|
||||
private String formSid;
|
||||
|
||||
@ApiModelProperty(value = "流程sid")
|
||||
private String processSid;
|
||||
/**
|
||||
* 是否可以撤回
|
||||
*/
|
||||
@ApiModelProperty(value = "是否可以撤回(1可以,0不可以)")
|
||||
private int isRecall;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/02 09:35
|
||||
* @description 已办工作
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class WorkDidVo implements Vo {
|
||||
/**
|
||||
* 任务Sid
|
||||
*/
|
||||
@ApiModelProperty(value = "taskSid")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例sid")
|
||||
private String orderSid;
|
||||
/**
|
||||
* 流程sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程sid")
|
||||
private String processSid;
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processName;
|
||||
/**
|
||||
* 已办工作跳转路径
|
||||
*/
|
||||
@ApiModelProperty(value = "已办工作跳转路径")
|
||||
private String instanceUrl3;
|
||||
/**
|
||||
* 文件标题
|
||||
*/
|
||||
@ApiModelProperty(value = "文件标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 发起部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "发起部门名称")
|
||||
private String createDeptName;
|
||||
@ApiModelProperty(value = "发起部门sid")
|
||||
private String createDeptSid;
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "发起人姓名")
|
||||
private String createrName;
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 紧急程度
|
||||
*/
|
||||
@ApiModelProperty(value = "紧急程度")
|
||||
private String imperativeGrade;
|
||||
/**
|
||||
* 任务名称(环节名称)
|
||||
*/
|
||||
@ApiModelProperty(value = "任务名称")
|
||||
private String taskName;
|
||||
/**
|
||||
* 前一个任务的sid(对应hist_task表中的)
|
||||
*/
|
||||
@ApiModelProperty(value = "前一个任务的sid")
|
||||
private String preTaskSid;
|
||||
/**
|
||||
* 任务处理人Sid
|
||||
*/
|
||||
@ApiModelProperty(value = "任务处理人Sid")
|
||||
private String actorSid;
|
||||
/**
|
||||
* 表单sid
|
||||
*/
|
||||
@ApiModelProperty(value = "表单sid")
|
||||
private String formSid;
|
||||
/**
|
||||
* 是否可以撤回
|
||||
*/
|
||||
@ApiModelProperty(value = "是否可以撤回(1可以,0不可以)")
|
||||
private int isRecall;
|
||||
/**
|
||||
* 流程实例发起人
|
||||
*/
|
||||
// @ApiModelProperty(value = "流程实例发起人sid")
|
||||
//private String orderDraftorSid;
|
||||
|
||||
|
||||
/**
|
||||
* 任务显示名称
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务显示名称")
|
||||
//private String displayName;
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务类型")
|
||||
//private int taskType;
|
||||
/**
|
||||
* 参与类型
|
||||
*/
|
||||
//@ApiModelProperty(value = "参与类型")
|
||||
//private int performType;
|
||||
|
||||
|
||||
/**
|
||||
* 任务完成时间
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务完成时间")
|
||||
//private Date finishTime;
|
||||
/**
|
||||
* 任务期望完成时间
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务期望完成时间")
|
||||
//private Date expireTime;
|
||||
/**
|
||||
* 任务处理url
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务处理url")
|
||||
//private String actionUrl;
|
||||
|
||||
/**
|
||||
* 可用参数
|
||||
*/
|
||||
//private String variable;
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
//@ApiModelProperty(value = "版本号")
|
||||
//private int ver;
|
||||
|
||||
/**
|
||||
* 发起部门sid
|
||||
*/
|
||||
//@ApiModelProperty(value = "发起部门sid")
|
||||
//private String createDeptSid;
|
||||
|
||||
|
||||
/**
|
||||
* 动作名称
|
||||
*/
|
||||
//@ApiModelProperty(value = "动作名称")
|
||||
//private String preActionName;
|
||||
/**
|
||||
* 当前处理人姓名
|
||||
*/
|
||||
//@ApiModelProperty(value = "当前处理人姓名")
|
||||
//private String operName;
|
||||
/**
|
||||
* 当前处理人部门名称
|
||||
*/
|
||||
//@ApiModelProperty(value = "当前处理人部门名称")
|
||||
//private String operDeptName;
|
||||
/**
|
||||
* 当前处理人岗位
|
||||
*/
|
||||
//@ApiModelProperty(value = "当前处理人岗位")
|
||||
//private String operPost;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/21 10:37
|
||||
* @description 任务
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class WorkDoAppVo implements Vo {
|
||||
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "taskSid")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processName;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例sid")
|
||||
private String orderSid;
|
||||
/**
|
||||
* 文件标题
|
||||
*/
|
||||
@ApiModelProperty(value = "文件标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 发起部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "发起部门名称")
|
||||
private String createDeptName;
|
||||
/**
|
||||
* 表单sid
|
||||
*/
|
||||
@ApiModelProperty(value = "表单sid")
|
||||
private String formSid;
|
||||
|
||||
@ApiModelProperty(value = "流程sid")
|
||||
private String processSid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/02 09:35
|
||||
* @description 待办工作
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class WorkDoVo implements Vo {
|
||||
/**
|
||||
* 任务Sid
|
||||
*/
|
||||
@ApiModelProperty(value = "taskSid")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例sid")
|
||||
private String orderSid;
|
||||
/**
|
||||
* 流程sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程sid")
|
||||
private String processSid;
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processName;
|
||||
/**
|
||||
* 待办工作跳转路径
|
||||
*/
|
||||
@ApiModelProperty(value = "待办工作跳转路径")
|
||||
private String instanceUrl2;
|
||||
/**
|
||||
* 待阅工作跳转路径
|
||||
*/
|
||||
@ApiModelProperty(value = "待阅工作跳转路径")
|
||||
private String instanceUrl3;
|
||||
/**
|
||||
* 文件标题
|
||||
*/
|
||||
@ApiModelProperty(value = "文件标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 发起部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "发起部门名称")
|
||||
private String createDeptName;
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "发起人姓名")
|
||||
private String createrName;
|
||||
/**
|
||||
* 发起人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "发起人sid")
|
||||
private String createBySid;
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 紧急程度
|
||||
*/
|
||||
@ApiModelProperty(value = "紧急程度")
|
||||
private String imperativeGrade;
|
||||
/**
|
||||
* 任务名称(环节名称)
|
||||
*/
|
||||
@ApiModelProperty(value = "任务名称")
|
||||
private String taskName;
|
||||
/**
|
||||
* 前一个任务的sid(对应hist_task表中的)
|
||||
*/
|
||||
@ApiModelProperty(value = "前一个任务的sid")
|
||||
private String preTaskSid;
|
||||
/**
|
||||
* 任务处理人Sid
|
||||
*/
|
||||
@ApiModelProperty(value = "任务处理人Sid")
|
||||
private String actorSid;
|
||||
/**
|
||||
* 表单sid
|
||||
*/
|
||||
@ApiModelProperty(value = "表单sid")
|
||||
private String formSid;
|
||||
/**
|
||||
* 流程实例发起人
|
||||
*/
|
||||
// @ApiModelProperty(value = "流程实例发起人sid")
|
||||
//private String orderDraftorSid;
|
||||
|
||||
|
||||
/**
|
||||
* 任务显示名称
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务显示名称")
|
||||
//private String displayName;
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务类型")
|
||||
//private int taskType;
|
||||
/**
|
||||
* 参与类型
|
||||
*/
|
||||
//@ApiModelProperty(value = "参与类型")
|
||||
//private int performType;
|
||||
|
||||
|
||||
/**
|
||||
* 任务完成时间
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务完成时间")
|
||||
//private Date finishTime;
|
||||
/**
|
||||
* 任务期望完成时间
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务期望完成时间")
|
||||
//private Date expireTime;
|
||||
/**
|
||||
* 任务处理url
|
||||
*/
|
||||
//@ApiModelProperty(value = "任务处理url")
|
||||
//private String actionUrl;
|
||||
|
||||
/**
|
||||
* 可用参数
|
||||
*/
|
||||
//private String variable;
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
//@ApiModelProperty(value = "版本号")
|
||||
//private int ver;
|
||||
|
||||
/**
|
||||
* 发起部门sid
|
||||
*/
|
||||
//@ApiModelProperty(value = "发起部门sid")
|
||||
//private String createDeptSid;
|
||||
|
||||
|
||||
/**
|
||||
* 动作名称
|
||||
*/
|
||||
//@ApiModelProperty(value = "动作名称")
|
||||
//private String preActionName;
|
||||
/**
|
||||
* 当前处理人姓名
|
||||
*/
|
||||
//@ApiModelProperty(value = "当前处理人姓名")
|
||||
//private String operName;
|
||||
/**
|
||||
* 当前处理人部门名称
|
||||
*/
|
||||
//@ApiModelProperty(value = "当前处理人部门名称")
|
||||
//private String operDeptName;
|
||||
/**
|
||||
* 当前处理人岗位
|
||||
*/
|
||||
//@ApiModelProperty(value = "当前处理人岗位")
|
||||
//private String operPost;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/16 09:50
|
||||
* @description 查询参数
|
||||
*/
|
||||
@Data
|
||||
public class WorkQuery implements Query {
|
||||
private static final long serialVersionUID = -6256204643003327901L;
|
||||
// @ApiModelProperty(value = "表单sid", required = false)
|
||||
//private String formSid;
|
||||
|
||||
/**
|
||||
* 流程sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程sid", required = false)
|
||||
private String processSid;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "请假类型", required = false)
|
||||
private String type;//暂时传值 -1,不使用该查询条件
|
||||
|
||||
|
||||
@ApiModelProperty(value = "年月", required = false)
|
||||
private String month;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
//@ApiModelProperty(value = "流程实例sid", required = false)
|
||||
//@NotBlank(message = "流程实例sid不能为空")
|
||||
//private String orderSid;
|
||||
|
||||
@ApiModelProperty(value = "流程类别sid", required = false)
|
||||
private String processTypeSid;
|
||||
|
||||
/**
|
||||
* 参与用户sid
|
||||
*/
|
||||
@ApiModelProperty(value = "参与用户sid", required = true)
|
||||
private String actorSid;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题", required = false)
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 紧急程度
|
||||
*/
|
||||
@ApiModelProperty(value = "紧急程度(一般、紧急、非常紧急)", required = false)
|
||||
private String imperativeGrade;
|
||||
|
||||
/**
|
||||
* 流程实例-创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例-创建时间1", required = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
private Date createStartTime;
|
||||
/**
|
||||
* 流程实例-创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例-创建时间2", required = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
private Date createEndTime;
|
||||
|
||||
/**
|
||||
* 流程实例创建人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例创建人姓名", required = false)
|
||||
private String createrName;
|
||||
|
||||
@ApiModelProperty(value = "流程实例创建人sid", required = false)
|
||||
private String createBySid;
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@ApiModelProperty(value = "任务类型(0待办、1待阅)", required = true)
|
||||
@NotBlank(message = "任务类型不能为空")
|
||||
private String taskType;
|
||||
/**
|
||||
* 办结状态
|
||||
*/
|
||||
@ApiModelProperty(value = "办结状态(0在办、1办结)", required = false)
|
||||
private String state;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "待办列表的查询名称公共字段")
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import com.yxt.jlzx.oa.api.filesappendix.FilesappendixVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/18 18:19
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class WorkRecordOneVo implements Vo {
|
||||
|
||||
private String title;//标题
|
||||
private Integer size;//个数
|
||||
private String filePath;
|
||||
private String pdfFilePath;
|
||||
private List<FilesappendixVo> filesappendixVoList;
|
||||
|
||||
private List<WorkRecordVo> workRecordVoList;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
|
||||
@Data
|
||||
public class WorkRecordQuery implements Query{
|
||||
private static final long serialVersionUID = -6256204643003327901L;
|
||||
@ApiModelProperty(value = "表单sid", required = false)
|
||||
private String formSid;
|
||||
|
||||
/**
|
||||
* 流程sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程sid", required = false)
|
||||
private String processSid;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例sid", required = true)
|
||||
@NotBlank(message = "流程实例sid不能为空")
|
||||
private String orderSid;
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
@ApiModelProperty(value = "任务名称", required = false)
|
||||
private String taskName;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/16 09:35
|
||||
* @description 任务
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class WorkRecordVo implements Vo {
|
||||
/**
|
||||
* sid
|
||||
*/
|
||||
@ApiModelProperty(value = "sid")
|
||||
private String sid;
|
||||
/**
|
||||
* 当前处理人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "当前处理人姓名")
|
||||
private String operName;
|
||||
/**
|
||||
* 当前处理人岗位
|
||||
*/
|
||||
@ApiModelProperty(value = "当前处理人岗位")
|
||||
private String operPost;
|
||||
/**
|
||||
* 任务名称(环节名称)
|
||||
*/
|
||||
@ApiModelProperty(value = "任务名称")
|
||||
private String taskName;
|
||||
/**
|
||||
* 当前处理人意见
|
||||
*/
|
||||
@ApiModelProperty(value = "当前处理人意见")
|
||||
private String operOpinion;
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 任务完成时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date finishTime;
|
||||
/**
|
||||
* 用时(x天x小时x分)
|
||||
*/
|
||||
@ApiModelProperty(value = "用时")
|
||||
private String useMinutes;
|
||||
|
||||
/**
|
||||
* 动作名称
|
||||
*/
|
||||
@ApiModelProperty(value = "动作名称")
|
||||
private String actionName;
|
||||
|
||||
/**
|
||||
* 当前处理人部门名称
|
||||
*/
|
||||
// @ApiModelProperty(value = "当前处理人部门名称")
|
||||
// private String operDeptName;
|
||||
/**
|
||||
* 当前处理人姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "当前处理人姓名")
|
||||
private String nextOperName;
|
||||
/**
|
||||
* 当前处理人岗位
|
||||
*/
|
||||
@ApiModelProperty(value = "当前处理人岗位")
|
||||
private String nextOperPost;
|
||||
/**
|
||||
* 任务名称(环节名称)
|
||||
*/
|
||||
@ApiModelProperty(value = "任务名称")
|
||||
private String nextTaskName;
|
||||
/**
|
||||
* 签名信息
|
||||
*/
|
||||
@ApiModelProperty(value = "签名信息")
|
||||
private String signature;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/3 16:21
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class WorkTypeTreeVo implements Vo {
|
||||
/**
|
||||
* 工作类别
|
||||
*/
|
||||
@ApiModelProperty(value = "工作类别")
|
||||
WorkTypeVo workTypeVo;
|
||||
/**
|
||||
* 工作列表
|
||||
*/
|
||||
@ApiModelProperty(value = "工作列表")
|
||||
List<WorkVo> workList;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/04 14:21
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class WorkTypeVo implements Vo {
|
||||
@ApiModelProperty(value = "工作类别sid")
|
||||
private String sid;
|
||||
/**
|
||||
* 工作类别名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工作类别名称")
|
||||
private String processTypeName;
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private int sortNo;
|
||||
|
||||
/**
|
||||
* 工作数量
|
||||
*/
|
||||
@ApiModelProperty(value = "工作数量")
|
||||
private int workCount;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yxt.attend.api.work;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/04 14:21
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class WorkVo implements Vo {
|
||||
@ApiModelProperty(value = "工作sid")
|
||||
private String sid;
|
||||
/**
|
||||
* 工作名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工作名称")
|
||||
private String processName;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/14 14:19
|
||||
* @description 提交/退回流程dto
|
||||
*/
|
||||
@Data
|
||||
public class BackWorkDto implements Dto{
|
||||
private static final long serialVersionUID = 6661570004528986911L;
|
||||
/**
|
||||
* 当前任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "当前任务sid", required = true)
|
||||
@NotBlank(message = "当前任务sid不能为空")
|
||||
private String currentTaskSid;
|
||||
/**
|
||||
* 处理人sid
|
||||
*/
|
||||
@ApiModelProperty(value = "处理人sid", required = true)
|
||||
@NotBlank(message = "处理人sid不能为空")
|
||||
private String operUserSid;
|
||||
/**
|
||||
* 当前处理人意见
|
||||
*/
|
||||
@ApiModelProperty(value = "当前处理人意见", required = true)
|
||||
private String operOpinion;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 是否发送短信提醒
|
||||
*/
|
||||
@ApiModelProperty(value = "是否发送短信提醒", required = true)
|
||||
private int isSendMsg;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/14 14:19
|
||||
* @description 结束流程dto
|
||||
*/
|
||||
@Data
|
||||
public class EndWorkDto implements Dto{
|
||||
private static final long serialVersionUID = 6661570004528986911L;
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "任务sid", required = true)
|
||||
@NotBlank(message = "任务sid不能为空")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 办理人sid
|
||||
*/
|
||||
@ApiModelProperty(value = "办理人sid", required = true)
|
||||
@NotBlank(message = "办理人sid不能为空")
|
||||
private String operUserSid;
|
||||
/**
|
||||
* 动作sid
|
||||
*/
|
||||
@ApiModelProperty(value = "动作sid", required = true)
|
||||
@NotBlank(message = "动作sid不能为空")
|
||||
private String actionSid;
|
||||
/**
|
||||
* 办结人办理意见
|
||||
*/
|
||||
@ApiModelProperty(value = "办结人办理意见", required = true)
|
||||
@NotBlank(message = "办结人办理意见不能为空")
|
||||
private String operOpinion;
|
||||
|
||||
/**
|
||||
* 分发用户
|
||||
*/
|
||||
@ApiModelProperty(value = "分发用户", required = false)
|
||||
private String sendUsersSid;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/12 9:57
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class EndWorkDto2 implements Dto {
|
||||
private static final long serialVersionUID = -7835586547394685486L;
|
||||
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "任务sid", required = true)
|
||||
@NotBlank(message = "任务sid不能为空")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 办理人sid
|
||||
*/
|
||||
@ApiModelProperty(value = "办理人sid", required = true)
|
||||
@NotBlank(message = "办理人sid不能为空")
|
||||
private String operUserSid;
|
||||
/**
|
||||
* 动作sid
|
||||
*/
|
||||
@ApiModelProperty(value = "动作sid", required = true)
|
||||
@NotBlank(message = "动作sid不能为空")
|
||||
private String actionSid;
|
||||
/**
|
||||
* 办结人办理意见
|
||||
*/
|
||||
@ApiModelProperty(value = "办结人办理意见", required = true)
|
||||
@NotBlank(message = "办结人办理意见不能为空")
|
||||
private String operOpinion;
|
||||
|
||||
/**
|
||||
* 分发用户
|
||||
*/
|
||||
@ApiModelProperty(value = "分发用户", required = false)
|
||||
private String sendUsersSid;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "签章结果", required = true)
|
||||
@NotBlank(message = "签章结果不能为空")
|
||||
private String signatureResultB64;
|
||||
|
||||
@ApiModelProperty(value = "文档sid:流程实例sid")
|
||||
private String documentSid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/14 14:19
|
||||
* @description 撤回流程dto
|
||||
*/
|
||||
@Data
|
||||
public class RecallWorkDto implements Dto{
|
||||
private static final long serialVersionUID = 6661570004528986911L;
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "任务sid", required = true)
|
||||
@NotBlank(message = "任务sid不能为空")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 处理人sid
|
||||
*/
|
||||
@ApiModelProperty(value = "处理人sid", required = false)
|
||||
@NotBlank(message = "处理人sid不能为空")
|
||||
private String operUserSid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/17 9:19
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class RecordVo implements Vo {
|
||||
private static final long serialVersionUID = -1224623246091166105L;
|
||||
|
||||
@ApiModelProperty(value = "印章图片的base64")
|
||||
private String sealPic;
|
||||
@ApiModelProperty(value = "图片的格式")
|
||||
private String sealPicType;
|
||||
@ApiModelProperty(value = "印章的高度")
|
||||
private int sealHeight;
|
||||
@ApiModelProperty(value = "印章的宽度")
|
||||
private int sealWidth;
|
||||
@ApiModelProperty(value = "原文")
|
||||
private String originalText;
|
||||
@ApiModelProperty(value = "是否验证通过")
|
||||
private String isTrue;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/14 14:19
|
||||
* @description 提交/退回流程dto
|
||||
*/
|
||||
@Data
|
||||
public class SubmitWorkDto extends BackWorkDto{
|
||||
private static final long serialVersionUID = 6661570004528986911L;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 动作sid
|
||||
*/
|
||||
@ApiModelProperty(value = "动作sid", required = true)
|
||||
@NotBlank(message = "动作sid不能为空")
|
||||
private String actionSid;
|
||||
|
||||
|
||||
/**
|
||||
* 下一处理人sid
|
||||
*/
|
||||
@ApiModelProperty(value = "下一处理人sid", required = true)
|
||||
@NotBlank(message = "下一处理人sid不能为空")
|
||||
private String nextUserSid;
|
||||
|
||||
/**
|
||||
* 分发用户
|
||||
*/
|
||||
@ApiModelProperty(value = "分发用户", required = false)
|
||||
private String sendUsersSid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/11 22:23
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class SubmitWorkDto2 extends BackWorkDto {
|
||||
private static final long serialVersionUID = 8031499964271150695L;
|
||||
|
||||
/**
|
||||
* 动作sid
|
||||
*/
|
||||
@ApiModelProperty(value = "动作sid", required = true)
|
||||
@NotBlank(message = "动作sid不能为空")
|
||||
private String actionSid;
|
||||
|
||||
|
||||
/**
|
||||
* 下一处理人sid
|
||||
*/
|
||||
@ApiModelProperty(value = "下一处理人sid", required = true)
|
||||
@NotBlank(message = "下一处理人sid不能为空")
|
||||
private String nextUserSid;
|
||||
|
||||
/**
|
||||
* 分发用户
|
||||
*/
|
||||
@ApiModelProperty(value = "分发用户", required = false)
|
||||
private String sendUsersSid;
|
||||
|
||||
@ApiModelProperty(value = "签章结果", required = true)
|
||||
@NotBlank(message = "签章结果不能为空")
|
||||
private String signatureResultB64;
|
||||
@ApiModelProperty(value = "文档sid")
|
||||
private String documentSid;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/11/13 17:03
|
||||
* @description OA中工作流接口
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-attend-WorkFlow",
|
||||
name = "yxt-attend",
|
||||
path = "v1/workflow",
|
||||
fallback = WorkFlowApiFallBack.class)
|
||||
public interface WorkFlowApi {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 执行流程
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/submitwork")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "提交工作(执行流程)")
|
||||
ResultBean submitWork(@Valid @RequestBody SubmitWorkDto dto);
|
||||
|
||||
/**
|
||||
* 结束流程
|
||||
*
|
||||
* @param taskSid 任务sid
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/endwork")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "结束工作(执行流程)")
|
||||
ResultBean endWork(@Valid @RequestBody EndWorkDto dto);
|
||||
/**
|
||||
* 退回流程。 意见页面退回时
|
||||
* @param WfMTaskDto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/backwork")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "退回工作(执行流程)")
|
||||
ResultBean backWork(@Valid @RequestBody BackWorkDto dto);
|
||||
|
||||
/**
|
||||
* 撤回流程。待办列表中撤回.
|
||||
* @param WfMTaskDto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/recallwork")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "撤回工作(执行流程)")
|
||||
ResultBean recallWork(@Valid @RequestBody RecallWorkDto dto);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.sql.ResultSet;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/11 22:06
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-jlzx-oa-WorkFlow2",
|
||||
name = "yxt-jlzx-oa",
|
||||
path = "v2/workflow",
|
||||
fallback = WorkFlowApiFallBack.class)
|
||||
public interface WorkFlowApi2 {
|
||||
|
||||
/**
|
||||
* 执行流程
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/submitwork")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "提交工作(执行流程)")
|
||||
ResultBean submitWork(@Valid @RequestBody SubmitWorkDto2 dto);
|
||||
|
||||
/**
|
||||
* 结束流程
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/endwork")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "结束工作(执行流程)")
|
||||
ResultBean endWork(@Valid @RequestBody EndWorkDto2 dto);
|
||||
|
||||
@PostMapping("/selectRecord/{signatureSid}/{userSid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据记录获取签名相关信息以及验证结果")
|
||||
public ResultBean<RecordVo> selectRecord(@ApiParam(value = "记录sid", required = true) @PathVariable("signatureSid") String signatureSid,
|
||||
@ApiParam(value = "用户sid", required = true) @PathVariable("userSid") String userSid) throws UnsupportedEncodingException;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.yxt.attend.api.workflow;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
|
||||
|
||||
public class WorkFlowApiFallBack implements WorkFlowApi{
|
||||
|
||||
@Override
|
||||
public ResultBean submitWork(@Valid SubmitWorkDto dto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean endWork(@Valid EndWorkDto dto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean backWork(@Valid BackWorkDto dto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean recallWork(@Valid RecallWorkDto dto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
100
jlzx-single/yxt-single-attend/yxt-single-attend-biz/pom.xml
Normal file
100
jlzx-single/yxt-single-attend/yxt-single-attend-biz/pom.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-parent</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.yxt.attend</groupId>
|
||||
<artifactId>yxt-single-attend-biz</artifactId>
|
||||
<version>0.0.1</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yxt.attend</groupId>
|
||||
<artifactId>yxt-single-attend-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-system-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.workflow</groupId>
|
||||
<artifactId>yxt-single-workflow-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.yxt.messagecenter</groupId>
|
||||
<artifactId>yxt-single-messagecenter-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-oa-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-oa-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-base</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*Mapper.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yxt.attend;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/09 17:54
|
||||
* @description
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication(scanBasePackages = {
|
||||
"com.yxt.common.base.config",
|
||||
"com.yxt.attend"
|
||||
})
|
||||
@EnableFeignClients(basePackages = {"com.yxt.jlzx.oa", "com.yxt.jlzx.system","com.yxt.messagecenter","com.yxt.workflow","com.yxt.jlzx.jlcyry"})
|
||||
public class AttendApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AttendApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,759 @@
|
||||
package com.yxt.attend.biz.appattend;
|
||||
|
||||
import com.yxt.attend.api.appattend.App2AttendApi;
|
||||
import com.yxt.attend.api.appattend.App2AttendQuery;
|
||||
import com.yxt.attend.api.appattend.AppAttendTwoQuery;
|
||||
import com.yxt.attend.api.attendance.Attendance;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandVo;
|
||||
import com.yxt.attend.api.attendholiday.AttendHolidaySet;
|
||||
import com.yxt.attend.api.attendholiday.AttendHolidaySetQuery;
|
||||
import com.yxt.attend.api.attendsigntype.AttendSignType;
|
||||
import com.yxt.attend.api.attendstatistics.AttendStatistics;
|
||||
import com.yxt.attend.api.attendtimetable.AttendTimetable;
|
||||
import com.yxt.attend.biz.attendance.AttendanceService;
|
||||
import com.yxt.attend.biz.attenderrand.AttendErrandService;
|
||||
import com.yxt.attend.biz.attendholiday.AttendHolidaySetService;
|
||||
import com.yxt.attend.biz.attendsigntype.AttendSignTypeService;
|
||||
import com.yxt.attend.biz.attendstatistics.AttendStatisticsService;
|
||||
import com.yxt.attend.biz.attendtimetable.AttendTimetableService;
|
||||
import com.yxt.common.base.utils.DateUtils;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.jlzx.system.api.department.DepartmentApi;
|
||||
import com.yxt.jlzx.system.api.department.QrCodeVo;
|
||||
import com.yxt.jlzx.system.api.user.UserApi;
|
||||
import com.yxt.jlzx.system.api.user.UserInfoVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/7/31 21:37
|
||||
* @description
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("v2/appattends")
|
||||
@Api(tags = "app考勤接口2")
|
||||
public class App2AttendApiImpl implements App2AttendApi {
|
||||
|
||||
@Autowired
|
||||
private DepartmentApi departmentApi;
|
||||
@Autowired
|
||||
private AttendSignTypeService attendSignTypeService;
|
||||
@Autowired
|
||||
private AttendanceService attendanceService;
|
||||
@Autowired
|
||||
private AttendTimetableService attendTimetableService;
|
||||
@Autowired
|
||||
private AttendHolidaySetService attendHolidaySetService;
|
||||
@Autowired
|
||||
private UserApi userApi;
|
||||
@Autowired
|
||||
private AttendStatisticsService attendStatisticsService;
|
||||
@Autowired
|
||||
private AttendErrandService attendErrandService;
|
||||
|
||||
|
||||
//正常上下班打卡
|
||||
@Override
|
||||
public ResultBean normalRecord(AppAttendTwoQuery appAttendTwoQuery) {
|
||||
String sbSid = appAttendTwoQuery.getSbsid();
|
||||
//单位sid
|
||||
String dwSid = appAttendTwoQuery.getDwsid();
|
||||
//地理位置
|
||||
String dlwz = appAttendTwoQuery.getDlwz();
|
||||
//用户sid
|
||||
String userSid = appAttendTwoQuery.getUsersid();
|
||||
//姓名
|
||||
String name = appAttendTwoQuery.getName();
|
||||
//经纬度
|
||||
String dlxx = appAttendTwoQuery.getJwd();
|
||||
// a:设备码,q:企业码
|
||||
String type = appAttendTwoQuery.getType();
|
||||
Date today = new Date();
|
||||
String date = DateUtils.dateConvertStr(today, "yyyy-MM-dd");
|
||||
//开始时间
|
||||
String startDate = DateUtils.dateConvertStr(today, "yyyy-MM");
|
||||
String time = DateUtils.dateConvertStr(today, "HH:mm");
|
||||
String now = DateUtils.dateConvertStr(today, "yyyy-MM-dd HH:mm:ss");
|
||||
String year = date.substring(0, 4);
|
||||
String month = date.substring(5, 7);
|
||||
String day = date.substring(8, 10);
|
||||
//查询签卡方式
|
||||
AttendSignType attendanceSignType = attendSignTypeService.check(dwSid, startDate);
|
||||
int signType = attendanceSignType.getType();
|
||||
//判断该单位是否设置了打卡前后时间限制,为限制不允许在首页扫码
|
||||
Boolean b = attendTimetableService.selectAttendTimetable(signType, appAttendTwoQuery.getDwsid(), startDate);
|
||||
if (!b) {
|
||||
return ResultBean.fireFail().setMsg("请先设置打卡时间限制");
|
||||
}
|
||||
//判断打卡类型:上午签到、上午签退、下午签到、下午签退
|
||||
ResultBean<Attendance> r = attendTimetableService.selectCheckTime(userSid, signType, dwSid, startDate,date, time);
|
||||
if (!r.getSuccess()) {
|
||||
return ResultBean.fireFail().setMsg(r.getMsg());
|
||||
}
|
||||
//打卡次数类型
|
||||
int signNumType = r.getData().getSignNumType();
|
||||
int qdlx = signNumType;
|
||||
//企业二维码,截取链接q
|
||||
boolean flag = false;
|
||||
if (type.equals("q")) {
|
||||
if (sbSid.equals(dwSid)) {
|
||||
flag = true;
|
||||
} else {
|
||||
return ResultBean.fireFail().setMsg("该二维码不属于您所属的单位!");
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
UserInfoVo user = userApi.selectBysid(userSid).getData();
|
||||
QrCodeVo deptuser = departmentApi.queryByStaffSid(user.getStaffSid()).getData();
|
||||
Attendance attendance = new Attendance();
|
||||
//查询本次是否有自动签到,有的话则删除
|
||||
Attendance curAttendance = selectAttendance(userSid, qdlx, today);
|
||||
if (null != curAttendance) {
|
||||
attendanceService.deleteBySid(curAttendance.getSid());
|
||||
App2AttendQuery app2AttendQuery = new App2AttendQuery();
|
||||
app2AttendQuery.setAttendance(curAttendance);
|
||||
app2AttendQuery.setDate(date);
|
||||
app2AttendQuery.setDwSid(dwSid);
|
||||
app2AttendQuery.setMonth(month);
|
||||
app2AttendQuery.setUserSid(userSid);
|
||||
//更新签到统计表中的信息
|
||||
boolean isUpdated = updateStatistics(app2AttendQuery);
|
||||
}
|
||||
AttendTimetable attendanceTimetable = attendTimetableService.check(dwSid, startDate);
|
||||
attendance.setUserSid(userSid);
|
||||
attendance.setXm(name);
|
||||
attendance.setDwSid(dwSid);
|
||||
attendance.setSignDlwz(dlwz);
|
||||
attendance.setYear(year);
|
||||
attendance.setMonth(month);
|
||||
attendance.setDay(date);
|
||||
attendance.setSignDestDlwz("");
|
||||
attendance.setSignTime(time);
|
||||
attendance.setSignType(attendanceSignType.getType());
|
||||
// signNumType:打卡次数类型:1、上午签到,2、上午签退,3、下午签到,4、下午签退5、加班签到6、加班签退
|
||||
attendance.setSignNumType(signNumType);
|
||||
attendance.setDlxx(dlxx);
|
||||
attendance.setIsAuto("2");
|
||||
attendance.setOvTimeIsEnd(1);
|
||||
// 最近一次打卡记录
|
||||
Attendance lastAttend = attendanceService.selectLastByDay(userSid, date);
|
||||
attendance.setOvTimeThis(0.0);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0 : lastAttend.getOvTimeSum());
|
||||
if (deptuser == null) {
|
||||
attendance.setDeptPath("");
|
||||
} else {
|
||||
if (StringUtils.isEmpty(deptuser.getDepartmentName())) {
|
||||
attendance.setDeptPath("");
|
||||
} else {
|
||||
attendance.setDeptPath(deptuser.getDepartmentName());
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是否为公休日
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
AttendHolidaySetQuery attendHolidaySetQuery = new AttendHolidaySetQuery();
|
||||
attendHolidaySetQuery.setDwSid(dwSid);
|
||||
attendHolidaySetQuery.setYear(year);
|
||||
attendHolidaySetQuery.setMonth(month);
|
||||
attendHolidaySetQuery.setDay(day);
|
||||
AttendHolidaySet holidaySet = attendHolidaySetService.checkByDay(attendHolidaySetQuery);
|
||||
// 差旅、外出、休假申请单
|
||||
AttendErrandVo attendanceErrand = attendErrandService.selectByCurTime(userSid, now);
|
||||
if (holidaySet == null) {
|
||||
attendance.setType(0);
|
||||
attendance.setSignDest(1);
|
||||
// type:类型:0、正常1、外勤2、差旅3、休假
|
||||
// signDest:打卡去向:1、单位2、外勤3、差旅4、休假
|
||||
// signState:打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假
|
||||
double overtimeDay = 0.00;
|
||||
if (attendanceSignType.getType() == 1) { // 2次签到
|
||||
if (signNumType == 1) { // 上午签到
|
||||
//判断是否设置打卡前期限或者打卡后期限,如果设置则不能打卡
|
||||
if (StringUtils.isBlank(attendanceTimetable.getAmSignInAfterTerm()) || StringUtils.isBlank(attendanceTimetable.getAmSignOutAfterTerm())) {
|
||||
if ((attendanceTimetable.getAmSignIn().substring(0, attendanceTimetable.getAmSignIn().length() - 1) + "1").compareTo(time) < 0) {
|
||||
attendance.setSignState(2);
|
||||
} else {
|
||||
attendance.setSignState(1);
|
||||
}
|
||||
} else {
|
||||
//判断是打卡前期限还是打卡后期限
|
||||
if ((attendanceTimetable.getAmSignIn().substring(0, attendanceTimetable.getAmSignIn().length() - 1) + "1").compareTo(time) < 0) {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getAmSignInAfterTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getAmSignIn(), attendanceTimetable.getAmSignInAfterTerm(), signNumType, time, 0);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您签到时间超过打卡时间区间 请不要再打!" + 1);
|
||||
return ResultBean.fireFail().setMsg("您签到时间超过打卡时间区间 请不要再打!");
|
||||
} else {
|
||||
attendance.setSignState(2); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(2);
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getAmSignInFrontTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getAmSignIn(), attendanceTimetable.getAmSignInFrontTerm(), signNumType, time, 1);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您没在打卡时间区间内 请稍后再打!" + 2);
|
||||
return ResultBean.fireFail().setMsg("您没在打卡时间区间内 请稍后再打!");
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (signNumType == 4) { // 下午签退
|
||||
if (StringUtils.isBlank(attendanceTimetable.getPmSignOutAfterTerm()) || StringUtils.isBlank(attendanceTimetable.getPmSignOutFrontTerm())) {
|
||||
if (attendanceTimetable.getPmSignOut().compareTo(time) <= 0) {
|
||||
attendance.setSignState(1); // 正常
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
} else {
|
||||
|
||||
if (attendanceTimetable.getPmSignOut().compareTo(time) <= 0) {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getPmSignOutAfterTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getPmSignOut(), attendanceTimetable.getPmSignOutAfterTerm(), signNumType, time, 0);
|
||||
if (!istrueterm) {
|
||||
System.out.println("您签到时间超过打卡时间区间 请不要再打!");
|
||||
return ResultBean.fireFail().setMsg("您签到时间超过打卡时间区间 请不要再打!");
|
||||
} else {
|
||||
// 正常
|
||||
attendance.setSignState(1);
|
||||
}
|
||||
} else {
|
||||
// 正常
|
||||
attendance.setSignState(1);
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getPmSignOutFrontTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getPmSignOut(), attendanceTimetable.getPmSignOutFrontTerm(), signNumType, time, 1);
|
||||
if (!istrueterm) {
|
||||
System.out.println("您没在打卡时间区间内 请稍后再打!");
|
||||
return ResultBean.fireFail().setMsg("您没在打卡时间区间内 请稍后再打!");
|
||||
} else {
|
||||
attendance.setSignState(3); //早退
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
attendance.setOvTimeThis(0.0);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0 : lastAttend.getOvTimeSum());
|
||||
}
|
||||
} else if (attendanceSignType.getType() == 2) { // 4次签到
|
||||
if (signNumType == 1) { // 上午签到
|
||||
//判断是否设置打卡前期限或者打卡后期限,如果设置则不能打卡
|
||||
if (StringUtils.isBlank(attendanceTimetable.getAmSignInAfterTerm()) || StringUtils.isBlank(attendanceTimetable.getAmSignOutAfterTerm())) {
|
||||
if ((attendanceTimetable.getAmSignIn().substring(0, attendanceTimetable.getAmSignIn().length() - 1) + "1").compareTo(time) < 0) {
|
||||
attendance.setSignState(2);
|
||||
} else {
|
||||
attendance.setSignState(1);
|
||||
}
|
||||
} else {
|
||||
//判断是打卡前期限还是打卡后期限
|
||||
if ((attendanceTimetable.getAmSignIn().substring(0, attendanceTimetable.getAmSignIn().length() - 1) + "1").compareTo(time) < 0) {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getAmSignInAfterTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getAmSignIn(), attendanceTimetable.getAmSignInAfterTerm(), signNumType, time, 0);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您签到时间超过打卡时间区间 请不要再打!" + 1);
|
||||
return ResultBean.fireFail().setMsg("您签到时间超过打卡时间区间 请不要再打!");
|
||||
} else {
|
||||
attendance.setSignState(2); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(2);
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getAmSignInFrontTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getAmSignIn(), attendanceTimetable.getAmSignInFrontTerm(), signNumType, time, 1);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您没在打卡时间区间内 请稍后再打!" + 2);
|
||||
return ResultBean.fireFail().setMsg("您没在打卡时间区间内 请稍后再打!");
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (signNumType == 2) {
|
||||
// 上午签退
|
||||
//判断是否设置打卡前期限或者打卡后期限,如果设置则不能打卡
|
||||
if (StringUtils.isBlank(attendanceTimetable.getAmSignOutAfterTerm()) || StringUtils.isBlank(attendanceTimetable.getAmSignOutFrontTerm())) {
|
||||
if (attendanceTimetable.getAmSignOut().compareTo(time) <= 0) {
|
||||
attendance.setSignState(1); // 正常
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
|
||||
} else {
|
||||
//判断是打卡前期限还是打卡后期限
|
||||
if (attendanceTimetable.getAmSignOut().compareTo(time) <= 0) {
|
||||
//正常
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getAmSignOutAfterTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getAmSignOut(), attendanceTimetable.getAmSignOutAfterTerm(), signNumType, time, 0);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您签到时间超过打卡时间区间 请不要再打!" + 1);
|
||||
return ResultBean.fireFail().setMsg("您签到时间超过打卡时间区间 请不要再打!");
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getAmSignOutFrontTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getAmSignOut(), attendanceTimetable.getAmSignOutFrontTerm(), signNumType, time, 1);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您没在打卡时间区间内 请稍后再打!" + 2);
|
||||
return ResultBean.fireFail().setMsg("您没在打卡时间区间内 请稍后再打!");
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
}
|
||||
}
|
||||
attendance.setOvTimeThis(0.0);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0 : lastAttend.getOvTimeSum());
|
||||
} else if (signNumType == 3) {
|
||||
// 下午签到
|
||||
//判断是否设置打卡前期限或者打卡后期限,如果设置则不能打卡
|
||||
if (StringUtils.isBlank(attendanceTimetable.getPmSignInFrontTerm()) || StringUtils.isBlank(attendanceTimetable.getPmSignInFrontTerm())) {
|
||||
if ((attendanceTimetable.getPmSignIn().substring(0, attendanceTimetable.getPmSignIn().length() - 1) + "1").compareTo(time) < 0) {
|
||||
attendance.setSignState(2); // 迟到
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
//判断是打卡前期限还是打卡后期限
|
||||
if ((attendanceTimetable.getPmSignIn().substring(0, attendanceTimetable.getPmSignIn().length() - 1) + "1").compareTo(time) < 0) {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getPmSignInAfterTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getPmSignIn(), attendanceTimetable.getPmSignInAfterTerm(), signNumType, time, 0);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您签到时间超过打卡时间区间 请不要再打!" + 1);
|
||||
return ResultBean.fireFail().setMsg("您签到时间超过打卡时间区间 请不要再打!");
|
||||
} else {
|
||||
attendance.setSignState(2); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(2);//迟到
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getPmSignInFrontTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getPmSignIn(), attendanceTimetable.getPmSignInFrontTerm(), signNumType, time, 1);
|
||||
if (!istrueterm) {
|
||||
System.out.println("打开的结果:您没在打卡时间区间内 请稍后再打!" + 2);
|
||||
return ResultBean.fireFail().setMsg("您没在打卡时间区间内 请稍后再打!");
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
}
|
||||
}
|
||||
attendance.setOvTimeThis(0.0);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0 : lastAttend.getOvTimeSum());
|
||||
} else if (signNumType == 4) { // 下午签退
|
||||
if (StringUtils.isBlank(attendanceTimetable.getPmSignOutAfterTerm()) || StringUtils.isBlank(attendanceTimetable.getPmSignOutFrontTerm())) {
|
||||
if (attendanceTimetable.getPmSignOut().compareTo(time) <= 0) {
|
||||
attendance.setSignState(1); // 正常
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
} else {
|
||||
if (attendanceTimetable.getPmSignOut().compareTo(time) <= 0) {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getPmSignOutAfterTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getPmSignOut(), attendanceTimetable.getPmSignOutAfterTerm(), signNumType, time, 0);
|
||||
if (!istrueterm) {
|
||||
System.out.println("您签到时间超过打卡时间区间 请不要再打!");
|
||||
return ResultBean.fireFail().setMsg("您签到时间超过打卡时间区间 请不要再打!");
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(1); // 正常
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(attendanceTimetable.getPmSignOutFrontTerm())) {
|
||||
Boolean istrueterm = istrueterm(attendanceTimetable.getPmSignOut(), attendanceTimetable.getPmSignOutFrontTerm(), signNumType, time, 1);
|
||||
if (!istrueterm) {
|
||||
System.out.println("您没在打卡时间区间内 请稍后再打!");
|
||||
return ResultBean.fireFail().setMsg("您没在打卡时间区间内 请稍后再打!");
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
} else {
|
||||
attendance.setSignState(3); // 早退
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
attendance.setOvTimeThis(0.0);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0 : lastAttend.getOvTimeSum());
|
||||
}
|
||||
}
|
||||
if (null != attendanceErrand) {
|
||||
attendance.setSignDestDlwz(attendanceErrand.getDestDlwz());
|
||||
}
|
||||
}
|
||||
attendanceService.save(attendance);
|
||||
//更新统计表
|
||||
Map<String, Object> m = new HashMap<String, Object>();
|
||||
m.put("dwSid", dwSid);
|
||||
m.put("userSid", userSid);
|
||||
m.put("year", year);
|
||||
m.put("month", month);
|
||||
AttendStatistics attendanceStatistics = attendStatisticsService.selectByUserSid(m);
|
||||
if (null == attendanceStatistics) {
|
||||
attendanceStatistics = new AttendStatistics();
|
||||
// 全月天数
|
||||
double allDay = DateUtils.getMonthLastDay(Integer.valueOf(date.substring(0, 4)), Integer.valueOf(date.substring(5, 7)));
|
||||
// 休假天数
|
||||
double vacationDay = 0.00;
|
||||
// 加班天数
|
||||
double overtimeDay = 0.00;
|
||||
// 差旅天数
|
||||
double tripDay = 0.00;
|
||||
// 计算公休天数
|
||||
double holidayNum = 0;
|
||||
String holidays = attendHolidaySetService.getDaysByMonth(m);
|
||||
if (!StringUtils.isEmpty(holidays)) {
|
||||
String[] strings = holidays.split(",");
|
||||
if (strings.length > 0) {
|
||||
for (int k = 0; k < strings.length; k++) {
|
||||
int temp = Integer.parseInt(strings[k]);
|
||||
if (temp > 0 && temp <= 31) {
|
||||
holidayNum += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 计算全勤天数(全月天数-公休天数)
|
||||
double allAttendanceDay = allDay - holidayNum;
|
||||
// 出勤天数
|
||||
double attendanceDay = calAttendanceDay(userSid, date, Integer.valueOf(qdlx), attendanceSignType.getType());
|
||||
// 缺勤天数(初始化是同全勤天数)
|
||||
double absenceDay = allAttendanceDay - attendanceDay;
|
||||
// 应签次数:根据全勤天数*签卡次数(2次或4次)
|
||||
int supposedNum = attendanceSignType.getType() * 2 * (new Double(allAttendanceDay)).intValue();
|
||||
// 正常、早退、迟到次数、:初始化1或0
|
||||
// 漏签次数:初始化是同应签次数,工作日有签到、签退即-1;
|
||||
int missNum = supposedNum;
|
||||
int normalNum = 0;
|
||||
int lateNum = 0;
|
||||
int earlyNum = 0;
|
||||
if (attendance.getSignState() == 1) {
|
||||
normalNum = 1;
|
||||
lateNum = 0;
|
||||
earlyNum = 0;
|
||||
missNum = missNum - 1;
|
||||
} else if (attendance.getSignState() == 2) {
|
||||
normalNum = 0;
|
||||
lateNum = 1;
|
||||
earlyNum = 0;
|
||||
missNum = missNum - 1;
|
||||
} else if (attendance.getSignState() == 3) {
|
||||
normalNum = 0;
|
||||
lateNum = 0;
|
||||
earlyNum = 1;
|
||||
missNum = missNum - 1;
|
||||
} else if (attendance.getSignState() == 4) { // 4、外勤5、差旅6、加班7、休假
|
||||
attendanceStatistics.setOutNum(1);
|
||||
missNum = missNum - 1;
|
||||
} else if (attendance.getSignState() == 5) { // 4、外勤5、差旅6、加班7、休假
|
||||
attendanceStatistics.setTripNum(1);
|
||||
missNum = missNum - 1;
|
||||
} else if (attendance.getSignState() == 6) { // 4、外勤5、差旅6、加班7、休假
|
||||
if (attendance.getSignNumType() == 6) { // 加班签退
|
||||
/* 计算加班天数时,不足半小时不计,超过半小时按1小时计,也就是说,加班天数最短1小时,为0.125天,
|
||||
也就是说,加班天数只有0.125天、0.25天、0.375天、0.5天等,依此类推。 */
|
||||
// 计算加班时长
|
||||
Attendance attendance2 = attendanceService.checkBySignNumType(userSid, date, 5);
|
||||
if (null != attendance2) {
|
||||
String signTime5 = attendance2.getSignTime();
|
||||
double diffHour = DateUtils.dateDiff1(signTime5, attendance.getSignTime());
|
||||
if (diffHour < 0.5) {
|
||||
overtimeDay = 0;
|
||||
} else {
|
||||
for (int i = 0; i <= 24; i++) {
|
||||
if (diffHour >= (i - 0.5) && diffHour < (i + 0.5)) {
|
||||
overtimeDay = i * 0.125;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
attendanceStatistics.setOvTimeNum(1);
|
||||
attendanceStatistics.setOvertimeDay(overtimeDay);
|
||||
}
|
||||
} else if (attendance.getSignState() == 7) { // 4、外勤5、差旅6、加班7、休假
|
||||
attendanceStatistics.setVacationNum(1);
|
||||
missNum = missNum - 1;
|
||||
}
|
||||
// 差旅、外勤次数:根据打卡状态判断去+1
|
||||
attendanceStatistics.setDwSid(dwSid);
|
||||
attendanceStatistics.setUserSid(userSid);
|
||||
attendanceStatistics.setYear(year);
|
||||
attendanceStatistics.setMonth(month);
|
||||
attendanceStatistics.setAllDay(allDay);
|
||||
attendanceStatistics.setAllAttendanceDay(allAttendanceDay);
|
||||
attendanceStatistics.setAttendanceDay(attendanceDay);
|
||||
attendanceStatistics.setOvertimeDay(overtimeDay);
|
||||
attendanceStatistics.setTripDay(tripDay);
|
||||
attendanceStatistics.setVacationDay(vacationDay);
|
||||
attendanceStatistics.setAbsenceDay(absenceDay);
|
||||
attendanceStatistics.setSupposedNum(supposedNum);
|
||||
attendanceStatistics.setNormalNum(normalNum);
|
||||
attendanceStatistics.setLateNum(lateNum);
|
||||
attendanceStatistics.setEarlyNum(earlyNum);
|
||||
attendanceStatistics.setMissNum(missNum);
|
||||
if (deptuser == null) {
|
||||
attendanceStatistics.setDeptPath("");
|
||||
} else {
|
||||
if (StringUtils.isEmpty(deptuser.getDepartmentName())) {
|
||||
attendanceStatistics.setDeptPath("");
|
||||
} else {
|
||||
attendanceStatistics.setDeptPath(deptuser.getDepartmentName());
|
||||
}
|
||||
}
|
||||
attendStatisticsService.save(attendanceStatistics);
|
||||
} else {
|
||||
// 出勤天数
|
||||
double attendanceDay = calAttendanceDay(userSid, date, Integer.valueOf(qdlx), attendanceSignType.getType());
|
||||
attendanceStatistics.setAttendanceDay(attendanceStatistics.getAttendanceDay() + attendanceDay);
|
||||
// 缺勤天数
|
||||
attendanceStatistics.setAbsenceDay(attendanceStatistics.getAbsenceDay() - attendanceDay);
|
||||
// 加班天数
|
||||
double overtimeDay = 0.00;
|
||||
|
||||
// 差旅、外勤次数:根据打卡状态判断去+1
|
||||
if (attendance.getSignState() == 1) { // 1、正常2、迟到3、早退
|
||||
attendanceStatistics.setNormalNum(attendanceStatistics.getNormalNum() + 1);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
} else if (attendance.getSignState() == 2) {
|
||||
attendanceStatistics.setLateNum(attendanceStatistics.getLateNum() + 1);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
} else if (attendance.getSignState() == 3) {
|
||||
attendanceStatistics.setEarlyNum(attendanceStatistics.getEarlyNum() + 1);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
} else if (attendance.getSignState() == 4) { // 4、外勤5、差旅6、加班7、休假
|
||||
attendanceStatistics.setOutNum(attendanceStatistics.getOutNum() + 1);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
} else if (attendance.getSignState() == 5) { // 4、外勤5、差旅6、加班7、休假
|
||||
attendanceStatistics.setTripNum(attendanceStatistics.getTripNum() + 1);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
} else if (attendance.getSignState() == 6) { // 4、外勤5、差旅6、加班7、休假
|
||||
if (attendance.getSignNumType() == 6) { // 加班签退
|
||||
// 计算加班时长
|
||||
Attendance attendance2 = attendanceService.checkBySignNumType(userSid, date, 5);
|
||||
if (null != attendance2) {
|
||||
String signTime5 = attendance2.getSignTime();
|
||||
double diffHour = DateUtils.dateDiff1(signTime5, attendance.getSignTime());
|
||||
/*计算加班天数时,不足半小时不计,超过半小时按1小时计,也就是说,加班天数最短1小时,为0.125天,
|
||||
也就是说,加班天数只有0.125天、0.25天、0.375天、0.5天等,依此类推。
|
||||
*/
|
||||
// 小时折算天数
|
||||
if (diffHour < 0.5) {
|
||||
overtimeDay = 0;
|
||||
} else {
|
||||
for (int i = 0; i <= 24; i++) {
|
||||
if (diffHour >= (i - 0.5) && diffHour < (i + 0.5)) {
|
||||
overtimeDay = i * 0.125;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
attendanceStatistics.setOvTimeNum(attendanceStatistics.getOvTimeNum() + 1);
|
||||
attendanceStatistics.setOvertimeDay(attendanceStatistics.getOvertimeDay() + overtimeDay);
|
||||
}
|
||||
} else if (attendance.getSignState() == 7) { // 4、外勤5、差旅6、加班7、休假
|
||||
attendanceStatistics.setVacationNum(attendanceStatistics.getVacationNum() + 1);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
}
|
||||
attendStatisticsService.updateById(attendanceStatistics);
|
||||
}
|
||||
} else {
|
||||
return ResultBean.fireFail().setMsg("该设备不属于您所属的单位!");
|
||||
}
|
||||
|
||||
return ResultBean.fireSuccess().setMsg("操作成功!");
|
||||
|
||||
}
|
||||
|
||||
|
||||
//加班签到打卡
|
||||
|
||||
//公休
|
||||
|
||||
public Attendance selectAttendance(String userSid, int qdlx, Date today) {
|
||||
// 查询本次是否有自动签到,有的话则删除
|
||||
Map<String, Object> curMap = new HashMap<String, Object>();
|
||||
curMap.put("userSid", userSid);
|
||||
curMap.put("day", DateUtils.dateConvertStr(today, "yyyy-MM-dd"));
|
||||
curMap.put("signNumType", qdlx);
|
||||
curMap.put("isAuto", "1");
|
||||
Attendance curAttendance = attendanceService.selectBySignTime(curMap);
|
||||
return curAttendance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新签到统计表
|
||||
*
|
||||
* @param app2AttendQuery 参数
|
||||
* @return
|
||||
*/
|
||||
public boolean updateStatistics(App2AttendQuery app2AttendQuery) {
|
||||
//单位sid
|
||||
String dwSid = app2AttendQuery.getDwSid();
|
||||
//用户sid
|
||||
String userSid = app2AttendQuery.getUserSid();
|
||||
//年
|
||||
String year = app2AttendQuery.getYear();
|
||||
//月
|
||||
String month = app2AttendQuery.getMonth();
|
||||
String date = app2AttendQuery.getDate();
|
||||
Attendance curAttendance = app2AttendQuery.getAttendance();
|
||||
// 打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休9、离职10、入职
|
||||
int signState = curAttendance.getSignState();
|
||||
// 签到统计表操作:更改统计数字
|
||||
Map<String, Object> m1 = new HashMap<>();
|
||||
m1.put("dwSid", dwSid);
|
||||
m1.put("userSid", userSid);
|
||||
m1.put("year", year);
|
||||
m1.put("month", month);
|
||||
AttendStatistics attendanceStatistics1 = attendStatisticsService.selectByUserSid(m1);
|
||||
if (signState == 4) {
|
||||
attendanceStatistics1.setOutNum(attendanceStatistics1.getOutNum() - 1);
|
||||
attendanceStatistics1.setMissNum(attendanceStatistics1.getMissNum() + 1);
|
||||
} else if (signState == 5) {
|
||||
attendanceStatistics1.setTripNum(attendanceStatistics1.getTripNum() - 1);
|
||||
attendanceStatistics1.setMissNum(attendanceStatistics1.getMissNum() + 1);
|
||||
} else if (signState == 7) {
|
||||
attendanceStatistics1.setVacationNum(attendanceStatistics1.getVacationNum() - 1);
|
||||
attendanceStatistics1.setMissNum(attendanceStatistics1.getMissNum() + 1);
|
||||
}
|
||||
// 出勤天数
|
||||
double attendanceDay = calAttendanceDay(userSid, date, curAttendance.getSignNumType(), curAttendance.getSignType());
|
||||
// 出勤天数
|
||||
attendanceStatistics1.setAttendanceDay(attendanceStatistics1.getAttendanceDay() - attendanceDay);
|
||||
// 缺勤天数
|
||||
attendanceStatistics1.setAbsenceDay(attendanceStatistics1.getAbsenceDay() + attendanceDay);
|
||||
boolean isUpdated = attendStatisticsService.updateById(attendanceStatistics1);
|
||||
return isUpdated;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 计算出勤天数:以0.5天为单位计算
|
||||
* 四次打卡:每半天签到签退一次,加0.5天,如半天两次打卡不完整则不计天数,如只打两头,则不计天数
|
||||
*
|
||||
* @param userSid 用户sid
|
||||
* @param today 日期
|
||||
* @param signNumType 1、上午签到,2、上午签退,3、下午签到,4、下午签退
|
||||
* @param type 1、2次签卡 2、4次签卡
|
||||
* @return
|
||||
*/
|
||||
public double calAttendanceDay(String userSid, String today, int signNumType, int type) {
|
||||
double attendanceDay = 0;
|
||||
if (type == 1) {
|
||||
if (signNumType == 4) {
|
||||
Attendance attendance = attendanceService.checkBySignNumType(userSid, today, 1);
|
||||
if (null != attendance) {
|
||||
attendanceDay = 1;
|
||||
}
|
||||
} else if (signNumType == 1) {
|
||||
Attendance attendance = attendanceService.checkBySignNumType(userSid, today, 4);
|
||||
if (null != attendance) {
|
||||
attendanceDay = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Attendance attendance = null;
|
||||
if (signNumType == 1) {
|
||||
attendance = attendanceService.checkBySignNumType(userSid, today, 2);
|
||||
} else if (signNumType == 2) {
|
||||
attendance = attendanceService.checkBySignNumType(userSid, today, 1);
|
||||
} else if (signNumType == 3) {
|
||||
attendance = attendanceService.checkBySignNumType(userSid, today, 4);
|
||||
} else if (signNumType == 4) {
|
||||
attendance = attendanceService.checkBySignNumType(userSid, today, 3);
|
||||
}
|
||||
if (null != attendance) {
|
||||
attendanceDay = 0.5;
|
||||
}
|
||||
}
|
||||
return attendanceDay;
|
||||
}
|
||||
|
||||
//根据期限设置以及签到时间判断能否打卡
|
||||
public Boolean istrueterm(String sign, String term, int signNumType, String time, int ischidao) {
|
||||
Boolean b = true;
|
||||
//将设置的时间转化为分钟并于设置签到时间对比得到正确时间
|
||||
Double aDouble = Double.valueOf(term);
|
||||
double v = aDouble * 60;
|
||||
int timeterm = new Double(v).intValue();
|
||||
//将签到时间转换为分钟
|
||||
int timeqiandao = Integer.valueOf(sign.substring(0, 2)) * 60 + Integer.valueOf(sign.substring(3, 5));
|
||||
//根据打卡类型计算两个时间得到签到时间
|
||||
int timeend = 0;
|
||||
if (ischidao == 0) {
|
||||
timeend = timeqiandao + timeterm;
|
||||
} else {
|
||||
timeend = timeqiandao - timeterm;
|
||||
}
|
||||
String resultStr = "";
|
||||
//将分钟转成小时
|
||||
if (timeend != 0) {
|
||||
if (timeend / 60 == 0) {
|
||||
resultStr = "00:" + timeend % 60;
|
||||
} else {
|
||||
if (timeend % 60 == 0) {
|
||||
resultStr = timeend / 60 + ":00";
|
||||
} else {
|
||||
resultStr = (timeend / 60 + ":" + timeend % 60);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
resultStr = "00:00";
|
||||
}
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm");
|
||||
Date dateTime = null;
|
||||
try {
|
||||
dateTime = simpleDateFormat.parse(resultStr);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String resultTime = DateUtils.dateConvertStr(dateTime, "HH:mm");
|
||||
System.out.println(resultTime);
|
||||
//根据迟到或早退来判断是否能继续打卡
|
||||
if (ischidao == 0) {
|
||||
if (resultTime.compareTo(time) < 0) {
|
||||
b = false;
|
||||
}
|
||||
} else {
|
||||
if (resultTime.compareTo(time) > 0) {
|
||||
b = false;
|
||||
}
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
package com.yxt.attend.biz.appattend;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/8/2 13:41
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class AttendanceCronAutoStart implements CommandLineRunner {
|
||||
|
||||
@Autowired
|
||||
private AttendanceScheduleTask attendanceScheduleTask;
|
||||
|
||||
private HttpServletRequest request;
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
attendanceScheduleTask.startCron(request);
|
||||
System.out.println("考勤定时任务启动啦。撒花撒花");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.yxt.attend.biz.appattend;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Configurable;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.yxt.attend.api.attendance.Attendance;
|
||||
import com.yxt.attend.api.attendstatistics.AttendStatistics;
|
||||
import com.yxt.attend.biz.attendance.AttendanceService;
|
||||
import com.yxt.attend.biz.attenderrand.AttendErrandService;
|
||||
import com.yxt.attend.biz.attendholiday.AttendHolidaySetService;
|
||||
import com.yxt.attend.biz.attendsigntype.AttendSignTypeService;
|
||||
import com.yxt.attend.biz.attendstatistics.AttendStatisticsService;
|
||||
import com.yxt.attend.biz.attendtimetable.AttendTimetableService;
|
||||
import com.yxt.common.base.utils.DateUtils;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.jlzx.system.api.department.DepartmentApi;
|
||||
import com.yxt.jlzx.system.api.department.QrCodeVo;
|
||||
import com.yxt.jlzx.system.api.user.UserApi;
|
||||
import com.yxt.jlzx.system.api.user.UserInfoVo;
|
||||
|
||||
/**
|
||||
* 加班签退、签到
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
@Configurable
|
||||
@EnableScheduling
|
||||
public class AttendanceOvTimeScheduler {
|
||||
|
||||
/**
|
||||
* 考勤签到信息
|
||||
*/
|
||||
@Autowired
|
||||
private AttendanceService attendanceService;
|
||||
/**
|
||||
* 休假、差旅、外勤申请单
|
||||
*/
|
||||
@Autowired
|
||||
private AttendErrandService attendanceErrandService;
|
||||
|
||||
/**
|
||||
* 考勤统计数据
|
||||
*/
|
||||
@Autowired
|
||||
private AttendStatisticsService attendanceStatisticsService;
|
||||
/**
|
||||
* 公休日
|
||||
*/
|
||||
@Autowired
|
||||
private AttendHolidaySetService attendanceHolidaySetService;
|
||||
/**
|
||||
* 签卡方式
|
||||
*/
|
||||
@Autowired
|
||||
private AttendSignTypeService attendanceSignTypeService;
|
||||
/**
|
||||
* 作息时间
|
||||
*/
|
||||
@Autowired
|
||||
private AttendTimetableService attendanceTimetableService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private DepartmentApi departmentApi;
|
||||
|
||||
@Autowired
|
||||
private UserApi userApi;
|
||||
|
||||
/**
|
||||
* 已取消,改为实时更新
|
||||
* 差旅、外勤未打卡每天凌晨(5秒)补充加班签到签退未打卡数据
|
||||
*/
|
||||
@Transactional
|
||||
@Scheduled(cron = "0 4 16 * * ?")
|
||||
public void insertAttendance(){
|
||||
Date date = new Date();
|
||||
String today = DateUtils.dateConvertStr(date, "yyyy-MM-dd");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||
date = (Date) calendar.getTime();
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String yesterday = df.format(date);
|
||||
List<Attendance> ovTimeList = attendanceService.selectOvTime("", yesterday);
|
||||
for (Attendance attend : ovTimeList) {
|
||||
attend.setOvTimeIsEnd(1);
|
||||
attendanceService.updateById(attend);
|
||||
Attendance attendance = new Attendance();
|
||||
BeanUtils.copyProperties(attend, attendance);
|
||||
UserInfoVo user = userApi.selectBysid(attend.getUserSid()).getData();
|
||||
QrCodeVo deptuser = departmentApi.queryByStaffSid(user.getStaffSid()).getData();
|
||||
|
||||
if(deptuser == null) {
|
||||
attendance.setDeptPath("");
|
||||
}else {
|
||||
if(StringUtils.isEmpty(deptuser.getDepartmentName())) {
|
||||
attendance.setDeptPath("");
|
||||
}else {
|
||||
attendance.setDeptPath(deptuser.getDepartmentName());
|
||||
}
|
||||
}
|
||||
// 计算加班时长
|
||||
double overtimeDay = 0.00;
|
||||
String signTime5 = attend.getSignTime();
|
||||
String signTime = "23:59"; // 系统默认
|
||||
double diffHour = DateUtils.dateDiff1(signTime5, signTime);
|
||||
if(diffHour < 0.5) {
|
||||
overtimeDay = 0;
|
||||
}else {
|
||||
for (int i = 0; i <= 24; i++) {
|
||||
if(diffHour>=(i-0.5) && diffHour<(i+0.5)) {
|
||||
overtimeDay = i * 0.125;
|
||||
}
|
||||
}
|
||||
}
|
||||
attendance.setOvTimeIsEnd(1);
|
||||
attendance.setIsAuto("1");
|
||||
attendance.setOvTimeThis(overtimeDay);
|
||||
Attendance lastAttend = attendanceService.selectLastByDay(attend.getUserSid(), yesterday);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0:lastAttend.getOvTimeSum()+overtimeDay);
|
||||
attendance.setSignTime(signTime);
|
||||
attendance.setSignNumType(6);
|
||||
attendance.setSid(UUID.randomUUID().toString());
|
||||
// 插入昨天加班签退
|
||||
attendanceService.insert(attendance);
|
||||
// 签到统计表操作
|
||||
Map<String, Object> m = new HashMap<String, Object>();
|
||||
m.put("dwSid", attend.getDwSid());
|
||||
m.put("userSid", attend.getUserSid());
|
||||
m.put("year", DateUtils.dateConvertStr(date, "yyyy"));
|
||||
m.put("month", DateUtils.dateConvertStr(date, "MM"));
|
||||
AttendStatistics attendanceStatistics = attendanceStatisticsService.selectByUserSid(m);
|
||||
attendanceStatistics.setOvTimeNum(attendanceStatistics.getOvTimeNum()+1);
|
||||
attendanceStatistics.setOvertimeDay(attendanceStatistics.getOvertimeDay()+overtimeDay);
|
||||
attendanceStatisticsService.updateById(attendanceStatistics);
|
||||
// 插入今天加班签到
|
||||
signTime = "00:00";
|
||||
attendance.setYear(today.substring(0,4));
|
||||
attendance.setMonth(today.substring(5, 7));
|
||||
attendance.setDay(today);
|
||||
attendance.setSignTime(signTime);
|
||||
attendance.setSignNumType(5);
|
||||
attendance.setOvTimeIsEnd(0);
|
||||
attendance.setOvTimeThis(0.0);
|
||||
attendance.setOvTimeSum(0.0);
|
||||
attendance.setSid(UUID.randomUUID().toString());
|
||||
attendanceService.insert(attendance);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,424 @@
|
||||
package com.yxt.attend.biz.appattend;
|
||||
|
||||
import com.yxt.attend.api.attendance.Attendance;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrand;
|
||||
import com.yxt.attend.api.attendholiday.AttendHolidaySet;
|
||||
import com.yxt.attend.api.attendholiday.AttendHolidaySetQuery;
|
||||
import com.yxt.attend.api.attendschedule.AttendSchedule;
|
||||
import com.yxt.attend.api.attendsigntype.AttendSignType;
|
||||
import com.yxt.attend.api.attendstatistics.AttendStatistics;
|
||||
import com.yxt.attend.api.attendtimetable.AttendTimetable;
|
||||
import com.yxt.attend.biz.attendance.AttendanceService;
|
||||
import com.yxt.attend.biz.attenderrand.AttendErrandService;
|
||||
import com.yxt.attend.biz.attendholiday.AttendHolidaySetService;
|
||||
import com.yxt.attend.biz.attendschedule.AttendScheduleService;
|
||||
import com.yxt.attend.biz.attendsigntype.AttendSignTypeService;
|
||||
import com.yxt.attend.biz.attendstatistics.AttendStatisticsService;
|
||||
import com.yxt.attend.biz.attendtimetable.AttendTimetableService;
|
||||
import com.yxt.common.base.utils.DateUtils;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.jlzx.system.api.department.DepartmentApi;
|
||||
import com.yxt.jlzx.system.api.department.QrCodeVo;
|
||||
import com.yxt.jlzx.system.api.departmentstaff.DepartmentStaffApi;
|
||||
import com.yxt.jlzx.system.api.user.UserApi;
|
||||
import com.yxt.jlzx.system.api.user.UserInfoVo;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
import org.springframework.scheduling.support.CronTrigger;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/24 11:24
|
||||
* @description
|
||||
*/
|
||||
@ComponentScan
|
||||
@RestController
|
||||
@RequestMapping("/attendanceScheduleTask")
|
||||
public class AttendanceScheduleTask {
|
||||
|
||||
@Autowired
|
||||
private AttendScheduleService attendScheduleService;
|
||||
@Autowired
|
||||
private ThreadPoolTaskScheduler threadPoolTaskScheduler;
|
||||
@Autowired
|
||||
private UserApi userApi;
|
||||
@Autowired
|
||||
private AttendTimetableService attendTimetableService;
|
||||
@Autowired
|
||||
private AttendSignTypeService attendSignTypeService;
|
||||
@Autowired
|
||||
private AttendErrandService attendErrandService;
|
||||
@Autowired
|
||||
private AttendanceService attendanceService;
|
||||
@Autowired
|
||||
private DepartmentStaffApi departmentStaffApi;
|
||||
@Autowired
|
||||
private AttendStatisticsService attendStatisticsService;
|
||||
@Autowired
|
||||
private AttendHolidaySetService attendanceHolidaySetService;
|
||||
@Autowired
|
||||
private DepartmentApi departmentApi;
|
||||
|
||||
private ScheduledFuture<?> future;
|
||||
|
||||
@Bean
|
||||
public ThreadPoolTaskScheduler threadPoolTaskScheduler() {
|
||||
return new ThreadPoolTaskScheduler();
|
||||
}
|
||||
|
||||
@Autowired(required = false)
|
||||
private HttpServletRequest request;
|
||||
|
||||
@PostMapping("/restart")
|
||||
public void restart() {
|
||||
stopCron();// 先停止,在开启.
|
||||
startCron(request);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/stopCron")
|
||||
public void stopCron() {
|
||||
if (future != null) {
|
||||
future.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/startCron")
|
||||
public void startCron(HttpServletRequest request) {
|
||||
List<AttendSchedule> list = attendScheduleService.listOne();
|
||||
List<String> cronList = new ArrayList<String>();
|
||||
for (AttendSchedule attendanceSchedule : list) {
|
||||
if (!StringUtils.isEmpty(attendanceSchedule.getAmSignInCron())) {
|
||||
cronList.add(attendanceSchedule.getAmSignInCron());
|
||||
}
|
||||
if (!StringUtils.isEmpty(attendanceSchedule.getAmSignOutCron())) {
|
||||
cronList.add(attendanceSchedule.getAmSignOutCron());
|
||||
}
|
||||
if (!StringUtils.isEmpty(attendanceSchedule.getPmSignInCron())) {
|
||||
cronList.add(attendanceSchedule.getPmSignInCron());
|
||||
}
|
||||
if (!StringUtils.isEmpty(attendanceSchedule.getPmSignOutCron())) {
|
||||
cronList.add(attendanceSchedule.getPmSignOutCron());
|
||||
}
|
||||
}
|
||||
for (String cron : cronList) {
|
||||
future = threadPoolTaskScheduler.schedule(new MyRunnable(), new CronTrigger(cron));
|
||||
}
|
||||
}
|
||||
|
||||
private class MyRunnable implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println("定时任务执行");
|
||||
insetAttendance();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加班签退
|
||||
*
|
||||
* @param signTime 签退时间
|
||||
* @param date 日期
|
||||
*/
|
||||
@Transactional
|
||||
public void insertOvTimeData(String dwSid, String signTime, String date) {
|
||||
List<Attendance> ovTimeList = attendanceService.selectOvTime(dwSid, date);
|
||||
for (Attendance attend : ovTimeList) {
|
||||
attend.setOvTimeIsEnd(1);
|
||||
attendanceService.updateById(attend);
|
||||
Attendance attendance = new Attendance();
|
||||
BeanUtils.copyProperties(attend, attendance);
|
||||
// 判断是否为公休日
|
||||
AttendHolidaySetQuery attendHolidaySetQuery = new AttendHolidaySetQuery();
|
||||
attendHolidaySetQuery.setDwSid(dwSid);
|
||||
attendHolidaySetQuery.setYear(date.substring(0, 4));
|
||||
attendHolidaySetQuery.setMonth(date.substring(5, 7));
|
||||
attendHolidaySetQuery.setDay(date.substring(8, 10));
|
||||
AttendHolidaySet holidaySet = attendanceHolidaySetService.checkByDay(attendHolidaySetQuery);
|
||||
if (null == holidaySet) {
|
||||
// 非公休日
|
||||
UserInfoVo user = userApi.selectBysid(attend.getUserSid()).getData();
|
||||
QrCodeVo deptuser = departmentApi.queryByStaffSid(user.getStaffSid()).getData();
|
||||
// DepartmentStaff deptuser = departmentStaffApi.selectByStaffSid(user.getStaffSid()).getData();
|
||||
if (deptuser == null) {
|
||||
attendance.setDeptPath("");
|
||||
} else {
|
||||
if (StringUtils.isEmpty(deptuser.getDepartmentName())) {
|
||||
attendance.setDeptPath("");
|
||||
} else {
|
||||
attendance.setDeptPath(deptuser.getDepartmentName());
|
||||
}
|
||||
}
|
||||
// 计算加班时长
|
||||
double overtimeDay = 0.00;
|
||||
String signTime5 = attend.getSignTime();
|
||||
double diffHour = DateUtils.dateDiff1(signTime5, signTime);
|
||||
if (diffHour < 0.5) {
|
||||
overtimeDay = 0;
|
||||
} else {
|
||||
for (int i = 0; i <= 24; i++) {
|
||||
if (diffHour >= (i - 0.5) && diffHour < (i + 0.5)) {
|
||||
overtimeDay = i * 0.125;
|
||||
}
|
||||
}
|
||||
}
|
||||
attendance.setOvTimeIsEnd(1);
|
||||
attendance.setIsAuto("1");
|
||||
attendance.setOvTimeThis(overtimeDay);
|
||||
Attendance lastAttend = attendanceService.selectLastByDay(attend.getUserSid(), date);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0 : lastAttend.getOvTimeSum() + overtimeDay);
|
||||
attendance.setSignTime(signTime);
|
||||
attendance.setSignNumType(6);
|
||||
attendanceService.save(attendance);
|
||||
// 签到统计表操作
|
||||
Map<String, Object> m = new HashMap<String, Object>();
|
||||
m.put("dwSid", attendance.getDwSid());
|
||||
m.put("userSid", attendance.getUserSid());
|
||||
m.put("year", attendance.getYear());
|
||||
m.put("month", attendance.getMonth());
|
||||
AttendStatistics attendanceStatistics = attendStatisticsService.selectByUserSid(m);
|
||||
attendanceStatistics.setOvTimeNum(attendanceStatistics.getOvTimeNum() + 1);
|
||||
attendanceStatistics.setOvertimeDay(attendanceStatistics.getOvertimeDay() + overtimeDay);
|
||||
attendStatisticsService.updateById(attendanceStatistics);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 根据单位设置的考勤时间插入相应的打卡记录
|
||||
private void insetAttendance() {
|
||||
Date date = new Date();
|
||||
String signTime = DateUtils.dateConvertStr(date, "HH:mm");
|
||||
String today = DateUtils.dateConvertStr(date, "yyyy-MM-dd");
|
||||
String nowTime = DateUtils.dateConvertStr(date, "yyyy-MM-dd HH:mm");
|
||||
List<AttendTimetable> list = attendTimetableService.selectBySignTime(signTime);
|
||||
for (AttendTimetable attendanceTimetable : list) {
|
||||
String dwSid = attendanceTimetable.getDwSid();
|
||||
|
||||
// 加班签退设置
|
||||
if (signTime.equals(attendanceTimetable.getAmSignIn())) {
|
||||
insertOvTimeData(dwSid, attendanceTimetable.getAmSignIn(), today);
|
||||
} else if (signTime.equals(attendanceTimetable.getPmSignIn())) {
|
||||
insertOvTimeData(dwSid, attendanceTimetable.getPmSignIn(), today);
|
||||
}
|
||||
|
||||
AttendSignType attendanceSignType = attendSignTypeService.check(dwSid, DateUtils.dateConvertStr(date, "yyyy-MM"));
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("dwSid", dwSid);
|
||||
map.put("nowTime", nowTime);
|
||||
//查询出当前时间所有有设置作息时间的单位
|
||||
List<AttendErrand> list2 = attendErrandService.selectByDwsidAndTime(map);
|
||||
for (AttendErrand attendanceErrand : list2) {
|
||||
// 有无打卡记录
|
||||
String userSid = attendanceErrand.getUserSid();
|
||||
int signNumType = 0;
|
||||
if (signTime.equals(attendanceTimetable.getAmSignIn().substring(0,5))) {
|
||||
signNumType = 1;
|
||||
} else if (signTime.equals(attendanceTimetable.getAmSignOut().substring(0,5))) {
|
||||
signNumType = 2;
|
||||
} else if (signTime.equals(attendanceTimetable.getPmSignIn().substring(0,5))) {
|
||||
signNumType = 3;
|
||||
} else if (signTime.equals(attendanceTimetable.getPmSignOut().substring(0,5))) {
|
||||
signNumType = 4;
|
||||
}
|
||||
Map<String, Object> m = new HashMap<String, Object>();
|
||||
m.put("userSid", userSid);
|
||||
m.put("day", today);
|
||||
m.put("signNumType", signNumType);
|
||||
Attendance attendance = attendanceService.selectBySignTime(m);
|
||||
if (null == attendance) { // 没有这条打卡记录
|
||||
// 出勤天数
|
||||
double attendanceDay = 0.0;
|
||||
// 差旅天数
|
||||
double tripDay = 0.00;
|
||||
// 差旅次数
|
||||
int tripNum = 0;
|
||||
// 外勤次数
|
||||
int outNum = 0;
|
||||
// 休假次数
|
||||
int vacationNum = 0;
|
||||
// 漏签次数
|
||||
int missNum = 0;
|
||||
attendance = new Attendance();
|
||||
attendance.setXm(attendanceErrand.getApplicant());
|
||||
attendance.setDwSid(dwSid);
|
||||
attendance.setUserSid(userSid);
|
||||
attendance.setYear(today.substring(0, 4));
|
||||
attendance.setMonth(today.substring(5, 7));
|
||||
attendance.setDay(today);
|
||||
attendance.setSignDestDlwz("");
|
||||
UserInfoVo u = userApi.selectBysid(userSid).getData();
|
||||
// DepartmentStaff departmentStaff = departmentStaffApi.selectByStaffSid(u.getStaffSid()).getData();
|
||||
QrCodeVo deptuser = departmentApi.queryByStaffSid(u.getStaffSid()).getData();
|
||||
if (deptuser == null) {
|
||||
attendance.setDeptPath("");
|
||||
} else {
|
||||
if (StringUtils.isEmpty(deptuser.getDepartmentName())) {
|
||||
attendance.setDeptPath("");
|
||||
} else {
|
||||
attendance.setDeptPath(deptuser.getDepartmentName());
|
||||
}
|
||||
}
|
||||
// attendanceErrand :type类型:1、差旅2、外勤3、休假
|
||||
// attendance :type类型:0、正常1、外勤2、差旅3、休假
|
||||
// attendance :signDest类型:1、单位2、外勤3、差旅4、休假
|
||||
// attendance :signState类型:打卡状态:1、正常2、迟到3、早退4、外勤5、差旅6、加班7、休假8、公休
|
||||
if (attendanceErrand.getType() == 1) {
|
||||
attendance.setType(2);
|
||||
attendance.setSignDest(3);
|
||||
attendance.setSignState(5);
|
||||
attendance.setSignDestDlwz(attendanceErrand.getDestDlwz());
|
||||
tripNum = 1;
|
||||
} else if (attendanceErrand.getType() == 2) {
|
||||
attendance.setType(1);
|
||||
attendance.setSignDest(2);
|
||||
attendance.setSignState(4);
|
||||
attendance.setSignDestDlwz(attendanceErrand.getDestDlwz());
|
||||
outNum = 1;
|
||||
} else if (attendanceErrand.getType() == 3) {
|
||||
attendance.setType(3);
|
||||
attendance.setSignDest(4);
|
||||
attendance.setSignState(7);
|
||||
attendance.setSignDestDlwz("");
|
||||
vacationNum = 1;
|
||||
}
|
||||
attendance.setSignType(attendanceSignType.getType()); // 打卡类型:1:2次,2:4次
|
||||
attendance.setSignTime(signTime);
|
||||
attendance.setSignDlwz(StringUtils.isEmpty(attendanceErrand.getDestDlwz()) ? "" : attendanceErrand.getDestDlwz());
|
||||
attendance.setSignNumType(signNumType);
|
||||
attendance.setDlxx("0.0,0.0"); // 暂时默认
|
||||
attendance.setIsAuto("1");
|
||||
attendance.setOvTimeIsEnd(1);
|
||||
// 最近一次打卡记录
|
||||
Attendance lastAttend = attendanceService.selectLastByDay(userSid, today);
|
||||
attendance.setOvTimeThis(0.0);
|
||||
attendance.setOvTimeSum(null == lastAttend ? 0.0 : lastAttend.getOvTimeSum());
|
||||
attendanceService.save(attendance);
|
||||
// 签到统计表操作
|
||||
if (attendanceSignType.getType() == 1) {
|
||||
if (signNumType == 4) {
|
||||
Attendance checkAttend = attendanceService.checkBySignNumType(userSid, today, 1);
|
||||
if (checkAttend != null) {
|
||||
attendanceDay = 1.0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (signNumType == 2) {
|
||||
Attendance checkAttend = attendanceService.checkBySignNumType(userSid, today, 1);
|
||||
if (checkAttend != null) {
|
||||
attendanceDay = 0.5;
|
||||
}
|
||||
} else if (signNumType == 4) {
|
||||
Attendance checkAttend = attendanceService.checkBySignNumType(userSid, today, 3);
|
||||
if (checkAttend != null) {
|
||||
attendanceDay = 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> mapTj = new HashMap<String, Object>();
|
||||
mapTj.put("dwSid", dwSid);
|
||||
mapTj.put("userSid", userSid);
|
||||
mapTj.put("year", today.substring(0, 4));
|
||||
mapTj.put("month", today.substring(5, 7));
|
||||
m.put("year", today.substring(0, 4));
|
||||
m.put("month", today.substring(5, 7));
|
||||
AttendStatistics attendanceStatistics = attendStatisticsService.selectByUserSid(m);
|
||||
if (null == attendanceStatistics) {
|
||||
attendanceStatistics = new AttendStatistics();
|
||||
// 全月天数
|
||||
double allDay = DateUtils.getMonthLastDay(Integer.valueOf(today.substring(0, 4)), Integer.valueOf(today.substring(5, 7)));
|
||||
// 休假天数
|
||||
double vacationDay = 0.00;
|
||||
// 加班天数
|
||||
double overtimeDay = 0.00;
|
||||
// 计算公休天数
|
||||
double holidayNum = 0;
|
||||
String holidays = attendanceHolidaySetService.getDaysByMonth(mapTj);
|
||||
if (!StringUtils.isEmpty(holidays)) {
|
||||
String[] strings = holidays.split(",");
|
||||
if (strings.length > 0) {
|
||||
for (int k = 0; k < strings.length; k++) {
|
||||
int temp = Integer.parseInt(strings[k]);
|
||||
if (temp > 0 && temp <= 31) {
|
||||
holidayNum += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 计算全勤天数(全月天数-公休天数)
|
||||
double allAttendanceDay = allDay - holidayNum;
|
||||
// 缺勤天数(初始化是同全勤天数)
|
||||
double absenceDay = allAttendanceDay - attendanceDay;
|
||||
// 应签次数:根据全勤天数*签卡次数(2次或4次)
|
||||
int supposedNum = attendanceSignType.getType() * 2 * (new Double(allAttendanceDay)).intValue();
|
||||
// 正常、早退、迟到次数、:初始化1或0
|
||||
// 漏签次数:初始化是同应签次数,工作日有签到、签退即-1;
|
||||
// int missNum = supposedNum;
|
||||
int normalNum = 0;
|
||||
int lateNum = 0;
|
||||
int earlyNum = 0;
|
||||
missNum = supposedNum - missNum;
|
||||
|
||||
// 差旅、外勤次数:根据打卡状态判断去+1
|
||||
attendanceStatistics.setDwSid(dwSid);
|
||||
attendanceStatistics.setUserSid(userSid);
|
||||
attendanceStatistics.setYear(today.substring(0, 4));
|
||||
attendanceStatistics.setMonth(today.substring(5, 7));
|
||||
attendanceStatistics.setAllDay(allDay);
|
||||
attendanceStatistics.setAllAttendanceDay(allAttendanceDay);
|
||||
attendanceStatistics.setAttendanceDay(attendanceDay);
|
||||
attendanceStatistics.setTripDay(tripDay);
|
||||
attendanceStatistics.setOvertimeDay(overtimeDay);
|
||||
attendanceStatistics.setVacationDay(vacationDay);
|
||||
attendanceStatistics.setAbsenceDay(absenceDay);
|
||||
attendanceStatistics.setSupposedNum(supposedNum);
|
||||
attendanceStatistics.setNormalNum(normalNum);
|
||||
attendanceStatistics.setLateNum(lateNum);
|
||||
attendanceStatistics.setEarlyNum(earlyNum);
|
||||
attendanceStatistics.setTripNum(tripNum);
|
||||
attendanceStatistics.setOutNum(outNum);
|
||||
attendanceStatistics.setVacationNum(vacationNum);
|
||||
attendanceStatistics.setMissNum(missNum - 1);
|
||||
if (deptuser == null) {
|
||||
attendanceStatistics.setDeptPath("");
|
||||
} else {
|
||||
if (StringUtils.isEmpty(deptuser.getDepartmentName())) {
|
||||
attendanceStatistics.setDeptPath("");
|
||||
} else {
|
||||
attendanceStatistics.setDeptPath(deptuser.getDepartmentName());
|
||||
}
|
||||
}
|
||||
attendStatisticsService.save(attendanceStatistics);
|
||||
} else {
|
||||
// 出勤天数
|
||||
attendanceStatistics.setAttendanceDay(attendanceStatistics.getAttendanceDay() + attendanceDay);
|
||||
// 缺勤天数
|
||||
attendanceStatistics.setAbsenceDay(attendanceStatistics.getAbsenceDay() - attendanceDay);
|
||||
// 差旅、外勤次数:根据打卡状态判断去+1
|
||||
if (attendanceErrand.getType() == 1) { // 差旅
|
||||
attendanceStatistics.setTripNum(attendanceStatistics.getTripNum() + tripNum);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
} else if (attendanceErrand.getType() == 2) { // 外勤
|
||||
attendanceStatistics.setOutNum(attendanceStatistics.getOutNum() + outNum);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
} else if (attendanceErrand.getType() == 3) { // 休假
|
||||
attendanceStatistics.setVacationNum(attendanceStatistics.getVacationNum() + vacationNum);
|
||||
attendanceStatistics.setMissNum(attendanceStatistics.getMissNum() - 1);
|
||||
}
|
||||
attendStatisticsService.updateById(attendanceStatistics);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,70 @@
|
||||
package com.yxt.attend.biz.attendance;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.attend.api.attendance.Attendance;
|
||||
import com.yxt.attend.api.attendance.AttendanceListOneVo;
|
||||
import com.yxt.attend.api.attendance.AttendanceQuery;
|
||||
import com.yxt.attend.api.attendance.AttendanceVo2;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 14:28
|
||||
* @description
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendanceMapper extends BaseMapper<Attendance> {
|
||||
|
||||
|
||||
public List<Attendance> selectOverTime(@Param("userSid") String userSid, @Param("day") String day, @Param("signNumType") String signNumType);
|
||||
|
||||
public List<Attendance> selectByRangeTime(@Param("map") Map<String, Object> map);
|
||||
|
||||
public List<Attendance> getCurDayInfo(@Param("map") Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 查询没有签退的加班记录
|
||||
*
|
||||
* @param dwSid
|
||||
* @param day
|
||||
* @return
|
||||
*/
|
||||
public List<Attendance> selectOvTime(@Param("dwSid") String dwSid, @Param("day") String day);
|
||||
|
||||
public Attendance selectLastByDay(@Param("userSid") String userSid, @Param("day") String day);
|
||||
|
||||
public Attendance selectBySignTime(@Param("map") Map<String, Object> map);
|
||||
|
||||
public Attendance checkBySignNumType(@Param("userSid") String userSid, @Param("day") String day, @Param("signNumType") int signNumType);
|
||||
|
||||
public List<Attendance> getSignBtnState(@Param("map") Map<String, Object> map);
|
||||
|
||||
public int updateBySidOne(@Param("sid") String sid, @Param("ovTimeIsEnd") Integer ovTimeIsEnd);
|
||||
|
||||
|
||||
public Attendance selectById(int id);
|
||||
|
||||
public Attendance queryByuserSid(@Param("usersid") String usersid, @Param("dwSid") String dwSid, @Param("dwlb") String dwlb, @Param("day") String day);
|
||||
|
||||
public IPage<AttendanceListOneVo> query(IPage<AttendanceQuery> page, @Param("Query") AttendanceQuery Query);
|
||||
|
||||
|
||||
public List<Attendance> getSignTime(Map<String, Object> map);
|
||||
|
||||
public String selectVersionByDay(@Param("dwSid") String dwSid, @Param("year") String year, @Param("month") String month);
|
||||
|
||||
|
||||
public IPage<AttendanceListOneVo> queryHistory(IPage<AttendanceQuery> page, @Param("Query") AttendanceQuery Query);
|
||||
|
||||
public List<AttendanceVo2> getByUserSid(@Param("map") Map<String, Object> map);
|
||||
|
||||
public AttendanceVo2 queryByuSidAndDay(@Param("usid") String usid, @Param("day") String day,@Param("signNumType") String signNumType);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.attend.biz.attendance.AttendanceMapper">
|
||||
<select id="getCurDayInfo" resultType="com.yxt.attend.api.attendance.Attendance" parameterType="map">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE userSid = #{map.userSid}
|
||||
AND day = #{map.curDay}
|
||||
<if test="map != null">
|
||||
<if test="map.signType != null">
|
||||
<if test='map.signType == "1"'>
|
||||
AND signNumType IN (1,4)
|
||||
</if>
|
||||
<if test='map.signType == "2"'>
|
||||
AND signNumType IN (1,2,3,4)
|
||||
</if>
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectOvTime" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE day = #{day}
|
||||
AND signNumType = 5
|
||||
AND ovTimeIsEnd = 0
|
||||
<if test='dwSid != null and dwSid !=""'>
|
||||
AND dwSid=#{dwSid}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectLastByDay" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE id = (SELECT MAX(id) FROM attendance WHERE userSid = #{userSid} AND day = #{day} ORDER BY id DESC)
|
||||
</select>
|
||||
|
||||
<select id="selectBySignTime" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE userSid = #{map.userSid}
|
||||
AND day = #{map.day}
|
||||
AND signNumType = #{map.signNumType}
|
||||
<if test="map != null">
|
||||
<if test='map.isAuto != null and map.isAuto != "" '>
|
||||
AND isAuto=#{map.isAuto}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="checkBySignNumType" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE userSid = #{userSid}
|
||||
AND day = #{day}
|
||||
AND signNumType = #{signNumType}
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
<select id="getSignBtnState" resultType="com.yxt.attend.api.attendance.Attendance" parameterType="map">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE userSid = #{map.userSid}
|
||||
AND day = #{map.curDay}
|
||||
AND signType = #{map.signType}
|
||||
<if test="map != null">
|
||||
<if test="map.signType != null">
|
||||
<if test='map.signType == "2"'>
|
||||
<if test="map.str != null">
|
||||
<if test='map.str == "1"'>
|
||||
AND signNumType IN (1,2)
|
||||
</if>
|
||||
<if test='map.str == "2"'>
|
||||
AND signNumType IN (3,4)
|
||||
</if>
|
||||
</if>
|
||||
</if>
|
||||
<if test="map.str != null">
|
||||
<if test='map.str == "3"'>
|
||||
AND signNumType IN (5,6)
|
||||
</if>
|
||||
<if test='map.str != "2"'>
|
||||
AND isAuto!='1'
|
||||
</if>
|
||||
</if>
|
||||
</if>
|
||||
</if>
|
||||
|
||||
ORDER BY id
|
||||
</select>
|
||||
|
||||
<select id="updateBySidOne" resultType="java.lang.Integer">
|
||||
UPDATE attendance
|
||||
SET ovTimeIsEnd = #{ovTimeIsEnd}
|
||||
WHERE sid = #{sid}
|
||||
</select>
|
||||
|
||||
<select id="selectByRangeTime" resultType="com.yxt.attend.api.attendance.Attendance" parameterType="map">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE CONCAT(day, ' ', signTime) >= #{map.startTime}
|
||||
AND CONCAT(day, ' ', signTime) <= #{map.endTime}
|
||||
AND userSid = #{map.userSid}
|
||||
</select>
|
||||
|
||||
<select id="query" resultType="com.yxt.attend.api.attendance.AttendanceListOneVo">
|
||||
select DISTINCT(gzxx.staffSid),u.sid as usid,ry.name,d.name as deptName,
|
||||
ad1.signTime as signTime1,ad1.signDlwz as signDlwz1,ad1.signDest as signDest1,
|
||||
ad1.signState as signState1,ad1.day as day1,ad1.signDestDlwz as signDestDlwz1,
|
||||
ad4.signTime as signTime4,
|
||||
ad4.signDlwz as signDlwz4,ad4.signDest as signDest4,
|
||||
ad4.signState as signState4,ad4.day as day4,ad4.signDestDlwz as signDestDlwz4,
|
||||
ad1.deptPath as adDeptPath,
|
||||
<if test='Query.signType == "2"'>
|
||||
ad2.signTime as signTime2,ad2.signDlwz as signDlwz2,ad2.signDest as signDest2,
|
||||
ad2.signState as signState2,ad2.day as day2,ad2.signDestDlwz as signDestDlwz2,
|
||||
ad3.signTime as signTime3,ad3.signDlwz as signDlwz3,ad3.signDest as signDest3,
|
||||
ad3.signState as signState3,ad3.day as day3,ad3.signDestDlwz as signDestDlwz3,
|
||||
</if>
|
||||
|
||||
(select count(1) from attendance as a where u.sid=a.userSid and a.day=#{Query.day} and a.signNumType=5) as
|
||||
OTNum,
|
||||
ae.startTime as startTime,
|
||||
ae.endTime as endTime,ae.type as errendType,ae.vacationType as aeVacationType,
|
||||
ae.destDlwz as errendDlwz,ad5.ovTimeSum
|
||||
from jlzx_base.workexperience gzxx
|
||||
LEFT JOIN jlzx_base.staffinfo ry ON gzxx.staffSid=ry.sid
|
||||
left join jlzx_system.user u on u.staffSid=gzxx.staffSid
|
||||
left join jlzx_system.department_staff link on u.staffSid=link.staffSid
|
||||
left join jlzx_system.department d on d.sid=link.departmentSid
|
||||
left join attend_errand ae on u.sid=ae.userSid and ae.state <>3
|
||||
and ae.startTime<=concat(#{Query.day},"23:59") and ae.endTime>=concat(#{Query.day}," 00:00")
|
||||
left join (select userSid,deptPath,signTime,signDest,signDlwz,signState,day,signDestDlwz,ovTimeSum from
|
||||
attendance
|
||||
where signNumType=1 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad1 on u.sid=ad1.userSid
|
||||
<if test='Query.signType == "2"'>
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day,signDestDlwz,ovTimeSum from attendance
|
||||
where signNumType=2 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad2 on u.sid=ad2.userSid
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day,signDestDlwz,ovTimeSum from attendance
|
||||
where signNumType=3 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad3 on u.sid=ad3.userSid
|
||||
</if>
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day,signDestDlwz,ovTimeSum from attendance
|
||||
where signNumType=4 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad4 on u.sid=ad4.userSid
|
||||
left join (select userSid,ovTimeSum from attendance where id in (select MAX(id) from attendance where
|
||||
dwSid=#{Query.dwSid} and day=#{Query.day} and (signNumType=5 or signNumType=6) GROUP BY userSid ORDER BY id
|
||||
desc)) ad5 on u.sid=ad5.userSid where 1=1 and (u.isAdmin is null or u.isAdmin <> 1)
|
||||
<if test='Query.userType!=null and Query.userType =="1" '>
|
||||
and gzxx.orgSid=#{Query.dwSid} AND (concat(#{Query.day}," 00:00")<gzxx.leaveDate OR gzxx.leaveDate='' OR gzxx.leaveDate
|
||||
is null) AND (concat(#{Query.day}," 23:59")>gzxx.createTime OR gzxx.createTime='' OR gzxx.leaveDate is null)
|
||||
</if>
|
||||
<if test='Query.userType==null or Query.userType != "1"'>
|
||||
and (u.sid=#{Query.userSid}) AND (#{Query.day}<gzxx.leaveDate OR gzxx.leaveDate='' OR gzxx.leaveDate is null) AND
|
||||
(#{Query.day}>gzxx.leaveDate OR gzxx.leaveDate='' OR gzxx.leaveDate is null)
|
||||
</if>
|
||||
<if test='Query.dept!="" and Query.dept!=null'>
|
||||
and d.name like concat("%",#{Query.dept},"%")
|
||||
</if>
|
||||
<if test='Query.xm!=null and Query.xm!="" '>
|
||||
and ry.name like concat("%",#{Query.xm},"%")
|
||||
</if>
|
||||
and u.id is not null
|
||||
order by u.id
|
||||
</select>
|
||||
|
||||
<select id="selectOverTime" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE userSid = #{userSid}
|
||||
AND day = #{day}
|
||||
AND signNumType = #{signNumType}
|
||||
</select>
|
||||
|
||||
<select id="getByUserSid" resultType="com.yxt.attend.api.attendance.AttendanceVo2">
|
||||
SELECT ad.*, t.sum
|
||||
FROM attendance ad
|
||||
LEFT JOIN (SELECT day, MAX(ovTimeSum) sum
|
||||
FROM attendance
|
||||
WHERE year = #{map.year}
|
||||
AND month = #{map.month}
|
||||
AND userSid = #{map.userSid}
|
||||
GROUP BY day) t ON t.day = ad.day
|
||||
WHERE ad.year = #{map.year}
|
||||
AND ad.month = #{map.month}
|
||||
AND ad.userSid = #{map.userSid}
|
||||
ORDER BY ad.day ASC
|
||||
</select>
|
||||
|
||||
<select id="selectVersionByDay" resultType="java.lang.String">
|
||||
SELECT version
|
||||
FROM yxt_attend.attendance
|
||||
WHERE dwSid = #{dwSid}
|
||||
AND year = #{year}
|
||||
AND month = #{month}
|
||||
ORDER BY id DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getSignTime" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE signType = #{map.signType}
|
||||
AND userSid = #{map.userSid}
|
||||
AND day = #{map.curDay}
|
||||
AND signNumType IN (#{map.signNumType})
|
||||
</select>
|
||||
|
||||
<select id="queryByuserSid" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE userSid = #{usersid}
|
||||
AND dwSid = #{dwSid}
|
||||
AND dwlb = #{dwlb}
|
||||
AND day = #{day}
|
||||
ORDER BY id DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.yxt.attend.api.attendance.Attendance">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryHistory" resultType="com.yxt.attend.api.attendance.AttendanceListOneVo">
|
||||
select
|
||||
u.sid as usid,
|
||||
si.name,
|
||||
d.name AS deptName,
|
||||
ad1.signTime as signTime1,
|
||||
ad1.signDlwz as signDlwz1,
|
||||
ad1.signDest as signDest1,
|
||||
ad1.signState as signState1,
|
||||
ad1.day as day1,
|
||||
ad4.signTime as signTime4,
|
||||
ad4.signDlwz as signDlwz4,
|
||||
ad4.signDest as signDest4,
|
||||
ad4.signState as signState4,
|
||||
ad4.day as day4
|
||||
<if test='Query.signType == "2"'>
|
||||
,ad2.signTime as signTime2,ad2.signDlwz as signDlwz2,ad2.signDest as signDest2,
|
||||
ad2.signState as signState2,ad2.day as day2,ad3.signTime as signTime3,
|
||||
ad3.signDlwz as signDlwz3,ad3.signDest as signDest3,ad3.signState as signState3,
|
||||
ad3.day as day3
|
||||
</if>
|
||||
,ad5.signTime as signTime5,ad5.signDlwz as signDlwz5,ad5.signDest as signDest5,
|
||||
ad5.signState as signState5,ad5.day as day5,ad6.signTime as signTime6,
|
||||
ad6.signDlwz as signDlwz6,ad6.signDest as signDest6,ad6.signState as signState6
|
||||
,ad6.day as day6,(select count(1) from attendance att where u.sid=att.userSid
|
||||
and att.day=#{Query.day} and att.signNumType=5) as OTNum, ae.startTime as startTime,
|
||||
ae.endTime as endTime,ae.type as errendType,ae.destDlwz as errendDlwz
|
||||
from jlzx_system.user u
|
||||
left join jlzx_system.department_staff link on u.staffSid=link.staffSid
|
||||
left join jlzx_system.department d on link.departmentSid = d.sid
|
||||
left join jlzx_base.staffinfo si on si.sid = u.staffSid
|
||||
left join attend_errand ae on u.sid=ae.userSid and ae.state<>3 and ae.startTime<=#{Query.day}
|
||||
and ae.endTime>=#{Query.day}
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day from attendance
|
||||
where signNumType=1 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad1 on u.sid=ad1.userSid
|
||||
|
||||
<if test='Query.signType == "2" '>
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day from attendance
|
||||
where signNumType=2 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad2 on u.sid=ad2.userSid
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day from attendance
|
||||
where signNumType=3 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad3 on u.sid=ad3.userSid
|
||||
</if>
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day from attendance
|
||||
where signNumType=4 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad4 on u.sid=ad4.userSid
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day from attendance
|
||||
where signNumType=5 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad5 on u.sid=ad5.userSid
|
||||
left join (select userSid,signTime,signDest,signDlwz,signState,day from attendance
|
||||
where signNumType=6 and dwSid=#{Query.dwSid} and day=#{Query.day} GROUP BY userSid
|
||||
) ad6 on u.sid=ad6.userSid
|
||||
where 1=1 and (u.isAdmin is null or u.isAdmin <> 1)
|
||||
<if test='Query.userType!=null and Query.userType =="1"'>
|
||||
and u.organizationSid=#{Query.dwSid}
|
||||
and u.sid in (select userSid from attendance where dwSid=#{Query.dwSid} and day=#{Query.day} group by
|
||||
userSid)
|
||||
</if>
|
||||
<if test='Query.userType==null or Query.userType != "1"'>
|
||||
and u.sid in (select userSid from attendance where userSid=#{Query.userSid} and day=#{Query.day} group by userSid)
|
||||
</if>
|
||||
<if test="Query.dept!=null">
|
||||
and d.name like concat("%",#{Query.dept},"%")
|
||||
</if>
|
||||
<if test="Query.xm!=null">
|
||||
and si.name like concat("%",#{Query.xm},"%")
|
||||
</if>
|
||||
order by u.id
|
||||
</select>
|
||||
|
||||
<select id="queryByuSidAndDay" resultType="com.yxt.attend.api.attendance.AttendanceVo2">
|
||||
SELECT *
|
||||
FROM attendance
|
||||
WHERE userSid = #{usid} and day=#{day} and signNumType=#{signNumType} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.yxt.attend.biz.attendance;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.alibaba.spring.util.BeanUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.attend.api.attendance.Attendance;
|
||||
import com.yxt.attend.api.attendance.AttendanceListOneVo;
|
||||
import com.yxt.attend.api.attendance.AttendanceQuery;
|
||||
import com.yxt.attend.api.attendance.AttendanceVo;
|
||||
import com.yxt.attend.api.attendance.AttendanceVo2;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.jlzx.oa.api.car.CarVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 14:28
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class AttendanceService extends MybatisBaseService<AttendanceMapper, Attendance> {
|
||||
|
||||
|
||||
|
||||
public List<Attendance> getCurDayInfo(Map<String, Object> map) {
|
||||
return baseMapper.getCurDayInfo(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询没有签退的加班记录
|
||||
*
|
||||
* @param dwSid
|
||||
* @param day
|
||||
* @return
|
||||
*/
|
||||
public List<Attendance> selectOvTime(String dwSid, String day) {
|
||||
return baseMapper.selectOvTime(dwSid, day);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询今日最近一次打卡记录
|
||||
*
|
||||
* @param userSid
|
||||
* @param day
|
||||
* @return
|
||||
*/
|
||||
public Attendance selectLastByDay(String userSid, String day) {
|
||||
return baseMapper.selectLastByDay(userSid, day);
|
||||
}
|
||||
|
||||
public Attendance selectBySignTime(Map<String, Object> map) {
|
||||
return baseMapper.selectBySignTime(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 正常签到签退统计
|
||||
*
|
||||
* @param userSid
|
||||
* @param day
|
||||
* @param signNumType
|
||||
* @return
|
||||
*/
|
||||
public Attendance checkBySignNumType(String userSid, String day, int signNumType) {
|
||||
return baseMapper.checkBySignNumType(userSid, day, signNumType);
|
||||
}
|
||||
|
||||
public List<Attendance> getSignBtnState(Map<String, Object> map) {
|
||||
return baseMapper.getSignBtnState(map);
|
||||
}
|
||||
|
||||
public int updateBySidOne(String sid, Integer ovTimeIsEnd) {
|
||||
return baseMapper.updateBySidOne(sid, ovTimeIsEnd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Attendance selectById(int id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
public Attendance queryByuserSid(String usersid,String dwSid,String dwlb,String day) {
|
||||
// TODO Auto-generated method stub
|
||||
return baseMapper.queryByuserSid(usersid,dwSid,dwlb,day);
|
||||
}
|
||||
public IPage<AttendanceListOneVo> query(PagerQuery<AttendanceQuery> pagerQuery) {
|
||||
// mybits所用的分页对对象
|
||||
IPage<AttendanceQuery> page = PagerUtil.queryToPage(pagerQuery);
|
||||
// mybits所用的查询条件封装类
|
||||
QueryWrapper<AttendanceVo> qw = new QueryWrapper<>();
|
||||
|
||||
|
||||
return baseMapper.query(page, pagerQuery.getParams());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<Attendance> getSignTime(Map<String, Object> map) {
|
||||
return baseMapper.getSignTime(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 加班统计(可以多次)
|
||||
* @param userSid
|
||||
* @param day
|
||||
* @param signNumType
|
||||
* @return
|
||||
*/
|
||||
public List<Attendance> selectOverTime(String userSid, String day,String signNumType){
|
||||
return baseMapper.selectOverTime(userSid, day, signNumType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取版本考勤设置的版本
|
||||
* @param dwSid
|
||||
* @param year
|
||||
* @param month
|
||||
* @return
|
||||
*/
|
||||
public String selectVersionByDay(String dwSid, String year, String month) {
|
||||
return baseMapper.selectVersionByDay(dwSid, year, month);
|
||||
}
|
||||
|
||||
// 查询历史记录
|
||||
public IPage<AttendanceListOneVo> queryHistory(PagerQuery<AttendanceQuery> pagerQuery) {
|
||||
// mybits所用的分页对对象
|
||||
IPage<AttendanceQuery> page = PagerUtil.queryToPage(pagerQuery);
|
||||
// mybits所用的查询条件封装类
|
||||
QueryWrapper<AttendanceListOneVo> qw = new QueryWrapper<>();
|
||||
|
||||
|
||||
return baseMapper.queryHistory(page, pagerQuery.getParams());
|
||||
}
|
||||
|
||||
|
||||
//根据时间范围查询打卡记录
|
||||
public List<Attendance> selectByRangeTime(Map<String, Object> map){
|
||||
return baseMapper.selectByRangeTime(map);
|
||||
}
|
||||
|
||||
|
||||
public List<AttendanceVo2> getByUserSid(Map<String, Object> map){
|
||||
return baseMapper.getByUserSid(map);
|
||||
}
|
||||
|
||||
public AttendanceVo2 queryByuSidAndDay(String usid,String day,String signNumType){
|
||||
return baseMapper.queryByuSidAndDay(usid,day,signNumType);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
package com.yxt.attend.biz.attenderrand;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrand;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandApi;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandDto;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandQuery;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandVo;
|
||||
import com.yxt.attend.api.attenderrand.FormResultVo;
|
||||
import com.yxt.attend.api.attendsigntype.AttendSignType;
|
||||
import com.yxt.attend.api.attendtimetable.AttendTimetable;
|
||||
import com.yxt.attend.biz.attendsigntype.AttendSignTypeService;
|
||||
import com.yxt.attend.biz.attendtimetable.AttendTimetableService;
|
||||
import com.yxt.attend.biz.workflow.WorkFlowService;
|
||||
import com.yxt.common.base.utils.DateUtils;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.staffinfo.StaffBasicDetailsVo;
|
||||
import com.yxt.jlzx.jlcyry.api.staffinfo.StaffInfoApi;
|
||||
import com.yxt.jlzx.oa.api.form.FormDto;
|
||||
import com.yxt.jlzx.oa.api.formfile.FormFile;
|
||||
import com.yxt.jlzx.oa.api.formfile.FormFileDto;
|
||||
import com.yxt.jlzx.system.api.department.DepartmentApi;
|
||||
import com.yxt.jlzx.system.api.department.QrCodeVo;
|
||||
import com.yxt.jlzx.system.api.user.UserApi;
|
||||
import com.yxt.jlzx.system.api.user.UserInfoVo;
|
||||
import com.yxt.workflow.api.task.WfTaskVo;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
||||
/**
|
||||
* @author hanweijia
|
||||
* @date 2020/11/23 11:28
|
||||
* @description
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("v1/attenderrands")
|
||||
@Api(tags = "考勤申请单")
|
||||
public class AttendErrandApiImpl implements AttendErrandApi {
|
||||
@Autowired
|
||||
private UserApi userApi;
|
||||
@Autowired
|
||||
private StaffInfoApi staffInofApi;
|
||||
@Autowired
|
||||
private DepartmentApi departmentApi;
|
||||
@Autowired
|
||||
private AttendErrandService attendanceErrandService;
|
||||
@Autowired
|
||||
private AttendSignTypeService attendSignTypeService;
|
||||
@Autowired
|
||||
private AttendTimetableService attendTimetableService;
|
||||
@Autowired
|
||||
private WorkFlowService wfservice;
|
||||
|
||||
@Override
|
||||
public ResultBean<List<AttendErrandVo>> list(@Valid AttendErrandQuery query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<AttendErrandVo>> pageList(@Valid PagerQuery<AttendErrandQuery> pagerQuery) {
|
||||
|
||||
ResultBean<PagerVo<AttendErrandVo>> rb = ResultBean.fireFail();
|
||||
|
||||
|
||||
IPage<AttendErrandVo> page = attendanceErrandService.selectPager(pagerQuery);
|
||||
//把Ipage转换为PageVo
|
||||
PagerVo<AttendErrandVo> pv_result = PagerUtil.pageToVo(page, null);
|
||||
|
||||
return rb.success().setData(pv_result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<FormResultVo> save(@Valid AttendErrandDto dto) {
|
||||
ResultBean<FormResultVo> resultBean=ResultBean.fireFail();
|
||||
FormResultVo formResultVo = new FormResultVo();
|
||||
// 首次保存,二次修改
|
||||
if (dto != null && StringUtils.isNotBlank(dto.getFormSid())) {
|
||||
if (update(dto, dto.getFormSid()).getSuccess()) {
|
||||
return resultBean.success().setData(formResultVo);
|
||||
} else {
|
||||
return resultBean;
|
||||
}
|
||||
}
|
||||
AttendErrand errand = new AttendErrand();
|
||||
UserInfoVo vo = userApi.fetchUserInfoBysid(dto.getCreateBySid()).getData();
|
||||
String title = vo.getName() + "于" + DateUtils.getNowDateDayStr() + "提交申请";
|
||||
dto.setTitle(title);
|
||||
dto.setFormSid(errand.getSid());
|
||||
dto.fillEntity(errand);
|
||||
// 开始流程
|
||||
WfTaskVo taskVo = wfservice.startProcess((FormDto) dto);
|
||||
if (taskVo == null) {
|
||||
return resultBean;
|
||||
}
|
||||
errand.setOrderSid(taskVo.getOrderSid());
|
||||
UserInfoVo userInfoVo = userApi.fetchUserInfoBysid(errand.getCreateBySid()).getData();
|
||||
if (null != userInfoVo)
|
||||
errand.setCreateOrgSid(userInfoVo.getOrganizationSid());
|
||||
|
||||
|
||||
// 验证同一时间段内是否有其他申请单
|
||||
Date date = new Date();
|
||||
String today = DateUtils.dateConvertStr(date, "yyyy-MM");
|
||||
AttendSignType attendanceSignType = attendSignTypeService.check(dto.getDwSid(), today);
|
||||
AttendTimetable attendanceTimetable = attendTimetableService.check(dto.getDwSid(), today);
|
||||
|
||||
if(null == attendanceSignType) {
|
||||
return resultBean.fail().setMsg("本单位暂未设置考勤,请先设置签卡方式!");
|
||||
}else if(null == attendanceTimetable) {
|
||||
return resultBean.fail().setMsg("本单位暂未设置考勤,请先设置作息时间!");
|
||||
}
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userSid", dto.getUserSid());
|
||||
map.put("startTime", dto.getStartTime());
|
||||
map.put("endTime", dto.getEndTime());
|
||||
List<AttendErrand> list = attendanceErrandService.checkOneByTime(map);
|
||||
if(list.size() > 0) {
|
||||
return resultBean.fail().setMsg("本时间段内有其他申请单,请重新选择!");
|
||||
}
|
||||
|
||||
|
||||
dto.fillEntity(errand);
|
||||
|
||||
//调用远程
|
||||
// dto.setFormSid(errand.getSid());
|
||||
// dto.setCreateBySid(dto.getUserSid());
|
||||
// dto.setProcessSid("f8579a93-40ba-42d5-a6f7-69156e86d401");
|
||||
// dto.setTitle(dto.getApprover()+"的考勤申请");
|
||||
// WfTaskVo taskVo = wfservice.startProcess((FormDto) dto);
|
||||
// if (taskVo == null)
|
||||
// return resultBean;
|
||||
|
||||
|
||||
dto.fillEntity(errand);
|
||||
// errand.setOrderSid(taskVo.getOrderSid());
|
||||
String now = DateUtils.dateConvertStr(date, "yyyy-MM-dd HH:mm:ss");
|
||||
String date1 = DateUtils.dateConvertStr(date, "yyyy-MM-dd");
|
||||
String year = date1.substring(0, 4);
|
||||
String month = date1.substring(5, 7);
|
||||
String day = date1.substring(8, 10);
|
||||
// attendanceErrandService.selectByCurTime(userSid, curTime);
|
||||
errand.setUserSid(dto.getUserSid());
|
||||
errand.setApplicant("");
|
||||
errand.setDwSid("");
|
||||
ResultBean<UserInfoVo> bean=userApi.selectBysid(dto.getUserSid());
|
||||
UserInfoVo user=null;
|
||||
if(bean.getSuccess()) {
|
||||
user=bean.getData();
|
||||
}
|
||||
if(user!=null&&StringUtils.isNoneBlank(user.getStaffSid())) {
|
||||
StaffBasicDetailsVo staffinfo= staffInofApi.staffBasicDetails(user.getStaffSid()).getData();
|
||||
if(staffinfo!=null) {
|
||||
errand.setApplicant(staffinfo.getName());
|
||||
}
|
||||
|
||||
QrCodeVo qrCodeVo=departmentApi.queryByStaffSid(user.getStaffSid()).getData();
|
||||
if(qrCodeVo == null) {
|
||||
errand.setDeptPath("");
|
||||
}else {
|
||||
if(StringUtils.isEmpty(qrCodeVo.getDepartmentName())) {
|
||||
errand.setDeptPath("");
|
||||
}else {
|
||||
errand.setDeptPath(qrCodeVo.getDepartmentName());
|
||||
}
|
||||
}
|
||||
errand.setDwSid(user.getOrganizationSid());
|
||||
}
|
||||
errand.setSubmitTime(now);
|
||||
String title1 = "";
|
||||
if(dto.getType() == 1) {
|
||||
title1 = "差旅";
|
||||
errand.setDayCount(dto.getDayCount());
|
||||
errand.setDestDlwz(dto.getDestDlwz());
|
||||
}else if(dto.getType() == 2) {
|
||||
title1 = "外勤";
|
||||
errand.setDestDlwz(dto.getDestDlwz());
|
||||
}else if(dto.getType() == 3) {
|
||||
title1 = "休假";
|
||||
errand.setDayCount(dto.getDayCount());
|
||||
String vacationType = dto.getDestDlwz(); // 休假类型:1、事假2、病假3、婚假4、产假5、丧假6、年假
|
||||
if(vacationType.equals("1") || vacationType.equals("2") ) { // 只有事假、病假有时假
|
||||
errand.setVacationCategory(dto.getVacationCategory());// 请假类别:1、时假2、日假
|
||||
}
|
||||
errand.setVacationType(Integer.valueOf(vacationType));
|
||||
}
|
||||
errand.setState(1);
|
||||
errand.setType(dto.getType());
|
||||
errand.setApproverSid(dto.getApproverSid());
|
||||
errand.setApprover(dto.getApprover());
|
||||
errand.setReason(dto.getReason());
|
||||
if(attendanceErrandService.save(errand)){
|
||||
formResultVo.setFormSid(errand.getSid());
|
||||
formResultVo.setTaskSid(taskVo.getTaskSid());
|
||||
return resultBean.success().setData(formResultVo);
|
||||
}else {
|
||||
return ResultBean.fireFail();
|
||||
}
|
||||
// SubmitWorkDto dto1=new SubmitWorkDto();
|
||||
// dto1.setActionSid("a357af21-b6df-4207-9c40-f4e4114603db");
|
||||
// dto1.setCurrentTaskSid(taskVo.getTaskSid());
|
||||
// dto1.setIsSendMsg(1);
|
||||
// dto1.setNextUserSid(dto.getApproverSid());
|
||||
// dto1.setOperOpinion(dto.getReason());
|
||||
// dto1.setOperUserSid(dto.getUserSid());
|
||||
// workFlowService.submitWork(dto1);
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ResultBean update(@Valid AttendErrandDto dto, String sid) throws Exception {
|
||||
// AttendErrand errand = attendanceErrandService.selectBySidAndState(sid);
|
||||
// String now = DateUtils.dateConvertStr(new Date(), "yyyy-MM-dd HH:mm:ss");
|
||||
// errand.setState(4);
|
||||
// errand.setApproverTime(now);
|
||||
// attendanceErrandService.updateById(errand);
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// @Override
|
||||
// public ResultBean updates(String sid) throws Exception {
|
||||
// AttendErrand errand = attendanceErrandService.selectBySidAndState(sid);
|
||||
// String now = DateUtils.dateConvertStr(new Date(), "yyyy-MM-dd HH:mm:ss");
|
||||
// errand.setState(4);
|
||||
// errand.setApproverTime(now);
|
||||
// attendanceErrandService.updateById(errand);
|
||||
// return ResultBean.fireSuccess().setData(sid);
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public ResultBean<String> update(AttendErrandDto dto, String sid){
|
||||
ResultBean<String> rb = ResultBean.fireFail();
|
||||
AttendErrand t = attendanceErrandService.fetchBySid(sid);
|
||||
if (null == t)
|
||||
return rb.setMsg("该记录不存在").setData("");
|
||||
|
||||
//if issueUserSid 包含"签发",则设置签发人sid,签发人姓名,签发日期
|
||||
Map<String, Object> map = dto.toMap();
|
||||
|
||||
|
||||
if (0 == attendanceErrandService.updateBySid(map, sid))
|
||||
return rb.setData("");
|
||||
// 修改流程实例中的title和紧急紧急程度
|
||||
dto.setOrderSid(t.getOrderSid());
|
||||
if (wfservice.updateMfOrderFormInfo((FormDto) dto)) {
|
||||
return rb.success().setData(sid);
|
||||
}
|
||||
return rb.success().setMsg("修改成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ResultBean getHanld(String sid) {
|
||||
ResultBean<Integer> resultBean=ResultBean.fireFail();
|
||||
Integer integer = attendanceErrandService.getHanld(sid);
|
||||
return resultBean.setData(integer).success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<AttendErrandVo> getVo(String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean updates(String sid) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.yxt.attend.biz.attenderrand;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrand;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandQuery;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandVo;
|
||||
import com.yxt.jlzx.oa.api.car.CarVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 11:28
|
||||
* @description
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendErrandMapper extends BaseMapper<AttendErrand> {
|
||||
|
||||
public AttendErrandVo selectByCurTime(@Param("userSid")String userSid, @Param("curTime")String curTime);
|
||||
|
||||
public List<AttendErrand> selectByDwsidAndTime(@Param("dwSid") String dwSid, @Param("start") String start, @Param("end") String end);
|
||||
|
||||
public AttendErrand selectBySidAndState(String sid);
|
||||
|
||||
|
||||
|
||||
|
||||
public List<AttendErrand> selectByMonth(@Param("map") Map<String, Object> map);
|
||||
|
||||
public List<AttendErrand> selectByApproverSid(@Param("map") Map<String, Object> map);
|
||||
|
||||
public List<AttendErrand> selectByApproverSid2(@Param("map") Map<String, Object> map);
|
||||
|
||||
IPage<AttendErrandVo> query(IPage<AttendErrandQuery> page,@Param(Constants.WRAPPER) Wrapper<AttendErrandVo> qw);
|
||||
|
||||
public List<AttendErrand> selectDayByUserSid(Map<String, Object> map);
|
||||
|
||||
public List<AttendErrand> checkOneByTime(@Param("map") Map<String, Object> map);
|
||||
|
||||
public int selectCountByApproverSid(String userSid);
|
||||
|
||||
public List<AttendErrand> selectAllByTime(@Param("map") Map<String, Object> map);
|
||||
|
||||
IPage<AttendErrandVo> selectPager(IPage<AttendErrandVo> page,@Param(Constants.WRAPPER) Wrapper<AttendErrandVo> qw);
|
||||
|
||||
Integer getHanld(@Param("sid") String sid);
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.attend.biz.attenderrand.AttendErrandMapper">
|
||||
<select id="selectPager" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT ae.*
|
||||
FROM attend_errand ae
|
||||
LEFT JOIN jlzx_system.user u
|
||||
ON ae.userSid = u.sid
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="query" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT ae.*, info.name, d.name deptName
|
||||
FROM attend_errand ae
|
||||
LEFT JOIN jlzx_system.user u
|
||||
ON ae.userSid = u.sid
|
||||
LEFT JOIN jlzx_system.department_staff link ON u.staffSid = link.staffSid
|
||||
LEFT JOIN jlzx_base.staffinfo info ON info.sid = u.staffSid
|
||||
LEFT JOIN jlzx_system.department d ON d.sid = link.departmentSid
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectByApproverSid" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT *
|
||||
FROM attend_errand
|
||||
WHERE state <> 4
|
||||
AND approverSid = #{map.userSid}
|
||||
<if test="map != null">
|
||||
<if test='map.type!=null and map.type !=""'>
|
||||
and type=#{map.type}
|
||||
</if>
|
||||
<if test='map.month!=null and map.month !="" '>
|
||||
and submitTime like ('%',#{map.month},'%')
|
||||
</if>
|
||||
<if test='map.state!=null and map.state !="" '>
|
||||
and state=#{map.state}
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY state = 1 DESC, startTime DESC
|
||||
</select>
|
||||
|
||||
<select id="selectByApproverSid2" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT *
|
||||
FROM attend_errand
|
||||
WHERE state <> 4
|
||||
AND approverSid = #{map.userSid}
|
||||
<if test="map != null">
|
||||
<if test='map.type!=null and map.type !=""'>
|
||||
and type=#{map.type}
|
||||
</if>
|
||||
<if test='map.month!=null and map.month !="" '>
|
||||
and submitTime like ('%',#{map.month},'%')
|
||||
</if>
|
||||
and (state=2 or state=3)
|
||||
|
||||
</if>
|
||||
ORDER BY state = 1 DESC, startTime DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByCurTime" resultType="com.yxt.attend.api.attenderrand.AttendErrandVo">
|
||||
SELECT *
|
||||
FROM attend_errand ae
|
||||
WHERE userSid = #{userSid}
|
||||
AND ae.startTime <= #{curTime}
|
||||
AND ae.endTime >= #{curTime}
|
||||
AND ae.state <> 4
|
||||
</select>
|
||||
|
||||
<select id="selectByDwsidAndTime" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT *
|
||||
FROM attend_errand
|
||||
WHERE dwSid = #{dwSid}
|
||||
AND startTime <= #{start}
|
||||
AND endTime >= #{end}
|
||||
</select>
|
||||
|
||||
<select id="selectByMonth" resultType="com.yxt.attend.api.attenderrand.AttendErrand" parameterType="map">
|
||||
select * from attend_errand
|
||||
where state<>4 and userSid=#{map.userSid}
|
||||
<if test="map != null">
|
||||
<if test='map.type!=null and map.type !="" '>
|
||||
and type=#{map.type}
|
||||
</if>
|
||||
<if test='map.month!=null and map.month !="" '>
|
||||
and submitTime like CONCAT('%',#{map.month},'%')
|
||||
</if>
|
||||
<if test='map.state!=null and map.state !="" '>
|
||||
and state=#{map.state}
|
||||
</if>
|
||||
<if test='map.date!=null and map.date !="" '>
|
||||
and (startTime like CONCAT('%',#{map.date},'%') or endTime like CONCAT('%',#{map.date},'%'))
|
||||
</if>
|
||||
</if>
|
||||
|
||||
order by state=1 desc,startTime desc
|
||||
</select>
|
||||
|
||||
<select id="selectBySidAndState" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT *
|
||||
FROM attend_errand
|
||||
WHERE state <> 4
|
||||
AND sid = #{sid}
|
||||
</select>
|
||||
|
||||
<select id="selectDayByUserSid" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
select * from attend_errand where state<>4 and userSid=#{map.userSid}
|
||||
and (startTime like CONCAT('%',#{map.date},'%') or endTime like CONCAT('%',#{map.date},'%'))
|
||||
<if test='map.type!=null and map.type !="" '>
|
||||
and type=#{map.type}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkOneByTime" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT *
|
||||
FROM attend_errand
|
||||
WHERE state <> 4
|
||||
AND userSid = #{map.userSid}
|
||||
AND NOT (endTime < #{map.startTime} OR startTime >> #{map.endTime})
|
||||
</select>
|
||||
|
||||
<select id="selectAllByTime" resultType="com.yxt.attend.api.attenderrand.AttendErrand">
|
||||
SELECT *
|
||||
FROM attend_errand
|
||||
WHERE state <> 4
|
||||
AND state <> 2
|
||||
AND (startTime < #{map.startTime} AND endTime >> #{map.endTime})
|
||||
ORDER BY dwSid
|
||||
</select>
|
||||
<select id="getHanld" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1) from attend_errand WHERE state = 1 AND approverSid =#{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.yxt.attend.biz.attenderrand;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrand;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandQuery;
|
||||
import com.yxt.attend.api.attenderrand.AttendErrandVo;
|
||||
import com.yxt.attend.biz.form.IFormService;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.jlzx.oa.api.form.FormSelectLinkDto;
|
||||
import com.yxt.jlzx.oa.api.form.MaxFileNumDto;
|
||||
import com.yxt.jlzx.oa.api.formzzfw.FormZzfwVo;
|
||||
import com.yxt.jlzx.oa.api.index.AppDailyDto;
|
||||
import com.yxt.jlzx.oa.api.index.AppDailyVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/23 11:28
|
||||
* @description
|
||||
*/
|
||||
@Service("08b3238d-4bfb-4d82-99f3-698bf391393c")
|
||||
public class AttendErrandService extends MybatisBaseService<AttendErrandMapper, AttendErrand> implements IFormService {
|
||||
|
||||
public List<AttendErrand> selectByApproverSid(Map<String,Object> map) {
|
||||
return baseMapper.selectByApproverSid(map);
|
||||
}
|
||||
|
||||
public List<AttendErrand> selectByApproverSid2(Map<String,Object> map) {
|
||||
return baseMapper.selectByApproverSid2(map);
|
||||
}
|
||||
|
||||
public AttendErrandVo selectByCurTime(String userSid, String curTime) {
|
||||
return baseMapper.selectByCurTime(userSid, curTime);
|
||||
}
|
||||
|
||||
public List<AttendErrand> selectByDwsidAndTime(Map<String, Object> map){
|
||||
String dwSid = String.valueOf(map.get("dwSid"));
|
||||
String start = String.valueOf(map.get("nowTime"));
|
||||
String end = String.valueOf(map.get("nowTime"));
|
||||
|
||||
return baseMapper.selectByDwsidAndTime(dwSid,start,end);
|
||||
}
|
||||
|
||||
|
||||
public AttendErrand selectBySidAndState(String sid) {
|
||||
return baseMapper.selectBySidAndState(sid);
|
||||
}
|
||||
|
||||
|
||||
public List<AttendErrand> selectByMonth(Map<String, Object> map){
|
||||
return baseMapper.selectByMonth(map);
|
||||
}
|
||||
|
||||
|
||||
public List<AttendErrand> selectDayByUserSid(Map<String, Object> map){
|
||||
return baseMapper.selectDayByUserSid(map);
|
||||
}
|
||||
|
||||
public List<AttendErrand> checkOneByTime(Map<String, Object> map){
|
||||
return baseMapper.checkOneByTime(map);
|
||||
}
|
||||
|
||||
public int selectCountByApproverSid(String userSid) {
|
||||
return baseMapper.selectCountByApproverSid(userSid);
|
||||
}
|
||||
|
||||
public List<AttendErrand> selectAllByTime(Map<String, Object> map){
|
||||
return baseMapper.selectAllByTime(map);
|
||||
}
|
||||
|
||||
// public Pager query(Map<String, String> map, Pager pager) {
|
||||
// PageQuery pageQuery = new PageQuery(pager.getPageNumber(), map, -1, pager.getPageSize());
|
||||
// baseMapper.query(pageQuery);
|
||||
// pager.setList(pageQuery.getList());
|
||||
// pager.setRecordCount((int) pageQuery.getTotalRow());
|
||||
// return pager;
|
||||
// }
|
||||
// 休假、差旅、外勤申请单
|
||||
public IPage<AttendErrandVo> selectPager(PagerQuery<AttendErrandQuery> pagerQuery) {
|
||||
IPage<AttendErrandVo> page = PagerUtil.queryToPage(pagerQuery);
|
||||
// mybits所用的查询条件封装类
|
||||
QueryWrapper<AttendErrandVo> qw = buildQueryWrapper(pagerQuery.getParams());
|
||||
|
||||
return baseMapper.selectPager(page, qw);
|
||||
}
|
||||
|
||||
private QueryWrapper<AttendErrandVo> buildQueryWrapper(AttendErrandQuery pagerQuery) {
|
||||
QueryWrapper<AttendErrandVo> qw = new QueryWrapper<>();
|
||||
if (pagerQuery != null) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getIsadmin())&&"1".equals(pagerQuery.getIsadmin())) {
|
||||
qw.eq("ae.dwSid", pagerQuery.getDwSid());
|
||||
}else {
|
||||
//2021.09.14查询申请人 .or().eq("ae.approverSid",pagerQuery.getUserSid())
|
||||
qw.eq ("ae.userSid",pagerQuery.getUserSid()) ;
|
||||
}
|
||||
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getDept())) {
|
||||
qw.like("ae.deptPath", pagerQuery.getDept());
|
||||
}
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getApplicant())) {
|
||||
qw.like("ae.applicant", pagerQuery.getApplicant());
|
||||
}
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getApprover())) {
|
||||
qw.like("ae.approver", pagerQuery.getApprover());
|
||||
}
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getStartTime())) {
|
||||
qw.ge("ae.startTime", pagerQuery.getStartTime());
|
||||
}
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getEndTime())) {
|
||||
qw.le("ae.endTime", pagerQuery.getEndTime());
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getState())) {
|
||||
qw.eq("ae.state", pagerQuery.getState());
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getType())) {
|
||||
qw.eq("ae.type", pagerQuery.getType());
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getVacationType())) {
|
||||
qw.eq("ae.vacationType", pagerQuery.getVacationType());
|
||||
}
|
||||
|
||||
qw.orderByDesc("ae.state=1","ae.currentTime");
|
||||
}
|
||||
|
||||
return qw;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取动态表单
|
||||
* @param sid
|
||||
* @return
|
||||
*/
|
||||
|
||||
public Map<String,Object> getFormItemsVo(String sid){
|
||||
|
||||
AttendErrand t=fetchBySid(sid);
|
||||
if(null==t)
|
||||
return null;
|
||||
AttendErrandVo vo=new AttendErrandVo();
|
||||
vo.fromEntity(t);
|
||||
if(t.getType()==1) {
|
||||
vo.setTypeVal("差旅");
|
||||
}else if(t.getType()==2) {
|
||||
vo.setTypeVal("外勤");
|
||||
}else {
|
||||
vo.setTypeVal("休假");
|
||||
}
|
||||
return vo.toFormItemsMap();
|
||||
}
|
||||
|
||||
public Integer getHanld(String sid) {
|
||||
|
||||
|
||||
return baseMapper.getHanld(sid);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getNewFormItemsVo() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getEditFormItemsVo(String formSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getMaxFileNum(MaxFileNumDto dto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppDailyVo isSave(AppDailyDto appDailyDto) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppDailyVo update(AppDailyDto appDailyDto) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getLinkAge(FormSelectLinkDto dto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.yxt.attend.biz.attendholiday;
|
||||
|
||||
import com.yxt.attend.api.attendholiday.*;
|
||||
import com.yxt.common.base.config.RedisUtil;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.jlzx.system.api.user.User;
|
||||
import com.yxt.jlzx.system.api.user.UserApi;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:17
|
||||
* @description 休息日设置
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("v1/attendholidaysets")
|
||||
@Api(tags = "考勤-休息日设置接口")
|
||||
public class AttendHolidaySetApiImpl implements AttendHolidaySetApi {
|
||||
|
||||
@Autowired(required = false)
|
||||
private HttpServletRequest httpServletRequest;
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
@Autowired
|
||||
private UserApi userApi;
|
||||
@Autowired
|
||||
private AttendHolidaySetService attendHolidaySetService;
|
||||
|
||||
@Override
|
||||
public ResultBean save(AttendHolidaySetDto attendHolidaySetDto) {
|
||||
String token = httpServletRequest.getHeader("token");
|
||||
String userName = redisUtil.get(token);
|
||||
User user = userApi.selectByUserNameOne(userName).getData();
|
||||
|
||||
String year = attendHolidaySetDto.getYear();
|
||||
System.err.println(year);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("dwSid", user.getOrganizationSid());
|
||||
map.put("year", year);
|
||||
AttendHolidaySet holidaySet = new AttendHolidaySet();
|
||||
holidaySet.setDwSid(user.getOrganizationSid());
|
||||
holidaySet.setYear(year);
|
||||
String days = "";
|
||||
// 验证
|
||||
for (int i = 1; i <= 12; i++) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
map.put("month", "01");
|
||||
holidaySet.setMonth("01");
|
||||
days = attendHolidaySetDto.getJanDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 2:
|
||||
map.put("month", "02");
|
||||
holidaySet.setMonth("02");
|
||||
days = attendHolidaySetDto.getFebDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 3:
|
||||
map.put("month", "03");
|
||||
holidaySet.setMonth("03");
|
||||
days = attendHolidaySetDto.getMarDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 4:
|
||||
map.put("month", "04");
|
||||
holidaySet.setMonth("04");
|
||||
days = attendHolidaySetDto.getAprDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 5:
|
||||
map.put("month", "05");
|
||||
holidaySet.setMonth("05");
|
||||
days = attendHolidaySetDto.getMayDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 6:
|
||||
map.put("month", "06");
|
||||
holidaySet.setMonth("06");
|
||||
days = attendHolidaySetDto.getJunDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 7:
|
||||
map.put("month", "07");
|
||||
holidaySet.setMonth("07");
|
||||
days = attendHolidaySetDto.getJulDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 8:
|
||||
map.put("month", "08");
|
||||
holidaySet.setMonth("08");
|
||||
days = attendHolidaySetDto.getAugDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 9:
|
||||
map.put("month", "09");
|
||||
holidaySet.setMonth("09");
|
||||
days = attendHolidaySetDto.getSepDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 10:
|
||||
map.put("month", "10");
|
||||
holidaySet.setMonth("10");
|
||||
days = attendHolidaySetDto.getOctDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 11:
|
||||
map.put("month", "11");
|
||||
holidaySet.setMonth("11");
|
||||
days = attendHolidaySetDto.getNovDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
case 12:
|
||||
map.put("month", "12");
|
||||
holidaySet.setMonth("12");
|
||||
days = attendHolidaySetDto.getDecDays();
|
||||
days = attendHolidaySetService.checkDays(days);
|
||||
holidaySet.setDay(days);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
AttendHolidaySet holidaySet0 = attendHolidaySetService.check(map);
|
||||
if (null == holidaySet0) {
|
||||
attendHolidaySetService.save(holidaySet);
|
||||
} else {
|
||||
holidaySet0.setDay(holidaySet.getDay());
|
||||
attendHolidaySetService.updateById(holidaySet0);
|
||||
}
|
||||
}
|
||||
return ResultBean.fireSuccess().setData(user.getOrganizationSid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<AttendHolidaySetVo>> list(String year) {
|
||||
String token = httpServletRequest.getHeader("token");
|
||||
String userName = redisUtil.get(token);
|
||||
User user = userApi.selectByUserNameOne(userName).getData();
|
||||
List<AttendHolidaySetVo> list = attendHolidaySetService.getByYear(user.getOrganizationSid(), year);
|
||||
return new ResultBean<List<AttendHolidaySetVo>>().success().setData(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkIsHoliDay(AttendHolidaySetQuery attendHolidaySetQuery) {
|
||||
AttendHolidaySet holidaySet = attendHolidaySetService.checkByDay(attendHolidaySetQuery);
|
||||
if (null != holidaySet) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.yxt.attend.biz.attendholiday;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yxt.attend.api.attendholiday.AttendHolidaySet;
|
||||
import com.yxt.attend.api.attendholiday.AttendHolidaySetQuery;
|
||||
import com.yxt.attend.api.attendholiday.AttendHolidaySetVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/19 15:59
|
||||
* @description
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttendHolidaySetMapper extends BaseMapper<AttendHolidaySet> {
|
||||
|
||||
public AttendHolidaySet check(@Param("map") Map<String, Object> map);
|
||||
|
||||
public List<AttendHolidaySetVo> getByYear(@Param("organizationSid") String organizationSid, @Param("year") String year);
|
||||
|
||||
public List<AttendHolidaySet> getByYearOne(@Param("map") Map<String,Object> map);
|
||||
|
||||
public AttendHolidaySet checkByDay(@Param("attendHolidaySetQuery") AttendHolidaySetQuery attendHolidaySetQuery);
|
||||
|
||||
public String getDaysByMonth(@Param("map") Map<String, Object> map);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user