update code
parent
35cb63c315
commit
ac7a73a706
7
pom.xml
7
pom.xml
|
@ -26,6 +26,7 @@
|
|||
<mybatis-spring-boot.version>2.1.4</mybatis-spring-boot.version>
|
||||
<pagehelper.boot.version>1.3.1</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.76</fastjson.version>
|
||||
<fastjson2.version>2.0.34</fastjson2.version>
|
||||
<oshi.version>5.7.4</oshi.version>
|
||||
<jna.version>5.8.0</jna.version>
|
||||
<commons.io.version>2.10.0</commons.io.version>
|
||||
|
@ -183,6 +184,12 @@
|
|||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>${fastjson2.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 定时任务-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
|
|
|
@ -159,7 +159,10 @@
|
|||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-yanzhu</artifactId>
|
||||
<version>4.6.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
@ -101,4 +101,5 @@ public class Constants
|
|||
* RMI 远程方法调用
|
||||
*/
|
||||
public static final String LOOKUP_RMI = "rmi://";
|
||||
public static final Integer BIGSCREEN_QUERY_CACHE = 1;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ public class FileUploadUtils
|
|||
return fileName;
|
||||
}
|
||||
|
||||
private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
|
||||
public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
|
||||
{
|
||||
File desc = new File(uploadDir + File.separator + fileName);
|
||||
|
||||
|
@ -141,7 +141,7 @@ public class FileUploadUtils
|
|||
return desc;
|
||||
}
|
||||
|
||||
private static final String getPathFileName(String uploadDir, String fileName) throws IOException
|
||||
public static final String getPathFileName(String uploadDir, String fileName) throws IOException
|
||||
{
|
||||
int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
|
||||
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package com.ruoyi.common.utils.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
|
@ -77,7 +75,56 @@ public class FileUtils
|
|||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获取图像后缀
|
||||
*
|
||||
* @param photoByte 图像数据
|
||||
* @return 后缀名
|
||||
*/
|
||||
public static String getFileExtendName(byte[] photoByte)
|
||||
{
|
||||
String strFileExtendName = "jpg";
|
||||
if ((photoByte[0] == 71) && (photoByte[1] == 73) && (photoByte[2] == 70) && (photoByte[3] == 56)
|
||||
&& ((photoByte[4] == 55) || (photoByte[4] == 57)) && (photoByte[5] == 97))
|
||||
{
|
||||
strFileExtendName = "gif";
|
||||
}
|
||||
else if ((photoByte[6] == 74) && (photoByte[7] == 70) && (photoByte[8] == 73) && (photoByte[9] == 70))
|
||||
{
|
||||
strFileExtendName = "jpg";
|
||||
}
|
||||
else if ((photoByte[0] == 66) && (photoByte[1] == 77))
|
||||
{
|
||||
strFileExtendName = "bmp";
|
||||
}
|
||||
else if ((photoByte[1] == 80) && (photoByte[2] == 78) && (photoByte[3] == 71))
|
||||
{
|
||||
strFileExtendName = "png";
|
||||
}
|
||||
return strFileExtendName;
|
||||
}
|
||||
|
||||
public static String writeBytes(byte[] data, String uploadDir,String fileName) throws IOException
|
||||
{
|
||||
FileOutputStream fos = null;
|
||||
String pathName = "";
|
||||
try
|
||||
{
|
||||
String extension = getFileExtendName(data);
|
||||
pathName = DateUtils.datePath() + "/" + fileName;
|
||||
File file = FileUploadUtils.getAbsoluteFile(uploadDir, pathName);
|
||||
if(file.exists()){
|
||||
file.delete();
|
||||
}
|
||||
fos = new FileOutputStream(file);
|
||||
fos.write(data);
|
||||
}
|
||||
finally
|
||||
{
|
||||
IOUtils.close(fos);
|
||||
}
|
||||
return FileUploadUtils.getPathFileName(uploadDir, pathName);
|
||||
}
|
||||
/**
|
||||
* 删除文件
|
||||
*
|
||||
|
@ -200,4 +247,15 @@ public class FileUtils
|
|||
String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString());
|
||||
return encode.replaceAll("\\+", "%20");
|
||||
}
|
||||
|
||||
public static String getName(String fileName) {
|
||||
if (fileName == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int lastUnixPos = fileName.lastIndexOf('/');
|
||||
int lastWindowsPos = fileName.lastIndexOf('\\');
|
||||
int index = Math.max(lastUnixPos, lastWindowsPos);
|
||||
return fileName.substring(index + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,10 @@
|
|||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ public class SurProjectAttendanceCfgController extends BaseController
|
|||
@Log(title = "考勤配置", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
public AjaxResult remove(Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectAttendanceCfgService.deleteSurProjectAttendanceCfgByIds(ids));
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class SurProjectAttendanceDataController extends BaseController
|
|||
@Log(title = "考勤数据", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
public AjaxResult remove(Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectAttendanceDataService.deleteSurProjectAttendanceDataByIds(ids));
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ public class SurProjectAttendanceGroupController extends BaseController
|
|||
@Log(title = "班组信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
public AjaxResult remove(Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectAttendanceGroupService.deleteSurProjectAttendanceGroupByIds(ids));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.yanzhu.xd.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
|
@ -110,7 +111,7 @@ public class SurProjectAttendanceUserController extends BaseController
|
|||
@Log(title = "实名制人员", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
public AjaxResult remove(Long[] ids)
|
||||
{
|
||||
return toAjax(surProjectAttendanceUserService.deleteSurProjectAttendanceUserByIds(ids));
|
||||
}
|
||||
|
|
|
@ -178,3 +178,4 @@ public class SurProjectAttendanceCfg extends BaseEntity
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package com.yanzhu.xd.system.domain;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
@ -13,296 +16,497 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
*/
|
||||
public class SurProjectAttendanceData extends BaseEntity
|
||||
{
|
||||
public SurProjectAttendanceData(){
|
||||
this.year= DateTime.now().year();
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int year;
|
||||
|
||||
public int getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setYear(int year) {
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getWorkerName() {
|
||||
return workerName;
|
||||
}
|
||||
|
||||
public void setWorkerName(String workerName) {
|
||||
this.workerName = workerName;
|
||||
}
|
||||
|
||||
public String getWorkerPhoto() {
|
||||
return workerPhoto;
|
||||
}
|
||||
|
||||
public void setWorkerPhoto(String workerPhoto) {
|
||||
this.workerPhoto = workerPhoto;
|
||||
}
|
||||
|
||||
public Long getWorkerGender() {
|
||||
return workerGender;
|
||||
}
|
||||
|
||||
public void setWorkerGender(Long workerGender) {
|
||||
this.workerGender = workerGender;
|
||||
}
|
||||
|
||||
public Long getBirthDate() {
|
||||
return birthDate;
|
||||
}
|
||||
|
||||
public void setBirthDate(Long birthDate) {
|
||||
this.birthDate = birthDate;
|
||||
}
|
||||
|
||||
public String getGroupName() {
|
||||
return groupName;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getWorkTypeName() {
|
||||
return workTypeName;
|
||||
}
|
||||
|
||||
public void setWorkTypeName(String workTypeName) {
|
||||
this.workTypeName = workTypeName;
|
||||
}
|
||||
|
||||
public String getEthnic() {
|
||||
return ethnic;
|
||||
}
|
||||
|
||||
public void setEthnic(String ethnic) {
|
||||
this.ethnic = ethnic;
|
||||
}
|
||||
|
||||
public String getNativePlace() {
|
||||
return nativePlace;
|
||||
}
|
||||
|
||||
public void setNativePlace(String nativePlace) {
|
||||
this.nativePlace = nativePlace;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Integer getSpecWorkType() {
|
||||
return specWorkType;
|
||||
}
|
||||
|
||||
public void setSpecWorkType(Integer specWorkType) {
|
||||
this.specWorkType = specWorkType;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getAttendanceOutTime() {
|
||||
return attendanceOutTime;
|
||||
}
|
||||
|
||||
public void setAttendanceOutTime(String attendanceOutTime) {
|
||||
this.attendanceOutTime = attendanceOutTime;
|
||||
}
|
||||
|
||||
|
||||
private Long projectId;
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
private Long deptId;
|
||||
@Excel(name = "部门名称")
|
||||
private String deptName;
|
||||
@Excel(name = "姓名")
|
||||
private String workerName;
|
||||
|
||||
private String workerPhoto;
|
||||
@Excel(name = "性别0:男 1:女")
|
||||
private Long workerGender;
|
||||
|
||||
private Long birthDate;
|
||||
@Excel(name = "所属班组")
|
||||
private String groupName;
|
||||
@Excel(name = "工种")
|
||||
private String workTypeName;
|
||||
@Excel(name = "民族")
|
||||
private String ethnic;
|
||||
@Excel(name = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@Excel(name = "联系电话")
|
||||
private String phone;
|
||||
@Excel(name = "是否特殊工种")
|
||||
private Integer specWorkType;
|
||||
|
||||
private String companyTypeId;
|
||||
@Excel(name = "分包商名称")
|
||||
private String companyName;
|
||||
|
||||
private String workerId;
|
||||
|
||||
/** 考勤时间yyyy-MM-dd HH:mm:ss */
|
||||
@Excel(name = "考勤时间(进场)")
|
||||
private String attendanceTime;
|
||||
|
||||
@Excel(name = "考勤时间(离开)")
|
||||
private String attendanceOutTime;
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String identification;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 配置项ID,可以获取项目ID和总包ID */
|
||||
@Excel(name = "配置项ID,可以获取项目ID和总包ID")
|
||||
private Long cfgid;
|
||||
|
||||
/** 应用主键 */
|
||||
@Excel(name = "应用主键")
|
||||
/** 注册应用ID */
|
||||
private String appId;
|
||||
|
||||
/** 厂商编号参考字典attendance_vendors */
|
||||
@Excel(name = "厂商编号参考字典attendance_vendors")
|
||||
private String vendorsCode;
|
||||
|
||||
/** 服务端ID */
|
||||
@Excel(name = "服务端ID")
|
||||
private String serverid;
|
||||
|
||||
/** 工人Id */
|
||||
@Excel(name = "工人Id")
|
||||
private String workerId;
|
||||
|
||||
/** 进门还是出门E进,L出 */
|
||||
@Excel(name = "进门还是出门E进,L出")
|
||||
private String attendanceType;
|
||||
|
||||
/** 考勤时间yyyy-MM-dd HH:mm:ss */
|
||||
@Excel(name = "考勤时间yyyy-MM-dd HH:mm:ss")
|
||||
private String attendanceTime;
|
||||
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String identification;
|
||||
|
||||
/** 队伍id */
|
||||
@Excel(name = "队伍id")
|
||||
private Long teamId;
|
||||
|
||||
/** 工种编码 */
|
||||
@Excel(name = "工种编码")
|
||||
private String workTypeCode;
|
||||
|
||||
/** 分包商id */
|
||||
@Excel(name = "分包商id")
|
||||
private String companyId;
|
||||
|
||||
/** 平台对应分包商ID */
|
||||
@Excel(name = "平台对应分包商ID")
|
||||
private Long vendorId;
|
||||
|
||||
/** 新旧系统项目标识0:新系统项目; 1:旧系统项目 */
|
||||
@Excel(name = "新旧系统项目标识0:新系统项目; 1:旧系统项目")
|
||||
private Long projectType;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private String deviceCode;
|
||||
|
||||
/** 作业面Id */
|
||||
@Excel(name = "作业面Id")
|
||||
private String workPointId;
|
||||
|
||||
/** 照片 */
|
||||
@Excel(name = "照片")
|
||||
private String scanPhoto;
|
||||
|
||||
/** 服务返回的JSON */
|
||||
@Excel(name = "服务返回的JSON")
|
||||
private String other;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
private Long state;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
private Long subDeptId;
|
||||
|
||||
/** 重要::yanzhu接口接收base64图片 */
|
||||
private String scanPhotoBase64;
|
||||
|
||||
/** 重要::yanzhu出门进门逻辑判断 */
|
||||
private String attendanceType;
|
||||
|
||||
public String getScanPhotoBase64() {
|
||||
return scanPhotoBase64;
|
||||
}
|
||||
|
||||
public void setScanPhotoBase64(String scanPhotoBase64) {
|
||||
this.scanPhotoBase64 = scanPhotoBase64;
|
||||
}
|
||||
|
||||
public String getAttendanceType() {
|
||||
return attendanceType;
|
||||
}
|
||||
|
||||
public void setAttendanceType(String attendanceType) {
|
||||
this.attendanceType = attendanceType;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceData createFromHuazhu(JSONObject j) {
|
||||
SurProjectAttendanceData d=new SurProjectAttendanceData();
|
||||
d.vendorsCode="huazhu";
|
||||
d.serverid=j.getString("id");
|
||||
d.workerId=j.getString("labourWorkerId");
|
||||
long recordTime=j.getLongValue("recordTime",0);
|
||||
if(recordTime>0){
|
||||
if(j.getIntValue("inOrOut",1)==1){
|
||||
d.setRemark("E");
|
||||
}else{
|
||||
d.setRemark("L");
|
||||
}
|
||||
d.attendanceTime= DateUtil.format(DateUtil.date(recordTime),"yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
d.identification=j.getString("idCardNo");
|
||||
d.teamId=j.getLongValue("teamId",0);
|
||||
d.workTypeCode=j.getString("workerTypeId");
|
||||
d.companyId=j.getString("unitId");
|
||||
d.deviceCode=j.getString("deviceNo");
|
||||
return d;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceData createFromJgw(JSONObject j) {
|
||||
SurProjectAttendanceData d=new SurProjectAttendanceData();
|
||||
d.vendorsCode="jgw";
|
||||
d.serverid=j.getString("id");
|
||||
d.workerId=j.getString("workerId");
|
||||
if("2".equals(j.getString("machineType"))){
|
||||
d.setRemark("E");
|
||||
}else{
|
||||
d.setRemark("L");
|
||||
}
|
||||
d.attendanceTime = j.getString("checkinTime");
|
||||
|
||||
d.teamId=0l;
|
||||
d.workTypeCode="";
|
||||
d.companyId=j.getString("subcontractorId");
|
||||
d.deviceCode=j.getString("deviceSerialNo");
|
||||
d.isDel=0l;
|
||||
return d;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
|
||||
public String getCompanyTypeId() {
|
||||
return companyTypeId;
|
||||
}
|
||||
|
||||
public void setCompanyTypeId(String companyTypeId) {
|
||||
this.companyTypeId = companyTypeId;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceData create(JSONObject json) {
|
||||
SurProjectAttendanceData d=new SurProjectAttendanceData();
|
||||
d.attendanceTime=json.getString("time");
|
||||
if("E".equals(json.getString("type"))){
|
||||
d.setRemark("E");
|
||||
}else{
|
||||
d.setRemark("L");
|
||||
}
|
||||
d.serverid=json.getString("id");
|
||||
d.workerId=json.getString("workerId");
|
||||
d.identification=json.getString("identification");
|
||||
d.teamId=json.getLong("teamId");
|
||||
d.workTypeCode=json.getString("workerTypeId");
|
||||
d.companyId=json.getString("companyId");
|
||||
d.vendorId=json.getLong("vendorId");
|
||||
d.deviceCode=json.getString("deviceCode");
|
||||
d.scanPhoto=json.getString("scanPhoto");
|
||||
d.isDel=0l;
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgid(Long cfgid)
|
||||
public void setCfgid(Long cfgid)
|
||||
{
|
||||
this.cfgid = cfgid;
|
||||
}
|
||||
|
||||
public Long getCfgid()
|
||||
public Long getCfgid()
|
||||
{
|
||||
return cfgid;
|
||||
}
|
||||
public void setAppId(String appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setVendorsCode(String vendorsCode)
|
||||
public void setVendorsCode(String vendorsCode)
|
||||
{
|
||||
this.vendorsCode = vendorsCode;
|
||||
}
|
||||
|
||||
public String getVendorsCode()
|
||||
public String getVendorsCode()
|
||||
{
|
||||
return vendorsCode;
|
||||
}
|
||||
public void setServerid(String serverid)
|
||||
public void setServerid(String serverid)
|
||||
{
|
||||
this.serverid = serverid;
|
||||
}
|
||||
|
||||
public String getServerid()
|
||||
public String getServerid()
|
||||
{
|
||||
return serverid;
|
||||
}
|
||||
public void setWorkerId(String workerId)
|
||||
public void setWorkerId(String workerId)
|
||||
{
|
||||
this.workerId = workerId;
|
||||
}
|
||||
|
||||
public String getWorkerId()
|
||||
public String getWorkerId()
|
||||
{
|
||||
return workerId;
|
||||
}
|
||||
public void setAttendanceType(String attendanceType)
|
||||
{
|
||||
this.attendanceType = attendanceType;
|
||||
}
|
||||
|
||||
public String getAttendanceType()
|
||||
{
|
||||
return attendanceType;
|
||||
}
|
||||
public void setAttendanceTime(String attendanceTime)
|
||||
public void setAttendanceTime(String attendanceTime)
|
||||
{
|
||||
this.attendanceTime = attendanceTime;
|
||||
}
|
||||
|
||||
public String getAttendanceTime()
|
||||
public String getAttendanceTime()
|
||||
{
|
||||
return attendanceTime;
|
||||
}
|
||||
public void setIdentification(String identification)
|
||||
public void setIdentification(String identification)
|
||||
{
|
||||
this.identification = identification;
|
||||
}
|
||||
|
||||
public String getIdentification()
|
||||
public String getIdentification()
|
||||
{
|
||||
return identification;
|
||||
}
|
||||
public void setTeamId(Long teamId)
|
||||
public void setTeamId(Long teamId)
|
||||
{
|
||||
this.teamId = teamId;
|
||||
}
|
||||
|
||||
public Long getTeamId()
|
||||
public Long getTeamId()
|
||||
{
|
||||
return teamId;
|
||||
}
|
||||
public void setWorkTypeCode(String workTypeCode)
|
||||
public void setWorkTypeCode(String workTypeCode)
|
||||
{
|
||||
this.workTypeCode = workTypeCode;
|
||||
}
|
||||
|
||||
public String getWorkTypeCode()
|
||||
public String getWorkTypeCode()
|
||||
{
|
||||
return workTypeCode;
|
||||
}
|
||||
public void setCompanyId(String companyId)
|
||||
public void setCompanyId(String companyId)
|
||||
{
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getCompanyId()
|
||||
public String getCompanyId()
|
||||
{
|
||||
return companyId;
|
||||
}
|
||||
public void setVendorId(Long vendorId)
|
||||
public void setVendorId(Long vendorId)
|
||||
{
|
||||
this.vendorId = vendorId;
|
||||
}
|
||||
|
||||
public Long getVendorId()
|
||||
public Long getVendorId()
|
||||
{
|
||||
return vendorId;
|
||||
}
|
||||
public void setProjectType(Long projectType)
|
||||
{
|
||||
this.projectType = projectType;
|
||||
}
|
||||
|
||||
public Long getProjectType()
|
||||
{
|
||||
return projectType;
|
||||
}
|
||||
public void setDeviceCode(String deviceCode)
|
||||
public void setDeviceCode(String deviceCode)
|
||||
{
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceCode()
|
||||
public String getDeviceCode()
|
||||
{
|
||||
return deviceCode;
|
||||
}
|
||||
public void setWorkPointId(String workPointId)
|
||||
{
|
||||
this.workPointId = workPointId;
|
||||
}
|
||||
|
||||
public String getWorkPointId()
|
||||
{
|
||||
return workPointId;
|
||||
}
|
||||
public void setScanPhoto(String scanPhoto)
|
||||
|
||||
public void setScanPhoto(String scanPhoto)
|
||||
{
|
||||
this.scanPhoto = scanPhoto;
|
||||
}
|
||||
|
||||
public String getScanPhoto()
|
||||
public String getScanPhoto()
|
||||
{
|
||||
return scanPhoto;
|
||||
}
|
||||
public void setOther(String other)
|
||||
{
|
||||
this.other = other;
|
||||
}
|
||||
|
||||
public String getOther()
|
||||
{
|
||||
return other;
|
||||
}
|
||||
public void setState(Long state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setIsDel(Long isDel)
|
||||
public void setIsDel(Long isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public Long getIsDel()
|
||||
public Long getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgid", getCfgid())
|
||||
.append("appId", getAppId())
|
||||
.append("vendorsCode", getVendorsCode())
|
||||
.append("serverid", getServerid())
|
||||
.append("workerId", getWorkerId())
|
||||
.append("attendanceType", getAttendanceType())
|
||||
.append("attendanceTime", getAttendanceTime())
|
||||
.append("identification", getIdentification())
|
||||
.append("teamId", getTeamId())
|
||||
.append("workTypeCode", getWorkTypeCode())
|
||||
.append("companyId", getCompanyId())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("projectType", getProjectType())
|
||||
.append("deviceCode", getDeviceCode())
|
||||
.append("workPointId", getWorkPointId())
|
||||
.append("scanPhoto", getScanPhoto())
|
||||
.append("other", getOther())
|
||||
.append("state", getState())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
.append("id", getId())
|
||||
.append("cfgid", getCfgid())
|
||||
.append("vendorsCode", getVendorsCode())
|
||||
.append("serverid", getServerid())
|
||||
.append("workerId", getWorkerId())
|
||||
.append("attendanceTime", getAttendanceTime())
|
||||
.append("identification", getIdentification())
|
||||
.append("teamId", getTeamId())
|
||||
.append("workTypeCode", getWorkTypeCode())
|
||||
.append("companyId", getCompanyId())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("deviceCode", getDeviceCode())
|
||||
.append("scanPhoto", getScanPhoto())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.yanzhu.xd.system.domain;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
@ -15,15 +16,15 @@ public class SurProjectAttendanceGroup extends BaseEntity
|
|||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
/** cfgid */
|
||||
@Excel(name = "cfgid")
|
||||
private Long cfgid;
|
||||
|
||||
/** 应用主键 */
|
||||
@Excel(name = "应用主键")
|
||||
/** 注册应用ID */
|
||||
@Excel(name = "注册应用ID")
|
||||
private String appId;
|
||||
|
||||
/** 服务器主键id */
|
||||
|
@ -86,10 +87,6 @@ public class SurProjectAttendanceGroup extends BaseEntity
|
|||
@Excel(name = "是否删除")
|
||||
private Integer deleted;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间")
|
||||
private Long createTimestamp;
|
||||
|
||||
/** 基础平台对应班组ID */
|
||||
@Excel(name = "基础平台对应班组ID")
|
||||
private Long platformGroupId;
|
||||
|
@ -106,259 +103,328 @@ public class SurProjectAttendanceGroup extends BaseEntity
|
|||
@Excel(name = "企业退场日期")
|
||||
private Long exitDate;
|
||||
|
||||
/** 书否删除 */
|
||||
@Excel(name = "书否删除")
|
||||
/** 是否有效 */
|
||||
@Excel(name = "是否有效")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
/** 时间戳 */
|
||||
@Excel(name = "时间戳")
|
||||
private Long createTimestamp;
|
||||
|
||||
public static SurProjectAttendanceGroup createHuazhu(JSONObject j) {
|
||||
SurProjectAttendanceGroup g=new SurProjectAttendanceGroup();
|
||||
g.companyId=""+j.getLongValue("unitId",0);
|
||||
g.companyName=j.getString("unitName");
|
||||
g.companyTypeId=j.getString("unitType");
|
||||
g.serverid=j.getString("id");
|
||||
g.enterDate=j.getLong("enterTime");
|
||||
g.exitDate=j.getLong("leaveTime");
|
||||
g.isDel=0l;
|
||||
return g;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceGroup createJgw(JSONObject j, boolean isDirectlyUnder) {
|
||||
SurProjectAttendanceGroup g=new SurProjectAttendanceGroup();
|
||||
g.serverid=j.getString("id");
|
||||
if(isDirectlyUnder) {
|
||||
g.companyId = j.getString("leaderTeamId");
|
||||
g.leaderName=j.getString("subcontractorId");
|
||||
g.leaderPhone="directly";
|
||||
}else{
|
||||
g.companyId=j.getString("subcontractorId");
|
||||
}
|
||||
g.companyName=j.getString("corpName");
|
||||
g.teamName=j.getString("teamName");
|
||||
|
||||
g.bizLicense=j.getString("corpCode");
|
||||
g.companyCode=j.getString("teamJobtype");
|
||||
|
||||
g.companyTypeId="0";
|
||||
g.enterDate=0l;
|
||||
g.exitDate=0l;
|
||||
g.isDel=0l;
|
||||
return g;
|
||||
}
|
||||
|
||||
public Long getCreateTimestamp() {
|
||||
return createTimestamp;
|
||||
}
|
||||
|
||||
public void setCreateTimestamp(Long createTimestamp) {
|
||||
this.createTimestamp = createTimestamp;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceGroup create(JSONObject json) {
|
||||
SurProjectAttendanceGroup g=new SurProjectAttendanceGroup();
|
||||
g.serverid=json.getString("id");
|
||||
g.bizLicense=json.getString("bizLicense");
|
||||
g.companyCode=json.getString("companyCode");
|
||||
g.companyId=""+json.getLongValue("companyId",0);
|
||||
g.companyName=json.getString("companyName");
|
||||
String typeId=json.getString("companyTypeId");
|
||||
if("1".equals(typeId)||"8".equals(typeId)||"9".equals(typeId)){
|
||||
typeId=typeId;
|
||||
}else{
|
||||
typeId="2";
|
||||
}
|
||||
g.companyTypeId=typeId;
|
||||
g.vendorId=json.getLongValue("vendorId",0);
|
||||
g.name=json.getString("name");
|
||||
g.leaderName=json.getString("leaderName");
|
||||
g.leaderPhone=json.getString("leaderPhone");
|
||||
g.teamId=json.getLongValue("teamId",0);
|
||||
g.teamName=json.getString("teamName");
|
||||
g.type=json.getLongValue("type",0);
|
||||
g.leaderId=json.getLongValue("leaderId",0);
|
||||
g.deleted=json.get("deleted")==null?0:(json.getBoolean("deleted")?1:0);
|
||||
g.platformGroupId=json.getLongValue("platformGroupId",0);
|
||||
g.platformTeamId=json.getLongValue("platformTeamId",0);
|
||||
g.enterDate=json.getLongValue("enterDate",0);
|
||||
g.exitDate=json.getLongValue("exitDate",0);
|
||||
g.isDel=0l;
|
||||
return g;
|
||||
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgid(Long cfgid)
|
||||
public void setCfgid(Long cfgid)
|
||||
{
|
||||
this.cfgid = cfgid;
|
||||
}
|
||||
|
||||
public Long getCfgid()
|
||||
public Long getCfgid()
|
||||
{
|
||||
return cfgid;
|
||||
}
|
||||
public void setAppId(String appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setServerid(String serverid)
|
||||
public void setServerid(String serverid)
|
||||
{
|
||||
this.serverid = serverid;
|
||||
}
|
||||
|
||||
public String getServerid()
|
||||
public String getServerid()
|
||||
{
|
||||
return serverid;
|
||||
}
|
||||
public void setBizLicense(String bizLicense)
|
||||
public void setBizLicense(String bizLicense)
|
||||
{
|
||||
this.bizLicense = bizLicense;
|
||||
}
|
||||
|
||||
public String getBizLicense()
|
||||
public String getBizLicense()
|
||||
{
|
||||
return bizLicense;
|
||||
}
|
||||
public void setCompanyCode(String companyCode)
|
||||
public void setCompanyCode(String companyCode)
|
||||
{
|
||||
this.companyCode = companyCode;
|
||||
}
|
||||
|
||||
public String getCompanyCode()
|
||||
public String getCompanyCode()
|
||||
{
|
||||
return companyCode;
|
||||
}
|
||||
public void setCompanyId(String companyId)
|
||||
public void setCompanyId(String companyId)
|
||||
{
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getCompanyId()
|
||||
public String getCompanyId()
|
||||
{
|
||||
return companyId;
|
||||
}
|
||||
public void setCompanyName(String companyName)
|
||||
public void setCompanyName(String companyName)
|
||||
{
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCompanyName()
|
||||
public String getCompanyName()
|
||||
{
|
||||
return companyName;
|
||||
}
|
||||
public void setCompanyTypeId(String companyTypeId)
|
||||
public void setCompanyTypeId(String companyTypeId)
|
||||
{
|
||||
this.companyTypeId = companyTypeId;
|
||||
}
|
||||
|
||||
public String getCompanyTypeId()
|
||||
public String getCompanyTypeId()
|
||||
{
|
||||
return companyTypeId;
|
||||
}
|
||||
public void setVendorId(Long vendorId)
|
||||
public void setVendorId(Long vendorId)
|
||||
{
|
||||
this.vendorId = vendorId;
|
||||
}
|
||||
|
||||
public Long getVendorId()
|
||||
public Long getVendorId()
|
||||
{
|
||||
return vendorId;
|
||||
}
|
||||
public void setName(String name)
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setLeaderName(String leaderName)
|
||||
public void setLeaderName(String leaderName)
|
||||
{
|
||||
this.leaderName = leaderName;
|
||||
}
|
||||
|
||||
public String getLeaderName()
|
||||
public String getLeaderName()
|
||||
{
|
||||
return leaderName;
|
||||
}
|
||||
public void setLeaderPhone(String leaderPhone)
|
||||
public void setLeaderPhone(String leaderPhone)
|
||||
{
|
||||
this.leaderPhone = leaderPhone;
|
||||
}
|
||||
|
||||
public String getLeaderPhone()
|
||||
public String getLeaderPhone()
|
||||
{
|
||||
return leaderPhone;
|
||||
}
|
||||
public void setTeamId(Long teamId)
|
||||
public void setTeamId(Long teamId)
|
||||
{
|
||||
this.teamId = teamId;
|
||||
}
|
||||
|
||||
public Long getTeamId()
|
||||
public Long getTeamId()
|
||||
{
|
||||
return teamId;
|
||||
}
|
||||
public void setTeamName(String teamName)
|
||||
public void setTeamName(String teamName)
|
||||
{
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
public String getTeamName()
|
||||
public String getTeamName()
|
||||
{
|
||||
return teamName;
|
||||
}
|
||||
public void setType(Long type)
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setLeaderId(Long leaderId)
|
||||
public void setLeaderId(Long leaderId)
|
||||
{
|
||||
this.leaderId = leaderId;
|
||||
}
|
||||
|
||||
public Long getLeaderId()
|
||||
public Long getLeaderId()
|
||||
{
|
||||
return leaderId;
|
||||
}
|
||||
public void setDeleted(Integer deleted)
|
||||
public void setDeleted(Integer deleted)
|
||||
{
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public Integer getDeleted()
|
||||
public Integer getDeleted()
|
||||
{
|
||||
return deleted;
|
||||
}
|
||||
public void setCreateTimestamp(Long createTimestamp)
|
||||
{
|
||||
this.createTimestamp = createTimestamp;
|
||||
}
|
||||
|
||||
public Long getCreateTimestamp()
|
||||
{
|
||||
return createTimestamp;
|
||||
}
|
||||
public void setPlatformGroupId(Long platformGroupId)
|
||||
public void setPlatformGroupId(Long platformGroupId)
|
||||
{
|
||||
this.platformGroupId = platformGroupId;
|
||||
}
|
||||
|
||||
public Long getPlatformGroupId()
|
||||
public Long getPlatformGroupId()
|
||||
{
|
||||
return platformGroupId;
|
||||
}
|
||||
public void setPlatformTeamId(Long platformTeamId)
|
||||
public void setPlatformTeamId(Long platformTeamId)
|
||||
{
|
||||
this.platformTeamId = platformTeamId;
|
||||
}
|
||||
|
||||
public Long getPlatformTeamId()
|
||||
public Long getPlatformTeamId()
|
||||
{
|
||||
return platformTeamId;
|
||||
}
|
||||
public void setEnterDate(Long enterDate)
|
||||
public void setEnterDate(Long enterDate)
|
||||
{
|
||||
this.enterDate = enterDate;
|
||||
}
|
||||
|
||||
public Long getEnterDate()
|
||||
public Long getEnterDate()
|
||||
{
|
||||
return enterDate;
|
||||
}
|
||||
public void setExitDate(Long exitDate)
|
||||
public void setExitDate(Long exitDate)
|
||||
{
|
||||
this.exitDate = exitDate;
|
||||
}
|
||||
|
||||
public Long getExitDate()
|
||||
public Long getExitDate()
|
||||
{
|
||||
return exitDate;
|
||||
}
|
||||
public void setIsDel(Long isDel)
|
||||
public void setIsDel(Long isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public Long getIsDel()
|
||||
public Long getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgid", getCfgid())
|
||||
.append("appId", getAppId())
|
||||
.append("serverid", getServerid())
|
||||
.append("bizLicense", getBizLicense())
|
||||
.append("companyCode", getCompanyCode())
|
||||
.append("companyId", getCompanyId())
|
||||
.append("companyName", getCompanyName())
|
||||
.append("companyTypeId", getCompanyTypeId())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("name", getName())
|
||||
.append("leaderName", getLeaderName())
|
||||
.append("leaderPhone", getLeaderPhone())
|
||||
.append("teamId", getTeamId())
|
||||
.append("teamName", getTeamName())
|
||||
.append("type", getType())
|
||||
.append("leaderId", getLeaderId())
|
||||
.append("deleted", getDeleted())
|
||||
.append("createTimestamp", getCreateTimestamp())
|
||||
.append("platformGroupId", getPlatformGroupId())
|
||||
.append("platformTeamId", getPlatformTeamId())
|
||||
.append("enterDate", getEnterDate())
|
||||
.append("exitDate", getExitDate())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
.append("id", getId())
|
||||
.append("cfgid", getCfgid())
|
||||
.append("serverid", getServerid())
|
||||
.append("bizLicense", getBizLicense())
|
||||
.append("companyCode", getCompanyCode())
|
||||
.append("companyId", getCompanyId())
|
||||
.append("companyName", getCompanyName())
|
||||
.append("companyTypeId", getCompanyTypeId())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("name", getName())
|
||||
.append("leaderName", getLeaderName())
|
||||
.append("leaderPhone", getLeaderPhone())
|
||||
.append("teamId", getTeamId())
|
||||
.append("teamName", getTeamName())
|
||||
.append("type", getType())
|
||||
.append("leaderId", getLeaderId())
|
||||
.append("deleted", getDeleted())
|
||||
.append("createTimestamp", getCreateTimestamp())
|
||||
.append("platformGroupId", getPlatformGroupId())
|
||||
.append("platformTeamId", getPlatformTeamId())
|
||||
.append("enterDate", getEnterDate())
|
||||
.append("exitDate", getExitDate())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
package com.yanzhu.xd.system.domain;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实名制人员对象 sur_project_attendance_user
|
||||
*
|
||||
|
@ -15,19 +22,20 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 配置项ID,可以获取项目ID和总包ID */
|
||||
@Excel(name = "配置项ID,可以获取项目ID和总包ID")
|
||||
|
||||
private Long cfgid;
|
||||
|
||||
/** 应用主键 */
|
||||
@Excel(name = "应用主键")
|
||||
/** 注册应用ID */
|
||||
|
||||
private String appId;
|
||||
|
||||
/** 厂商编号参考字典attendance_vendors */
|
||||
@Excel(name = "厂商编号参考字典attendance_vendors")
|
||||
|
||||
private String vendorsCode;
|
||||
|
||||
/** 工人id */
|
||||
|
@ -35,7 +43,7 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
private String workerId;
|
||||
|
||||
/** 项目工人履历id对于旧劳务,这个字段相当于工人的projectWorkerId,管理人员的registerManagerId */
|
||||
@Excel(name = "项目工人履历id对于旧劳务,这个字段相当于工人的projectWorkerId,管理人员的registerManagerId")
|
||||
|
||||
private Long laborWorkerId;
|
||||
|
||||
/** 人员类别0:工人,1:管理人员 */
|
||||
|
@ -43,7 +51,7 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
private Long workerCategory;
|
||||
|
||||
/** 工号 */
|
||||
@Excel(name = "工号")
|
||||
|
||||
private Long qrCode;
|
||||
|
||||
/** 姓名 */
|
||||
|
@ -79,11 +87,11 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
private String photo;
|
||||
|
||||
/** 近照 */
|
||||
@Excel(name = "近照")
|
||||
|
||||
private String recentPhoto;
|
||||
|
||||
/** 所属班组ID */
|
||||
@Excel(name = "所属班组ID")
|
||||
|
||||
private String groupId;
|
||||
|
||||
/** 所属班组 */
|
||||
|
@ -136,7 +144,7 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
|
||||
/** 队伍id */
|
||||
@Excel(name = "队伍id")
|
||||
private Long teamId;
|
||||
private Integer teamId;
|
||||
|
||||
/** 队伍名称 */
|
||||
@Excel(name = "队伍名称")
|
||||
|
@ -150,369 +158,576 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
@Excel(name = "服务返回的JSON")
|
||||
private String other;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
/** 是否有效 */
|
||||
@Excel(name = "是否有效")
|
||||
private Long isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
/** 人员部门类型 */
|
||||
@Excel(name = "人员部门类型")
|
||||
private String companyTypeId;
|
||||
|
||||
/** 重要::yanzhu接口接收base64图片 */
|
||||
private String recentPhotoBase64;
|
||||
|
||||
public String getRecentPhotoBase64() {
|
||||
return recentPhotoBase64;
|
||||
}
|
||||
|
||||
public void setRecentPhotoBase64(String recentPhotoBase64) {
|
||||
this.recentPhotoBase64 = recentPhotoBase64;
|
||||
}
|
||||
|
||||
@Excel(name = "进场时间")
|
||||
private Date inTime;
|
||||
@Excel(name = "离场时间")
|
||||
private Date outTime;
|
||||
|
||||
public static SurProjectAttendanceUser createFromHuazhu(JSONObject j) {
|
||||
SurProjectAttendanceUser u=new SurProjectAttendanceUser();
|
||||
u.workerId=j.getString("id");
|
||||
u.name=j.getString("name");
|
||||
u.ethnic=j.getString("nationalName");
|
||||
u.nativePlace=j.getString("provinceName")+j.getString("cityName");
|
||||
u.gender=j.getLongValue("sex",0)==0l?1l:0l;
|
||||
u.birthDate=j.getLongValue("birthday",0);
|
||||
u.phone=j.getString("phone");
|
||||
u.degreeName=j.getString("levelOfEducation");
|
||||
u.recentPhoto=j.getString("profile");
|
||||
u.groupId=j.getString("teamId");
|
||||
u.groupName=j.getString("teamName");
|
||||
u.workTypeCode=j.getString("workerTypeId");
|
||||
u.workTypeName=j.getString("workerTypeName");
|
||||
u.state=j.getLongValue("status",1)==2l?0l:1l;
|
||||
long enterTime=j.getLong("enterTime");
|
||||
if(enterTime>0){
|
||||
u.enterDate= DateUtil.format(DateUtil.date(enterTime),"yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
long leaveTime=j.getLong("leaveTime");
|
||||
if(leaveTime>0) {
|
||||
u.exitDate = DateUtil.format(DateUtil.date(leaveTime), "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
u.vendorId=j.getLongValue("unitProjectId",0);
|
||||
u.companyId=""+j.getLongValue("unitId",0);
|
||||
u.companyName=j.getString("unitName");
|
||||
u.teamName=j.getString("teamName");
|
||||
return u;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceUser createFromJgw(JSONObject j) {
|
||||
SurProjectAttendanceUser u=new SurProjectAttendanceUser();
|
||||
u.workerId=j.getString("workerId");
|
||||
u.name=j.getString("name");
|
||||
u.ethnic=j.getString("minor");
|
||||
u.phone=j.getString("workPhone");
|
||||
u.nativePlace=j.getString("address");
|
||||
u.gender=j.getLongValue("sex",0)==0l?1l:0l;
|
||||
String tmp=j.getString("birthday");
|
||||
if(StrUtil.isNotEmpty(tmp)) {
|
||||
try {
|
||||
u.birthDate = DateUtil.parse(tmp).getTime();
|
||||
}catch (Exception ex){
|
||||
|
||||
}
|
||||
}
|
||||
u.photo=j.getString("headImage");
|
||||
u.degreeName=j.getString("education");
|
||||
u.recentPhoto=j.getString("vaildPhoto");
|
||||
u.groupId="";
|
||||
u.groupName="";
|
||||
u.workTypeCode="";
|
||||
u.workTypeName=j.getString("jobtype");
|
||||
u.state="01".equals( j.getString("workerStatus"))?0l:1l;
|
||||
String workDate=j.getString("workDate");
|
||||
if(!StrUtil.isEmpty(workDate)){
|
||||
u.enterDate=workDate;
|
||||
}
|
||||
u.vendorId=0l;
|
||||
u.companyId=j.getString("subcontractorId");
|
||||
u.companyName="";
|
||||
u.teamName="";
|
||||
u.isDel=0l;
|
||||
JSONArray ja=j.getJSONArray("corpName");
|
||||
if(ja!=null && ja.size()>0){
|
||||
Object obj=ja.get(0);
|
||||
if(obj!=null){
|
||||
u.companyName=obj.toString();
|
||||
}
|
||||
}
|
||||
|
||||
u.leader=j.getInteger("isAdmin")==1?1:0;
|
||||
return u;
|
||||
}
|
||||
|
||||
public Date getInTime() {
|
||||
return inTime;
|
||||
}
|
||||
|
||||
public void setInTime(Date inTime) {
|
||||
this.inTime = inTime;
|
||||
}
|
||||
|
||||
public Date getOutTime() {
|
||||
return outTime;
|
||||
}
|
||||
|
||||
public void setOutTime(Date outTime) {
|
||||
this.outTime = outTime;
|
||||
}
|
||||
|
||||
private Long projectId;
|
||||
private Long subDeptId;
|
||||
private Long deptId;
|
||||
|
||||
private List<String> workerIds;
|
||||
|
||||
public List<String> getWorkerIds() {
|
||||
return workerIds;
|
||||
}
|
||||
|
||||
public void setWorkerIds(List<String> workerIds) {
|
||||
this.workerIds = workerIds;
|
||||
}
|
||||
|
||||
private int size;
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(int size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
private int index;
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Long getSubDeptId() {
|
||||
return subDeptId;
|
||||
}
|
||||
|
||||
public void setSubDeptId(Long subDeptId) {
|
||||
this.subDeptId = subDeptId;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceUser create(JSONObject json) {
|
||||
SurProjectAttendanceUser u=new SurProjectAttendanceUser();
|
||||
u.workerId=json.getString("workerId");
|
||||
u.laborWorkerId=json.getLongValue("laborWorkerId",0);
|
||||
u.workerCategory=json.getLongValue("workerCategory",0);
|
||||
u.qrCode=json.getLongValue("qrCode",0);
|
||||
u.name=json.getString("name");
|
||||
u.ethnic=json.getString("ethnic");
|
||||
u.nativePlace=json.getString("nativePlace");
|
||||
u.gender=json.getLongValue("gender",0);
|
||||
u.birthDate=json.getLongValue("birthDate",0);
|
||||
u.phone=json.getString("phone");
|
||||
u.recentPhoto=json.getString("recentPhoto");
|
||||
u.groupId=json.getString("groupId");
|
||||
u.groupName=json.getString("groupName");
|
||||
u.leader=json.getBooleanValue("leader",false)?1:0;
|
||||
u.workTypeCode=json.getString("workTypeCode");
|
||||
u.workTypeName=json.getString("workTypeName");
|
||||
u.specWorkType=json.getBooleanValue("specWorkType",false)?1:0;
|
||||
u.hatCode=json.getString("hatCode");
|
||||
u.state=json.getLongValue("status",0);
|
||||
u.enterDate=json.getString("enterDate");
|
||||
u.exitDate=json.getString("exitDate");
|
||||
u.companyId=""+json.getLongValue("companyId",0);
|
||||
u.companyName=json.getString("companyName");
|
||||
u.vendorId=json.getLongValue("vendorId",0);
|
||||
u.teamId=json.getInteger("teamId");
|
||||
u.teamName=json.getString("teamName");
|
||||
u.enterType=json.getString("enterType");
|
||||
u.isDel=0l;
|
||||
return u;
|
||||
}
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCfgid(Long cfgid)
|
||||
public void setCfgid(Long cfgid)
|
||||
{
|
||||
this.cfgid = cfgid;
|
||||
}
|
||||
|
||||
public Long getCfgid()
|
||||
public Long getCfgid()
|
||||
{
|
||||
return cfgid;
|
||||
}
|
||||
public void setAppId(String appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setVendorsCode(String vendorsCode)
|
||||
public void setVendorsCode(String vendorsCode)
|
||||
{
|
||||
this.vendorsCode = vendorsCode;
|
||||
}
|
||||
|
||||
public String getVendorsCode()
|
||||
public String getVendorsCode()
|
||||
{
|
||||
return vendorsCode;
|
||||
}
|
||||
public void setWorkerId(String workerId)
|
||||
public void setWorkerId(String workerId)
|
||||
{
|
||||
this.workerId = workerId;
|
||||
}
|
||||
|
||||
public String getWorkerId()
|
||||
public String getWorkerId()
|
||||
{
|
||||
return workerId;
|
||||
}
|
||||
public void setLaborWorkerId(Long laborWorkerId)
|
||||
public void setLaborWorkerId(Long laborWorkerId)
|
||||
{
|
||||
this.laborWorkerId = laborWorkerId;
|
||||
}
|
||||
|
||||
public Long getLaborWorkerId()
|
||||
public Long getLaborWorkerId()
|
||||
{
|
||||
return laborWorkerId;
|
||||
}
|
||||
public void setWorkerCategory(Long workerCategory)
|
||||
public void setWorkerCategory(Long workerCategory)
|
||||
{
|
||||
this.workerCategory = workerCategory;
|
||||
}
|
||||
|
||||
public Long getWorkerCategory()
|
||||
public Long getWorkerCategory()
|
||||
{
|
||||
return workerCategory;
|
||||
}
|
||||
public void setQrCode(Long qrCode)
|
||||
public void setQrCode(Long qrCode)
|
||||
{
|
||||
this.qrCode = qrCode;
|
||||
}
|
||||
|
||||
public Long getQrCode()
|
||||
public Long getQrCode()
|
||||
{
|
||||
return qrCode;
|
||||
}
|
||||
public void setName(String name)
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setEthnic(String ethnic)
|
||||
public void setEthnic(String ethnic)
|
||||
{
|
||||
this.ethnic = ethnic;
|
||||
}
|
||||
|
||||
public String getEthnic()
|
||||
public String getEthnic()
|
||||
{
|
||||
return ethnic;
|
||||
}
|
||||
public void setNativePlace(String nativePlace)
|
||||
public void setNativePlace(String nativePlace)
|
||||
{
|
||||
this.nativePlace = nativePlace;
|
||||
}
|
||||
|
||||
public String getNativePlace()
|
||||
public String getNativePlace()
|
||||
{
|
||||
return nativePlace;
|
||||
}
|
||||
public void setGender(Long gender)
|
||||
public void setGender(Long gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public Long getGender()
|
||||
public Long getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
public void setBirthDate(Long birthDate)
|
||||
public void setBirthDate(Long birthDate)
|
||||
{
|
||||
this.birthDate = birthDate;
|
||||
}
|
||||
|
||||
public Long getBirthDate()
|
||||
public Long getBirthDate()
|
||||
{
|
||||
return birthDate;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setDegreeName(String degreeName)
|
||||
public void setDegreeName(String degreeName)
|
||||
{
|
||||
this.degreeName = degreeName;
|
||||
}
|
||||
|
||||
public String getDegreeName()
|
||||
public String getDegreeName()
|
||||
{
|
||||
return degreeName;
|
||||
}
|
||||
public void setPhoto(String photo)
|
||||
public void setPhoto(String photo)
|
||||
{
|
||||
this.photo = photo;
|
||||
}
|
||||
|
||||
public String getPhoto()
|
||||
public String getPhoto()
|
||||
{
|
||||
return photo;
|
||||
}
|
||||
public void setRecentPhoto(String recentPhoto)
|
||||
public void setRecentPhoto(String recentPhoto)
|
||||
{
|
||||
this.recentPhoto = recentPhoto;
|
||||
}
|
||||
|
||||
public String getRecentPhoto()
|
||||
public String getRecentPhoto()
|
||||
{
|
||||
return recentPhoto;
|
||||
}
|
||||
public void setGroupId(String groupId)
|
||||
public void setGroupId(String groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getGroupId()
|
||||
public String getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
public void setGroupName(String groupName)
|
||||
public void setGroupName(String groupName)
|
||||
{
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getGroupName()
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
public void setLeader(Integer leader)
|
||||
public void setLeader(Integer leader)
|
||||
{
|
||||
this.leader = leader;
|
||||
}
|
||||
|
||||
public Integer getLeader()
|
||||
public Integer getLeader()
|
||||
{
|
||||
return leader;
|
||||
}
|
||||
public void setWorkTypeCode(String workTypeCode)
|
||||
public void setWorkTypeCode(String workTypeCode)
|
||||
{
|
||||
this.workTypeCode = workTypeCode;
|
||||
}
|
||||
|
||||
public String getWorkTypeCode()
|
||||
public String getWorkTypeCode()
|
||||
{
|
||||
return workTypeCode;
|
||||
}
|
||||
public void setWorkTypeName(String workTypeName)
|
||||
public void setWorkTypeName(String workTypeName)
|
||||
{
|
||||
this.workTypeName = workTypeName;
|
||||
}
|
||||
|
||||
public String getWorkTypeName()
|
||||
public String getWorkTypeName()
|
||||
{
|
||||
return workTypeName;
|
||||
}
|
||||
public void setSpecWorkType(Integer specWorkType)
|
||||
public void setSpecWorkType(Integer specWorkType)
|
||||
{
|
||||
this.specWorkType = specWorkType;
|
||||
}
|
||||
|
||||
public Integer getSpecWorkType()
|
||||
public Integer getSpecWorkType()
|
||||
{
|
||||
return specWorkType;
|
||||
}
|
||||
public void setHatCode(String hatCode)
|
||||
public void setHatCode(String hatCode)
|
||||
{
|
||||
this.hatCode = hatCode;
|
||||
}
|
||||
|
||||
public String getHatCode()
|
||||
public String getHatCode()
|
||||
{
|
||||
return hatCode;
|
||||
}
|
||||
public void setState(Long state)
|
||||
public void setState(Long state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getState()
|
||||
public Long getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setEnterDate(String enterDate)
|
||||
public void setEnterDate(String enterDate)
|
||||
{
|
||||
this.enterDate = enterDate;
|
||||
}
|
||||
|
||||
public String getEnterDate()
|
||||
public String getEnterDate()
|
||||
{
|
||||
return enterDate;
|
||||
}
|
||||
public void setExitDate(String exitDate)
|
||||
public void setExitDate(String exitDate)
|
||||
{
|
||||
this.exitDate = exitDate;
|
||||
}
|
||||
|
||||
public String getExitDate()
|
||||
public String getExitDate()
|
||||
{
|
||||
return exitDate;
|
||||
}
|
||||
public void setCompanyId(String companyId)
|
||||
public void setCompanyId(String companyId)
|
||||
{
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getCompanyId()
|
||||
public String getCompanyId()
|
||||
{
|
||||
return companyId;
|
||||
}
|
||||
public void setCompanyName(String companyName)
|
||||
public void setCompanyName(String companyName)
|
||||
{
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCompanyName()
|
||||
public String getCompanyName()
|
||||
{
|
||||
return companyName;
|
||||
}
|
||||
public void setVendorId(Long vendorId)
|
||||
public void setVendorId(Long vendorId)
|
||||
{
|
||||
this.vendorId = vendorId;
|
||||
}
|
||||
|
||||
public Long getVendorId()
|
||||
public Long getVendorId()
|
||||
{
|
||||
return vendorId;
|
||||
}
|
||||
public void setTeamId(Long teamId)
|
||||
public void setTeamId(Integer teamId)
|
||||
{
|
||||
this.teamId = teamId;
|
||||
}
|
||||
|
||||
public Long getTeamId()
|
||||
public Integer getTeamId()
|
||||
{
|
||||
return teamId;
|
||||
}
|
||||
public void setTeamName(String teamName)
|
||||
public void setTeamName(String teamName)
|
||||
{
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
public String getTeamName()
|
||||
public String getTeamName()
|
||||
{
|
||||
return teamName;
|
||||
}
|
||||
public void setEnterType(String enterType)
|
||||
public void setEnterType(String enterType)
|
||||
{
|
||||
this.enterType = enterType;
|
||||
}
|
||||
|
||||
public String getEnterType()
|
||||
public String getEnterType()
|
||||
{
|
||||
return enterType;
|
||||
}
|
||||
public void setOther(String other)
|
||||
public void setOther(String other)
|
||||
{
|
||||
this.other = other;
|
||||
}
|
||||
|
||||
public String getOther()
|
||||
public String getOther()
|
||||
{
|
||||
return other;
|
||||
}
|
||||
public void setIsDel(Long isDel)
|
||||
public void setIsDel(Long isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public Long getIsDel()
|
||||
public Long getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getCompanyTypeId() {
|
||||
return companyTypeId;
|
||||
}
|
||||
|
||||
public void setCompanyTypeId(String companyTypeId) {
|
||||
this.companyTypeId = companyTypeId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cfgid", getCfgid())
|
||||
.append("appId", getAppId())
|
||||
.append("vendorsCode", getVendorsCode())
|
||||
.append("workerId", getWorkerId())
|
||||
.append("laborWorkerId", getLaborWorkerId())
|
||||
.append("workerCategory", getWorkerCategory())
|
||||
.append("qrCode", getQrCode())
|
||||
.append("name", getName())
|
||||
.append("ethnic", getEthnic())
|
||||
.append("nativePlace", getNativePlace())
|
||||
.append("gender", getGender())
|
||||
.append("birthDate", getBirthDate())
|
||||
.append("phone", getPhone())
|
||||
.append("degreeName", getDegreeName())
|
||||
.append("photo", getPhoto())
|
||||
.append("recentPhoto", getRecentPhoto())
|
||||
.append("groupId", getGroupId())
|
||||
.append("groupName", getGroupName())
|
||||
.append("leader", getLeader())
|
||||
.append("workTypeCode", getWorkTypeCode())
|
||||
.append("workTypeName", getWorkTypeName())
|
||||
.append("specWorkType", getSpecWorkType())
|
||||
.append("hatCode", getHatCode())
|
||||
.append("state", getState())
|
||||
.append("enterDate", getEnterDate())
|
||||
.append("exitDate", getExitDate())
|
||||
.append("companyId", getCompanyId())
|
||||
.append("companyName", getCompanyName())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("teamId", getTeamId())
|
||||
.append("teamName", getTeamName())
|
||||
.append("enterType", getEnterType())
|
||||
.append("other", getOther())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
.append("id", getId())
|
||||
.append("cfgid", getCfgid())
|
||||
.append("vendorsCode", getVendorsCode())
|
||||
.append("workerId", getWorkerId())
|
||||
.append("laborWorkerId", getLaborWorkerId())
|
||||
.append("workerCategory", getWorkerCategory())
|
||||
.append("qrCode", getQrCode())
|
||||
.append("name", getName())
|
||||
.append("ethnic", getEthnic())
|
||||
.append("nativePlace", getNativePlace())
|
||||
.append("gender", getGender())
|
||||
.append("birthDate", getBirthDate())
|
||||
.append("phone", getPhone())
|
||||
.append("degreeName", getDegreeName())
|
||||
.append("photo", getPhoto())
|
||||
.append("recentPhoto", getRecentPhoto())
|
||||
.append("groupId", getGroupId())
|
||||
.append("groupName", getGroupName())
|
||||
.append("leader", getLeader())
|
||||
.append("workTypeCode", getWorkTypeCode())
|
||||
.append("workTypeName", getWorkTypeName())
|
||||
.append("specWorkType", getSpecWorkType())
|
||||
.append("hatCode", getHatCode())
|
||||
.append("state", getState())
|
||||
.append("enterDate", getEnterDate())
|
||||
.append("exitDate", getExitDate())
|
||||
.append("companyId", getCompanyId())
|
||||
.append("companyName", getCompanyName())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("teamId", getTeamId())
|
||||
.append("teamName", getTeamName())
|
||||
.append("enterType", getEnterType())
|
||||
.append("other", getOther())
|
||||
.append("remark", getRemark())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,50 +12,52 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceCfg;
|
|||
public interface SurProjectAttendanceCfgMapper
|
||||
{
|
||||
/**
|
||||
* 查询考勤配置
|
||||
*
|
||||
* @param id 考勤配置ID
|
||||
* @return 考勤配置
|
||||
* 查询项目考勤配置
|
||||
*
|
||||
* @param id 项目考勤配置主键
|
||||
* @return 项目考勤配置
|
||||
*/
|
||||
public SurProjectAttendanceCfg selectSurProjectAttendanceCfgById(Long id);
|
||||
|
||||
/**
|
||||
* 查询考勤配置列表
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* @return 考勤配置集合
|
||||
* 查询项目考勤配置列表
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 项目考勤配置集合
|
||||
*/
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgList(SurProjectAttendanceCfg surProjectAttendanceCfg);
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgList(SurProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||
|
||||
/**
|
||||
* 新增考勤配置
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* 新增项目考勤配置
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceCfg(SurProjectAttendanceCfg surProjectAttendanceCfg);
|
||||
public int insertSurProjectAttendanceCfg(SurProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||
|
||||
/**
|
||||
* 修改考勤配置
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* 修改项目考勤配置
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceCfg(SurProjectAttendanceCfg surProjectAttendanceCfg);
|
||||
public int updateSurProjectAttendanceCfg(SurProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||
|
||||
/**
|
||||
* 删除考勤配置
|
||||
*
|
||||
* @param id 考勤配置ID
|
||||
* 删除项目考勤配置
|
||||
*
|
||||
* @param id 项目考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceCfgById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除考勤配置
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除项目考勤配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceCfgByIds(String[] ids);
|
||||
public int deleteSurProjectAttendanceCfgByIds(Long[] ids);
|
||||
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgListForAllInfo(SurProjectAttendanceCfg where);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.yanzhu.xd.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceData;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 考勤数据Mapper接口
|
||||
|
@ -12,50 +15,121 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceData;
|
|||
public interface SurProjectAttendanceDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询考勤数据
|
||||
*
|
||||
* @param id 考勤数据ID
|
||||
* @return 考勤数据
|
||||
* 查询劳务实名制管理
|
||||
*
|
||||
* @param id 劳务实名制管理主键
|
||||
* @return 劳务实名制管理
|
||||
*/
|
||||
public SurProjectAttendanceData selectSurProjectAttendanceDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询考勤数据列表
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* @return 考勤数据集合
|
||||
* 查询劳务实名制管理列表
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 劳务实名制管理集合
|
||||
*/
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataList(SurProjectAttendanceData surProjectAttendanceData);
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataList(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
/**
|
||||
* 新增考勤数据
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* 查询考勤信息
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 劳务实名制管理集合
|
||||
*/
|
||||
public SurProjectAttendanceData findCurrentAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataListEx(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
/**
|
||||
* 新增劳务实名制管理
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceData(SurProjectAttendanceData surProjectAttendanceData);
|
||||
public int insertSurProjectAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
/**
|
||||
* 修改考勤数据
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* 修改劳务实名制管理
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceData(SurProjectAttendanceData surProjectAttendanceData);
|
||||
public int updateSurProjectAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
/**
|
||||
* 删除考勤数据
|
||||
*
|
||||
* @param id 考勤数据ID
|
||||
* 删除劳务实名制管理
|
||||
*
|
||||
* @param id 劳务实名制管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除考勤数据
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除劳务实名制管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceDataByIds(String[] ids);
|
||||
public int deleteSurProjectAttendanceDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除劳务实名制管理
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceDataByParams(List<String> list);
|
||||
|
||||
/**
|
||||
* 批量新增劳务实名制考勤管理
|
||||
*
|
||||
* @param quartzProjectAttendanceDataList 劳务实名制考勤管理列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSurProjectAttendanceData(@Param("list") List<SurProjectAttendanceData> quartzProjectAttendanceDataList, @Param("year") String year);
|
||||
|
||||
public Long getLastServerId(SurProjectAttendanceData where);
|
||||
|
||||
List<SurProjectAttendanceData> groupAllByComany(SurProjectAttendanceData where);
|
||||
List<SurProjectAttendanceData> groupByComany(SurProjectAttendanceData where);
|
||||
|
||||
public Long getHuazhuPage(SurProjectAttendanceData where);
|
||||
|
||||
|
||||
public List<Map<String,Object>> initOtherData(Map<String,Object> data);
|
||||
|
||||
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data);
|
||||
|
||||
public String findHuaZhuCompanyType(String deptName);
|
||||
|
||||
public List<SurProjectAttendanceData> todayAttendance(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> findGroupAllByDays(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 统计所有数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> findGroupAllByParams(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 统计考勤数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupDataByParams(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 考勤数据列表
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceData> attendanceDataList(SurProjectAttendanceData where);
|
||||
|
||||
public List<SurProjectAttendanceData> groupTodayCompanyTypeId(SurProjectAttendanceData where);
|
||||
}
|
||||
|
|
|
@ -12,50 +12,74 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceGroup;
|
|||
public interface SurProjectAttendanceGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询班组信息
|
||||
*
|
||||
* @param id 班组信息ID
|
||||
* @return 班组信息
|
||||
* 查询广联达班组信息
|
||||
*
|
||||
* @param id 广联达班组信息主键
|
||||
* @return 广联达班组信息
|
||||
*/
|
||||
public SurProjectAttendanceGroup selectSurProjectAttendanceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询班组信息列表
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* @return 班组信息集合
|
||||
* 查询广联达班组信息列表
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 广联达班组信息集合
|
||||
*/
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupList(SurProjectAttendanceGroup surProjectAttendanceGroup);
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupViewList(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 新增班组信息
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* 查询广联达班组信息列表
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 广联达班组信息集合
|
||||
*/
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupList(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 新增广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceGroup(SurProjectAttendanceGroup surProjectAttendanceGroup);
|
||||
public int insertSurProjectAttendanceGroup(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 修改班组信息
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* 修改广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceGroup(SurProjectAttendanceGroup surProjectAttendanceGroup);
|
||||
public int updateSurProjectAttendanceGroup(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 删除班组信息
|
||||
*
|
||||
* @param id 班组信息ID
|
||||
* 删除广联达班组信息
|
||||
*
|
||||
* @param id 广联达班组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除班组信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除广联达班组信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceGroupByIds(String[] ids);
|
||||
public int deleteSurProjectAttendanceGroupByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除广联达班组信息
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceGroupByParams(List<String> list);
|
||||
|
||||
/**
|
||||
* 批量新增广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroupList 广联达班组信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSurProjectAttendanceGroup(List<SurProjectAttendanceGroup> quartzProjectAttendanceGroupList);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.xd.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceUser;
|
||||
|
||||
/**
|
||||
|
@ -12,50 +14,154 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceUser;
|
|||
public interface SurProjectAttendanceUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询实名制人员
|
||||
*
|
||||
* @param id 实名制人员ID
|
||||
* @return 实名制人员
|
||||
* 查询考勤人员基本属性
|
||||
*
|
||||
* @param id 考勤人员基本属性主键
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
public SurProjectAttendanceUser selectSurProjectAttendanceUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询实名制人员列表
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* @return 实名制人员集合
|
||||
* 查询考勤人员信息
|
||||
*
|
||||
* @param quartzProjectAttendanceUser
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserList(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
public SurProjectAttendanceUser findCurrentAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 新增实名制人员
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* 查询[研筑]考勤人员信息
|
||||
*
|
||||
* @param quartzProjectAttendanceUser
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
public SurProjectAttendanceUser findYzCurrentAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 查询考勤人员基本属性列表
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 考勤人员基本属性集合
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserList(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
|
||||
public List<SurProjectAttendanceUser> querySurProjectAttendanceUserList(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
/**
|
||||
* 新增考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceUser(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
public int insertSurProjectAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 修改实名制人员
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* 修改考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceUser(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
public int updateSurProjectAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 删除实名制人员
|
||||
*
|
||||
* @param id 实名制人员ID
|
||||
* 删除考勤人员基本属性
|
||||
*
|
||||
* @param id 考勤人员基本属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceUserById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除实名制人员
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除考勤人员基本属性
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceUserByIds(String[] ids);
|
||||
public int deleteSurProjectAttendanceUserByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除考勤人员基本属性
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceUserByParams(List<String> list);
|
||||
|
||||
/**
|
||||
* 批量新增考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUserList 考勤人员基本属性列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSurProjectAttendanceUser(List<SurProjectAttendanceUser> quartzProjectAttendanceUserList);
|
||||
|
||||
/**
|
||||
* 下面三个方法完成考勤记录分页查询
|
||||
* countAttendance 获取总记录条数
|
||||
* queryAttendanceUsers 获取当前页workerIds
|
||||
* queryAttendanceByUserIds 根据workerIds查询一页数据然后组装
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> queryAttendanceByUserIds(SurProjectAttendanceUser where);
|
||||
public long countAttendance(SurProjectAttendanceUser where);
|
||||
public List<SurProjectAttendanceUser> queryAttendanceUsers(SurProjectAttendanceUser where);
|
||||
|
||||
public long countTodayAttendance(SurProjectAttendanceUser where);
|
||||
|
||||
|
||||
public List<SurProjectAttendanceUser> todayAttendance(SurProjectAttendanceUser where);
|
||||
public List<SurProjectAttendanceUser> todayAttendanceData(List<String> list);
|
||||
|
||||
public List<SurProjectAttendanceUser> todayAttendanceOtherData(Map<String,Object> data);
|
||||
|
||||
/**
|
||||
* 在岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<SurProjectAttendanceUser> queryWorkerOnDuty(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupUserByParams(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 在岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> attendanceUserList(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> findUserAllByDays(Long projectId);
|
||||
|
||||
/**
|
||||
* 按部门汇总在岗人数
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<SurProjectAttendanceUser> groupByWorkerOnDutyByDept(SurProjectAttendanceUser where);
|
||||
/**
|
||||
* 按部门汇总在岗|离岗人数
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<SurProjectAttendanceUser> groupByWorkerByDept(SurProjectAttendanceUser where);
|
||||
/**
|
||||
* 在岗|离岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<SurProjectAttendanceUser> queryWorkerByState(SurProjectAttendanceUser where);
|
||||
|
||||
}
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface SysNativeMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteSysNativeByIds(String[] ids);
|
||||
|
||||
List<SysNative> selectSysNativeListById(long id);
|
||||
}
|
||||
|
|
|
@ -12,49 +12,49 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceCfg;
|
|||
public interface ISurProjectAttendanceCfgService
|
||||
{
|
||||
/**
|
||||
* 查询考勤配置
|
||||
*
|
||||
* @param id 考勤配置ID
|
||||
* @return 考勤配置
|
||||
* 查询项目考勤配置
|
||||
*
|
||||
* @param id 项目考勤配置主键
|
||||
* @return 项目考勤配置
|
||||
*/
|
||||
public SurProjectAttendanceCfg selectSurProjectAttendanceCfgById(Long id);
|
||||
|
||||
/**
|
||||
* 查询考勤配置列表
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* @return 考勤配置集合
|
||||
* 查询项目考勤配置列表
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 项目考勤配置集合
|
||||
*/
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgList(SurProjectAttendanceCfg surProjectAttendanceCfg);
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgList(SurProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||
|
||||
/**
|
||||
* 新增考勤配置
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* 新增项目考勤配置
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceCfg(SurProjectAttendanceCfg surProjectAttendanceCfg);
|
||||
public int insertSurProjectAttendanceCfg(SurProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||
|
||||
/**
|
||||
* 修改考勤配置
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* 修改项目考勤配置
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceCfg(SurProjectAttendanceCfg surProjectAttendanceCfg);
|
||||
public int updateSurProjectAttendanceCfg(SurProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||
|
||||
/**
|
||||
* 批量删除考勤配置
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除项目考勤配置
|
||||
*
|
||||
* @param ids 需要删除的项目考勤配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceCfgByIds(String ids);
|
||||
public int deleteSurProjectAttendanceCfgByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除考勤配置信息
|
||||
*
|
||||
* @param id 考勤配置ID
|
||||
* 删除项目考勤配置信息
|
||||
*
|
||||
* @param id 项目考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceCfgById(Long id);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.xd.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceData;
|
||||
|
||||
/**
|
||||
|
@ -12,50 +14,128 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceData;
|
|||
public interface ISurProjectAttendanceDataService
|
||||
{
|
||||
/**
|
||||
* 查询考勤数据
|
||||
*
|
||||
* @param id 考勤数据ID
|
||||
* @return 考勤数据
|
||||
* 查询劳务实名制管理
|
||||
*
|
||||
* @param id 劳务实名制管理主键
|
||||
* @return 劳务实名制管理
|
||||
*/
|
||||
public SurProjectAttendanceData selectSurProjectAttendanceDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询考勤数据列表
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* @return 考勤数据集合
|
||||
* 查询劳务实名制管理列表
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 劳务实名制管理集合
|
||||
*/
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataList(SurProjectAttendanceData surProjectAttendanceData);
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataList(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
/**
|
||||
* 新增考勤数据
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* 查询考勤信息
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 劳务实名制管理集合
|
||||
*/
|
||||
public SurProjectAttendanceData findCurrentAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataListEx(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
/**
|
||||
* 新增劳务实名制管理
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceData(SurProjectAttendanceData surProjectAttendanceData);
|
||||
public int insertSurProjectAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
/**
|
||||
* 修改考勤数据
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* 修改劳务实名制管理
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceData(SurProjectAttendanceData surProjectAttendanceData);
|
||||
public int updateSurProjectAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData);
|
||||
|
||||
/**
|
||||
* 批量删除考勤数据
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除劳务实名制管理
|
||||
*
|
||||
* @param ids 需要删除的劳务实名制管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceDataByIds(String ids);
|
||||
public int deleteSurProjectAttendanceDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除考勤数据信息
|
||||
*
|
||||
* @param id 考勤数据ID
|
||||
* 删除劳务实名制管理信息
|
||||
*
|
||||
* @param id 劳务实名制管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除劳务实名制管理
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceDataByParams(List<String> list);
|
||||
|
||||
/**
|
||||
* 批量新增劳务实名制考勤管理
|
||||
*
|
||||
* @param quartzProjectAttendanceDataList 劳务实名制管理考勤列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSurProjectAttendanceData(List<SurProjectAttendanceData> quartzProjectAttendanceDataList);
|
||||
|
||||
public void add(SurProjectAttendanceData sdata);
|
||||
|
||||
public String getLastServerId(SurProjectAttendanceData where);
|
||||
|
||||
public List<SurProjectAttendanceData> groupByComany(SurProjectAttendanceData where);
|
||||
|
||||
public Long getHuazhuPage( SurProjectAttendanceData where);
|
||||
|
||||
public List<SurProjectAttendanceData> groupAllByComany(SurProjectAttendanceData where);
|
||||
|
||||
public List<Map<String,Object>> initOtherData(Map<String,Object> data);
|
||||
|
||||
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data);
|
||||
|
||||
List<SurProjectAttendanceData> todayAttendance(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 统计所有数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupAllByParams(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> findGroupAllByDays(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 考勤数据列表
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceData> attendanceDataList(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 统计考勤数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupDataByParams(SurProjectAttendanceData where);
|
||||
|
||||
List<SurProjectAttendanceData> groupTodayCompanyTypeId(SurProjectAttendanceData where);
|
||||
|
||||
/**
|
||||
* 指增加
|
||||
* @param addList
|
||||
*/
|
||||
void addList(List<SurProjectAttendanceData> addList);
|
||||
}
|
||||
|
|
|
@ -12,50 +12,82 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceGroup;
|
|||
public interface ISurProjectAttendanceGroupService
|
||||
{
|
||||
/**
|
||||
* 查询班组信息
|
||||
*
|
||||
* @param id 班组信息ID
|
||||
* @return 班组信息
|
||||
* 查询广联达班组信息
|
||||
*
|
||||
* @param id 广联达班组信息主键
|
||||
* @return 广联达班组信息
|
||||
*/
|
||||
public SurProjectAttendanceGroup selectSurProjectAttendanceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询班组信息列表
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* @return 班组信息集合
|
||||
* 查询广联达班组信息列表
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 广联达班组信息集合
|
||||
*/
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupList(SurProjectAttendanceGroup surProjectAttendanceGroup);
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupViewList(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 新增班组信息
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* 查询广联达班组信息列表
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 广联达班组信息集合
|
||||
*/
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupList(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 新增广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceGroup(SurProjectAttendanceGroup surProjectAttendanceGroup);
|
||||
public int insertSurProjectAttendanceGroup(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 修改班组信息
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* 修改广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceGroup(SurProjectAttendanceGroup surProjectAttendanceGroup);
|
||||
public int updateSurProjectAttendanceGroup(SurProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||
|
||||
/**
|
||||
* 批量删除班组信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除广联达班组信息
|
||||
*
|
||||
* @param ids 需要删除的广联达班组信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceGroupByIds(String ids);
|
||||
public int deleteSurProjectAttendanceGroupByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除班组信息信息
|
||||
*
|
||||
* @param id 班组信息ID
|
||||
* 删除广联达班组信息信息
|
||||
*
|
||||
* @param id 广联达班组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除广联达班组信息
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceGroupByParams(List<String> list);
|
||||
|
||||
/**
|
||||
* 批量新增广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroupList 广联达班组信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSurProjectAttendanceGroup(List<SurProjectAttendanceGroup> quartzProjectAttendanceGroupList);
|
||||
|
||||
public void add(SurProjectAttendanceGroup group);
|
||||
|
||||
/**
|
||||
* 更新济工网的分组类型
|
||||
* @param group
|
||||
*/
|
||||
public void updateJgw(SurProjectAttendanceGroup group);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.xd.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceUser;
|
||||
|
||||
/**
|
||||
|
@ -12,50 +14,148 @@ import com.yanzhu.xd.system.domain.SurProjectAttendanceUser;
|
|||
public interface ISurProjectAttendanceUserService
|
||||
{
|
||||
/**
|
||||
* 查询实名制人员
|
||||
*
|
||||
* @param id 实名制人员ID
|
||||
* @return 实名制人员
|
||||
* 查询考勤人员基本属性
|
||||
*
|
||||
* @param id 考勤人员基本属性主键
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
public SurProjectAttendanceUser selectSurProjectAttendanceUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询实名制人员列表
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* @return 实名制人员集合
|
||||
* 查询考勤人员信息
|
||||
*
|
||||
* @param quartzProjectAttendanceUser
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserList(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
public SurProjectAttendanceUser findCurrentAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 新增实名制人员
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* 查询[研筑]考勤人员信息
|
||||
*
|
||||
* @param quartzProjectAttendanceUser
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
public SurProjectAttendanceUser findYzCurrentAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 查询考勤人员基本属性列表
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 考勤人员基本属性集合
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserList(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 新增考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectAttendanceUser(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
public int insertSurProjectAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 修改实名制人员
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* 修改考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectAttendanceUser(SurProjectAttendanceUser surProjectAttendanceUser);
|
||||
public int updateSurProjectAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 批量删除实名制人员
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除考勤人员基本属性
|
||||
*
|
||||
* @param ids 需要删除的考勤人员基本属性主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceUserByIds(String ids);
|
||||
public int deleteSurProjectAttendanceUserByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除实名制人员信息
|
||||
*
|
||||
* @param id 实名制人员ID
|
||||
* 删除考勤人员基本属性信息
|
||||
*
|
||||
* @param id 考勤人员基本属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceUserById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除考勤人员基本属性
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectAttendanceUserByParams(List<String> list);
|
||||
|
||||
/**
|
||||
* 批量新增考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUserList 考勤人员基本属性列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSurProjectAttendanceUser(List<SurProjectAttendanceUser> quartzProjectAttendanceUserList);
|
||||
|
||||
public void add(SurProjectAttendanceUser user);
|
||||
|
||||
public List<SurProjectAttendanceUser> queryAttendanceData(SurProjectAttendanceUser where);
|
||||
|
||||
public long countTodayAttendance(SurProjectAttendanceUser where);
|
||||
|
||||
public List<SurProjectAttendanceUser> todayAttendance(SurProjectAttendanceUser where);
|
||||
|
||||
public long countAttendance(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 济工网人员查询
|
||||
* @param quartzProjectAttendanceUser
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
|
||||
/**
|
||||
* 在岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> queryWorkerOnDuty(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupUserByParams(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 在岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectAttendanceUser> attendanceUserList(SurProjectAttendanceUser where);
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> findUserAllByDays(Long projectId);
|
||||
|
||||
/**
|
||||
* 按部门汇总在岗人数
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<SurProjectAttendanceUser> groupByWorkerOnDutyByDept(SurProjectAttendanceUser where);
|
||||
|
||||
List<SurProjectAttendanceUser> querySurProjectAttendanceUserList(SurProjectAttendanceUser quartzProjectAttendanceUser);
|
||||
/**
|
||||
* 按部门汇总在岗|离岗人数
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<SurProjectAttendanceUser> groupByWorkerByDept(SurProjectAttendanceUser where);
|
||||
/**
|
||||
* 在岗|离岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<SurProjectAttendanceUser> queryWorkerByState(SurProjectAttendanceUser where);
|
||||
}
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface ISysNativeService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteSysNativeById(Long id);
|
||||
|
||||
List<SysNative> selectSysNativeListById(long id);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
package com.yanzhu.xd.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.yanzhu.xd.system.utils.SecurityTools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.xd.system.mapper.SurProjectAttendanceCfgMapper;
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceCfg;
|
||||
import com.yanzhu.xd.system.service.ISurProjectAttendanceCfgService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
|
||||
/**
|
||||
* 考勤配置Service业务层处理
|
||||
|
@ -18,80 +22,91 @@ import com.ruoyi.common.core.text.Convert;
|
|||
@Service
|
||||
public class SurProjectAttendanceCfgServiceImpl implements ISurProjectAttendanceCfgService
|
||||
{
|
||||
|
||||
|
||||
@Autowired
|
||||
private SurProjectAttendanceCfgMapper surProjectAttendanceCfgMapper;
|
||||
private SurProjectAttendanceCfgMapper attendanceCfgMapper;
|
||||
|
||||
/**
|
||||
* 查询考勤配置
|
||||
*
|
||||
* @param id 考勤配置ID
|
||||
* @return 考勤配置
|
||||
* 查询项目考勤配置
|
||||
*
|
||||
* @param id 项目考勤配置主键
|
||||
* @return 项目考勤配置
|
||||
*/
|
||||
@Override
|
||||
public SurProjectAttendanceCfg selectSurProjectAttendanceCfgById(Long id)
|
||||
{
|
||||
return surProjectAttendanceCfgMapper.selectSurProjectAttendanceCfgById(id);
|
||||
return attendanceCfgMapper.selectSurProjectAttendanceCfgById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考勤配置列表
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* @return 考勤配置
|
||||
* 查询项目考勤配置列表
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 项目考勤配置
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgList(SurProjectAttendanceCfg surProjectAttendanceCfg)
|
||||
public List<SurProjectAttendanceCfg> selectSurProjectAttendanceCfgList(SurProjectAttendanceCfg quartzProjectAttendanceCfg)
|
||||
{
|
||||
return surProjectAttendanceCfgMapper.selectSurProjectAttendanceCfgList(surProjectAttendanceCfg);
|
||||
return attendanceCfgMapper.selectSurProjectAttendanceCfgList(quartzProjectAttendanceCfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤配置
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* 新增项目考勤配置
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurProjectAttendanceCfg(SurProjectAttendanceCfg surProjectAttendanceCfg)
|
||||
public int insertSurProjectAttendanceCfg(SurProjectAttendanceCfg quartzProjectAttendanceCfg)
|
||||
{
|
||||
surProjectAttendanceCfg.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceCfgMapper.insertSurProjectAttendanceCfg(surProjectAttendanceCfg);
|
||||
String userName= SecurityTools.getUsername();
|
||||
quartzProjectAttendanceCfg.setCreateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||
quartzProjectAttendanceCfg.setCreateTime(DateUtils.getNowDate());
|
||||
return attendanceCfgMapper.insertSurProjectAttendanceCfg(quartzProjectAttendanceCfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤配置
|
||||
*
|
||||
* @param surProjectAttendanceCfg 考勤配置
|
||||
* 修改项目考勤配置
|
||||
*
|
||||
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurProjectAttendanceCfg(SurProjectAttendanceCfg surProjectAttendanceCfg)
|
||||
public int updateSurProjectAttendanceCfg(SurProjectAttendanceCfg quartzProjectAttendanceCfg)
|
||||
{
|
||||
surProjectAttendanceCfg.setUpdateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceCfgMapper.updateSurProjectAttendanceCfg(surProjectAttendanceCfg);
|
||||
String userName= SecurityTools.getUsername();
|
||||
quartzProjectAttendanceCfg.setUpdateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||
quartzProjectAttendanceCfg.setUpdateTime(DateUtils.getNowDate());
|
||||
return attendanceCfgMapper.updateSurProjectAttendanceCfg(quartzProjectAttendanceCfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤配置对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除项目考勤配置
|
||||
*
|
||||
* @param ids 需要删除的项目考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceCfgByIds(String ids)
|
||||
public int deleteSurProjectAttendanceCfgByIds(Long[] ids)
|
||||
{
|
||||
return surProjectAttendanceCfgMapper.deleteSurProjectAttendanceCfgByIds(Convert.toStrArray(ids));
|
||||
List<Long> cfgIds = new ArrayList<>();
|
||||
for(Long id:ids){
|
||||
SurProjectAttendanceCfg quartzProjectAttendanceCfg = attendanceCfgMapper.selectSurProjectAttendanceCfgById(id);
|
||||
}
|
||||
return attendanceCfgMapper.deleteSurProjectAttendanceCfgByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤配置信息
|
||||
*
|
||||
* @param id 考勤配置ID
|
||||
* 删除项目考勤配置信息
|
||||
*
|
||||
* @param id 项目考勤配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceCfgById(Long id)
|
||||
{
|
||||
return surProjectAttendanceCfgMapper.deleteSurProjectAttendanceCfgById(id);
|
||||
SurProjectAttendanceCfg quartzProjectAttendanceCfg = attendanceCfgMapper.selectSurProjectAttendanceCfgById(id);
|
||||
return attendanceCfgMapper.deleteSurProjectAttendanceCfgById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,26 @@
|
|||
package com.yanzhu.xd.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceCfg;
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceGroup;
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceUser;
|
||||
import com.yanzhu.xd.system.mapper.SurProjectAttendanceCfgMapper;
|
||||
import com.yanzhu.xd.system.mapper.SurProjectAttendanceGroupMapper;
|
||||
import com.yanzhu.xd.system.mapper.SurProjectAttendanceUserMapper;
|
||||
import com.yanzhu.xd.system.utils.SecurityTools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.xd.system.mapper.SurProjectAttendanceDataMapper;
|
||||
import com.yanzhu.xd.system.domain.SurProjectAttendanceData;
|
||||
import com.yanzhu.xd.system.service.ISurProjectAttendanceDataService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 考勤数据Service业务层处理
|
||||
|
@ -19,79 +32,489 @@ import com.ruoyi.common.core.text.Convert;
|
|||
public class SurProjectAttendanceDataServiceImpl implements ISurProjectAttendanceDataService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectAttendanceDataMapper surProjectAttendanceDataMapper;
|
||||
private SurProjectAttendanceDataMapper attendanceDataMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectAttendanceUserMapper attendanceUserMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectAttendanceGroupMapper attendanceGroupMapper;
|
||||
|
||||
@Autowired
|
||||
private SurProjectAttendanceCfgMapper attendanceCfgMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询考勤数据
|
||||
*
|
||||
* @param id 考勤数据ID
|
||||
* @return 考勤数据
|
||||
* 查询劳务实名制管理
|
||||
*
|
||||
* @param id 劳务实名制管理主键
|
||||
* @return 劳务实名制管理
|
||||
*/
|
||||
@Override
|
||||
public SurProjectAttendanceData selectSurProjectAttendanceDataById(Long id)
|
||||
{
|
||||
return surProjectAttendanceDataMapper.selectSurProjectAttendanceDataById(id);
|
||||
return attendanceDataMapper.selectSurProjectAttendanceDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考勤数据列表
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* @return 考勤数据
|
||||
* 查询劳务实名制管理列表
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 劳务实名制管理
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataList(SurProjectAttendanceData surProjectAttendanceData)
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataList(SurProjectAttendanceData quartzProjectAttendanceData)
|
||||
{
|
||||
return surProjectAttendanceDataMapper.selectSurProjectAttendanceDataList(surProjectAttendanceData);
|
||||
return attendanceDataMapper.selectSurProjectAttendanceDataList(quartzProjectAttendanceData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤数据
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* 查询考勤信息
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 劳务实名制管理集合
|
||||
*/
|
||||
@Override
|
||||
public SurProjectAttendanceData findCurrentAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData){
|
||||
return attendanceDataMapper.findCurrentAttendanceData(quartzProjectAttendanceData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceData> selectSurProjectAttendanceDataListEx(SurProjectAttendanceData quartzProjectAttendanceData)
|
||||
{
|
||||
return attendanceDataMapper.selectSurProjectAttendanceDataListEx(quartzProjectAttendanceData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增劳务实名制管理
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurProjectAttendanceData(SurProjectAttendanceData surProjectAttendanceData)
|
||||
public int insertSurProjectAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData)
|
||||
{
|
||||
surProjectAttendanceData.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceDataMapper.insertSurProjectAttendanceData(surProjectAttendanceData);
|
||||
String userName= SecurityTools.getUsername();
|
||||
quartzProjectAttendanceData.setCreateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||
quartzProjectAttendanceData.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
return attendanceDataMapper.insertSurProjectAttendanceData(quartzProjectAttendanceData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考勤数据
|
||||
*
|
||||
* @param surProjectAttendanceData 考勤数据
|
||||
* 修改劳务实名制管理
|
||||
*
|
||||
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurProjectAttendanceData(SurProjectAttendanceData surProjectAttendanceData)
|
||||
public int updateSurProjectAttendanceData(SurProjectAttendanceData quartzProjectAttendanceData)
|
||||
{
|
||||
surProjectAttendanceData.setUpdateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceDataMapper.updateSurProjectAttendanceData(surProjectAttendanceData);
|
||||
String userName= SecurityTools.getUsername();
|
||||
quartzProjectAttendanceData.setUpdateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||
|
||||
quartzProjectAttendanceData.setUpdateTime(DateUtils.getNowDate());
|
||||
return attendanceDataMapper.updateSurProjectAttendanceData(quartzProjectAttendanceData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤数据对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除劳务实名制管理
|
||||
*
|
||||
* @param ids 需要删除的劳务实名制管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceDataByIds(String ids)
|
||||
public int deleteSurProjectAttendanceDataByIds(Long[] ids)
|
||||
{
|
||||
return surProjectAttendanceDataMapper.deleteSurProjectAttendanceDataByIds(Convert.toStrArray(ids));
|
||||
return attendanceDataMapper.deleteSurProjectAttendanceDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考勤数据信息
|
||||
*
|
||||
* @param id 考勤数据ID
|
||||
* 删除劳务实名制管理信息
|
||||
*
|
||||
* @param id 劳务实名制管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceDataById(Long id)
|
||||
{
|
||||
return surProjectAttendanceDataMapper.deleteSurProjectAttendanceDataById(id);
|
||||
return attendanceDataMapper.deleteSurProjectAttendanceDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除劳务实名制管理
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceDataByParams(List<String> list) {
|
||||
return attendanceDataMapper.deleteSurProjectAttendanceDataByParams(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增劳务实名制考勤管理
|
||||
*
|
||||
* @param quartzProjectAttendanceDataList 劳务实名制考勤管理列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int batchSurProjectAttendanceData(List<SurProjectAttendanceData> quartzProjectAttendanceDataList) {
|
||||
return attendanceDataMapper.batchSurProjectAttendanceData(quartzProjectAttendanceDataList,DateUtils.dateTimeNow(DateUtils.YYYY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(SurProjectAttendanceData sdata) {
|
||||
if(StringUtils.isEmpty(sdata.getWorkerId()) || StringUtils.isEmpty(sdata.getAttendanceTime())){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceData where=new SurProjectAttendanceData();
|
||||
where.setVendorsCode(sdata.getVendorsCode());
|
||||
where.setCfgid(sdata.getCfgid());
|
||||
where.setWorkerId(sdata.getWorkerId());
|
||||
where.setAttendanceTime(sdata.getAttendanceTime());
|
||||
List<SurProjectAttendanceData> list=selectSurProjectAttendanceDataListEx(where);
|
||||
if(list.size()==0){
|
||||
//设置考勤其它参数
|
||||
//查询人员信息
|
||||
SurProjectAttendanceUser userWhere=new SurProjectAttendanceUser();
|
||||
userWhere.setWorkerId(sdata.getWorkerId());
|
||||
List<SurProjectAttendanceUser> uList= attendanceUserMapper.selectSurProjectAttendanceUserList(userWhere);
|
||||
if(uList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceUser user=uList.get(0);
|
||||
sdata.setWorkerName(user.getName());
|
||||
String photo=user.getPhoto();
|
||||
if(StrUtil.isEmpty(photo)){
|
||||
photo=user.getRecentPhoto();
|
||||
}
|
||||
|
||||
sdata.setWorkerPhoto(photo);
|
||||
sdata.setWorkerGender(user.getGender());;
|
||||
sdata.setGroupName(user.getGroupName());
|
||||
sdata.setWorkTypeName(user.getWorkTypeName());
|
||||
sdata.setEthnic(user.getEthnic());
|
||||
sdata.setNativePlace(user.getNativePlace());
|
||||
sdata.setPhone(user.getPhone());
|
||||
sdata.setSpecWorkType(user.getSpecWorkType());
|
||||
if("jgw".equals(sdata.getVendorsCode())) {
|
||||
sdata.setCompanyId(user.getCompanyId());
|
||||
}
|
||||
//查询分组信息
|
||||
SurProjectAttendanceGroup groupWhere=new SurProjectAttendanceGroup();
|
||||
groupWhere.setCfgid(sdata.getCfgid());
|
||||
groupWhere.setCompanyId(sdata.getCompanyId());
|
||||
List<SurProjectAttendanceGroup> gList= attendanceGroupMapper.selectSurProjectAttendanceGroupList(groupWhere);
|
||||
if(gList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceGroup group=gList.get(0);
|
||||
sdata.setCompanyName(group.getCompanyName());
|
||||
sdata.setCompanyTypeId(group.getCompanyTypeId());
|
||||
//查询华筑的分组信息
|
||||
if("huazhu".equals(sdata.getVendorsCode())){
|
||||
sdata.setWorkerGender(sdata.getWorkerGender());
|
||||
sdata.setCompanyTypeId(getHuazhuCompanyTypeId(group.getCompanyName()));//获取华筑的分包商类型
|
||||
}
|
||||
if("jgw".equals(sdata.getVendorsCode())){
|
||||
//sdata.setWorkTypeName(group.getCompanyCode());
|
||||
//sdata.setCompanyName(user.getCompanyName());
|
||||
sdata.setWorkTypeName(user.getWorkTypeName());
|
||||
sdata.setCompanyName(group.getCompanyName());
|
||||
sdata.setGroupName(group.getTeamName());
|
||||
}
|
||||
//查询项目部门信息
|
||||
SurProjectAttendanceCfg cfgWhere=new SurProjectAttendanceCfg();
|
||||
cfgWhere.setId(sdata.getCfgid());
|
||||
List<SurProjectAttendanceCfg> cfgList= attendanceCfgMapper.selectSurProjectAttendanceCfgListForAllInfo(cfgWhere);
|
||||
if(cfgList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceCfg cfg=cfgList.get(0);
|
||||
sdata.setProjectId(cfg.getProjectId());
|
||||
sdata.setDeptId(cfg.getSubDeptId());
|
||||
sdata.setProjectName(cfg.getProjectName());
|
||||
sdata.setDeptName(cfg.getDeptName());
|
||||
if(sdata.getCompanyTypeId()==null){
|
||||
sdata.setCompanyTypeId("0");
|
||||
}
|
||||
insertSurProjectAttendanceData(sdata);
|
||||
}else{
|
||||
sdata.setId(list.get(0).getId());
|
||||
SurProjectAttendanceData upData=list.get(0);
|
||||
String dt1=upData.getAttendanceTime(); //
|
||||
String dt2=upData.getAttendanceOutTime();
|
||||
String dt3=sdata.getAttendanceTime();
|
||||
if (StrUtil.isEmpty(dt3)) {
|
||||
return;
|
||||
}
|
||||
long time3=DateUtil.parse(dt3).getTime();
|
||||
if(StrUtil.isEmpty(dt2)){
|
||||
upData.setAttendanceOutTime(dt3);
|
||||
//比较 dt1,dt2 进行交换
|
||||
long time2=DateUtil.parse(dt3).getTime();
|
||||
long time1=DateUtil.parse(dt1).getTime();
|
||||
if(time1>time2){
|
||||
upData.setAttendanceTime(dt3);
|
||||
upData.setAttendanceOutTime(dt1);
|
||||
}
|
||||
}else{
|
||||
long time2=DateUtil.parse(dt2).getTime();
|
||||
long time1=DateUtil.parse(dt1).getTime();
|
||||
//比较 dt3<dt1 in->dt3
|
||||
if(time3<time1){
|
||||
upData.setAttendanceTime(dt3);
|
||||
}
|
||||
//比较 dt3>dt2 out->dt3
|
||||
if(time3>time2){
|
||||
upData.setAttendanceOutTime(dt3);
|
||||
}
|
||||
}
|
||||
//upData.setAttendanceOutTime(sdata.getAttendanceTime());
|
||||
if("jgw".equals(upData.getVendorsCode())){
|
||||
upData.setRemark(sdata.getRemark());
|
||||
}
|
||||
updateSurProjectAttendanceData(upData);
|
||||
}
|
||||
}
|
||||
|
||||
private String getHuazhuCompanyTypeId(String groupName) {
|
||||
return attendanceDataMapper.findHuaZhuCompanyType(groupName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLastServerId(SurProjectAttendanceData where) {
|
||||
return ""+ attendanceDataMapper.getLastServerId(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceData> groupByComany(SurProjectAttendanceData where) {
|
||||
return attendanceDataMapper.groupByComany(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getHuazhuPage( SurProjectAttendanceData attWhere) {
|
||||
return attendanceDataMapper.getHuazhuPage(attWhere);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceData> groupAllByComany(SurProjectAttendanceData where) {
|
||||
return attendanceDataMapper.groupAllByComany(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> initOtherData(Map<String,Object> data) {
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
List<Map<String,Object>> list = attendanceDataMapper.initOtherData(data);
|
||||
if(StringUtils.isNotEmpty(list)){
|
||||
List<String> workerIds = list.stream().map(Map -> Map.get("workerId").toString()).collect(Collectors.toList());
|
||||
data.put("list",workerIds);
|
||||
List<SurProjectAttendanceUser> datas= attendanceUserMapper.todayAttendanceOtherData(data);
|
||||
for (Map<String,Object> map:list) {
|
||||
for(SurProjectAttendanceUser sau:datas){
|
||||
if(Objects.equals(map.get("workerId").toString(),sau.getWorkerId())){
|
||||
map.put("inTime",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,sau.getInTime()));
|
||||
map.put("outTime",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,sau.getOutTime()));
|
||||
dataList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return dataList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data) {
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
List<Map<String,Object>> list = attendanceDataMapper.initHuaZhuData(data);
|
||||
if(StringUtils.isNotEmpty(list)){
|
||||
List<String> workerIds = list.stream().map(Map -> Map.get("workerId").toString()).collect(Collectors.toList());
|
||||
data.put("list",workerIds);
|
||||
List<SurProjectAttendanceUser> datas= attendanceUserMapper.todayAttendanceOtherData(data);
|
||||
for (Map<String,Object> map:list) {
|
||||
for(SurProjectAttendanceUser sau:datas){
|
||||
if(Objects.equals(map.get("workerId").toString(),sau.getWorkerId())){
|
||||
map.put("inTime",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,sau.getInTime()));
|
||||
map.put("outTime",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,sau.getOutTime()));
|
||||
dataList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return dataList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceData> todayAttendance(SurProjectAttendanceData where) {
|
||||
return attendanceDataMapper.todayAttendance(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计所有数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> groupAllByParams(SurProjectAttendanceData where) {
|
||||
return attendanceDataMapper.findGroupAllByParams(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> findGroupAllByDays(SurProjectAttendanceData where){
|
||||
return attendanceDataMapper.findGroupAllByDays(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计考勤数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> groupDataByParams(SurProjectAttendanceData where){
|
||||
return attendanceDataMapper.groupDataByParams(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 考勤数据列表
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceData> attendanceDataList(SurProjectAttendanceData where) {
|
||||
return attendanceDataMapper.attendanceDataList(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceData> groupTodayCompanyTypeId(SurProjectAttendanceData where) {
|
||||
return attendanceDataMapper.groupTodayCompanyTypeId(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量增加
|
||||
* @param addList
|
||||
*/
|
||||
@Override
|
||||
public void addList(List<SurProjectAttendanceData> addList) {
|
||||
if(addList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceData where=new SurProjectAttendanceData();
|
||||
where.setVendorsCode(addList.get(0).getVendorsCode());
|
||||
where.setCfgid(addList.get(0).getCfgid());
|
||||
where.setAttendanceTime(addList.get(0).getAttendanceTime());
|
||||
List<SurProjectAttendanceData> oldList=selectSurProjectAttendanceDataListEx(where);
|
||||
for(SurProjectAttendanceData sdata:addList){
|
||||
List<SurProjectAttendanceData> list=oldList.stream().filter(d->d.getWorkerId().equals(sdata.getWorkerId())).collect(Collectors.toList());
|
||||
if(list.size()==0){
|
||||
//设置考勤其它参数
|
||||
//查询人员信息
|
||||
SurProjectAttendanceUser userWhere=new SurProjectAttendanceUser();
|
||||
userWhere.setWorkerId(sdata.getWorkerId());
|
||||
List<SurProjectAttendanceUser> uList= attendanceUserMapper.selectSurProjectAttendanceUserList(userWhere);
|
||||
if(uList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceUser user=uList.get(0);
|
||||
sdata.setWorkerName(user.getName());
|
||||
String photo=user.getPhoto();
|
||||
if(StrUtil.isEmpty(photo)){
|
||||
photo=user.getRecentPhoto();
|
||||
}
|
||||
|
||||
sdata.setWorkerPhoto(photo);
|
||||
sdata.setWorkerGender(user.getGender());;
|
||||
sdata.setGroupName(user.getGroupName());
|
||||
sdata.setWorkTypeName(user.getWorkTypeName());
|
||||
sdata.setEthnic(user.getEthnic());
|
||||
sdata.setNativePlace(user.getNativePlace());
|
||||
sdata.setPhone(user.getPhone());
|
||||
sdata.setSpecWorkType(user.getSpecWorkType());
|
||||
if("jgw".equals(sdata.getVendorsCode())) {
|
||||
sdata.setCompanyId(user.getCompanyId());
|
||||
}
|
||||
//查询分组信息
|
||||
SurProjectAttendanceGroup groupWhere=new SurProjectAttendanceGroup();
|
||||
groupWhere.setCfgid(sdata.getCfgid());
|
||||
groupWhere.setCompanyId(sdata.getCompanyId());
|
||||
List<SurProjectAttendanceGroup> gList= attendanceGroupMapper.selectSurProjectAttendanceGroupList(groupWhere);
|
||||
if(gList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceGroup group=gList.get(0);
|
||||
sdata.setCompanyName(group.getCompanyName());
|
||||
sdata.setCompanyTypeId(group.getCompanyTypeId());
|
||||
//查询华筑的分组信息
|
||||
if("huazhu".equals(sdata.getVendorsCode())){
|
||||
sdata.setWorkerGender(sdata.getWorkerGender());
|
||||
sdata.setCompanyTypeId(getHuazhuCompanyTypeId(group.getCompanyName()));//获取华筑的分包商类型
|
||||
}
|
||||
if("jgw".equals(sdata.getVendorsCode())){
|
||||
//sdata.setWorkTypeName(group.getCompanyCode());
|
||||
//sdata.setCompanyName(user.getCompanyName());
|
||||
sdata.setWorkTypeName(user.getWorkTypeName());
|
||||
sdata.setCompanyName(group.getCompanyName());
|
||||
sdata.setGroupName(group.getTeamName());
|
||||
}
|
||||
//查询项目部门信息
|
||||
SurProjectAttendanceCfg cfgWhere=new SurProjectAttendanceCfg();
|
||||
cfgWhere.setId(sdata.getCfgid());
|
||||
List<SurProjectAttendanceCfg> cfgList= attendanceCfgMapper.selectSurProjectAttendanceCfgListForAllInfo(cfgWhere);
|
||||
if(cfgList.size()==0){
|
||||
return;
|
||||
}
|
||||
SurProjectAttendanceCfg cfg=cfgList.get(0);
|
||||
sdata.setProjectId(cfg.getProjectId());
|
||||
sdata.setDeptId(cfg.getSubDeptId());
|
||||
sdata.setProjectName(cfg.getProjectName());
|
||||
sdata.setDeptName(cfg.getDeptName());
|
||||
if(sdata.getCompanyTypeId()==null){
|
||||
sdata.setCompanyTypeId("0");
|
||||
}
|
||||
insertSurProjectAttendanceData(sdata);
|
||||
}else{
|
||||
sdata.setId(list.get(0).getId());
|
||||
SurProjectAttendanceData upData=list.get(0);
|
||||
String dt1=upData.getAttendanceTime(); //
|
||||
String dt2=upData.getAttendanceOutTime();
|
||||
String dt3=sdata.getAttendanceTime();
|
||||
if (StrUtil.isEmpty(dt3)) {
|
||||
return;
|
||||
}
|
||||
long time3=DateUtil.parse(dt3).getTime();
|
||||
if(StrUtil.isEmpty(dt2)){
|
||||
upData.setAttendanceOutTime(dt3);
|
||||
//比较 dt1,dt2 进行交换
|
||||
long time2=DateUtil.parse(dt3).getTime();
|
||||
long time1=DateUtil.parse(dt1).getTime();
|
||||
if(time1>time2){
|
||||
upData.setAttendanceTime(dt3);
|
||||
upData.setAttendanceOutTime(dt1);
|
||||
}
|
||||
}else{
|
||||
long time2=DateUtil.parse(dt2).getTime();
|
||||
long time1=DateUtil.parse(dt1).getTime();
|
||||
//比较 dt3<dt1 in->dt3
|
||||
if(time3<time1){
|
||||
upData.setAttendanceTime(dt3);
|
||||
}
|
||||
//比较 dt3>dt2 out->dt3
|
||||
if(time3>time2){
|
||||
upData.setAttendanceOutTime(dt3);
|
||||
}
|
||||
}
|
||||
//upData.setAttendanceOutTime(sdata.getAttendanceTime());
|
||||
if("jgw".equals(upData.getVendorsCode())){
|
||||
upData.setRemark(sdata.getRemark());
|
||||
}
|
||||
updateSurProjectAttendanceData(upData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.yanzhu.xd.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.yanzhu.xd.system.utils.SecurityTools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.xd.system.mapper.SurProjectAttendanceGroupMapper;
|
||||
|
@ -19,79 +22,144 @@ import com.ruoyi.common.core.text.Convert;
|
|||
public class SurProjectAttendanceGroupServiceImpl implements ISurProjectAttendanceGroupService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectAttendanceGroupMapper surProjectAttendanceGroupMapper;
|
||||
private SurProjectAttendanceGroupMapper attendanceGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询班组信息
|
||||
*
|
||||
* @param id 班组信息ID
|
||||
* @return 班组信息
|
||||
* 查询广联达班组信息
|
||||
*
|
||||
* @param id 广联达班组信息主键
|
||||
* @return 广联达班组信息
|
||||
*/
|
||||
@Override
|
||||
public SurProjectAttendanceGroup selectSurProjectAttendanceGroupById(Long id)
|
||||
{
|
||||
return surProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupById(id);
|
||||
return attendanceGroupMapper.selectSurProjectAttendanceGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班组信息列表
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* @return 班组信息
|
||||
* 查询广联达班组信息列表
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 广联达班组信息
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupList(SurProjectAttendanceGroup surProjectAttendanceGroup)
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupViewList(SurProjectAttendanceGroup quartzProjectAttendanceGroup)
|
||||
{
|
||||
return surProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupList(surProjectAttendanceGroup);
|
||||
return attendanceGroupMapper.selectSurProjectAttendanceGroupViewList(quartzProjectAttendanceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班组信息
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* 查询广联达班组信息列表
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 广联达班组信息集合
|
||||
*/
|
||||
public List<SurProjectAttendanceGroup> selectSurProjectAttendanceGroupList(SurProjectAttendanceGroup quartzProjectAttendanceGroup) {
|
||||
return attendanceGroupMapper.selectSurProjectAttendanceGroupList(quartzProjectAttendanceGroup);
|
||||
}
|
||||
/**
|
||||
* 新增广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurProjectAttendanceGroup(SurProjectAttendanceGroup surProjectAttendanceGroup)
|
||||
public int insertSurProjectAttendanceGroup(SurProjectAttendanceGroup quartzProjectAttendanceGroup)
|
||||
{
|
||||
surProjectAttendanceGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceGroupMapper.insertSurProjectAttendanceGroup(surProjectAttendanceGroup);
|
||||
String userName= SecurityTools.getUsername();
|
||||
quartzProjectAttendanceGroup.setCreateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||
quartzProjectAttendanceGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return attendanceGroupMapper.insertSurProjectAttendanceGroup(quartzProjectAttendanceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班组信息
|
||||
*
|
||||
* @param surProjectAttendanceGroup 班组信息
|
||||
* 修改广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurProjectAttendanceGroup(SurProjectAttendanceGroup surProjectAttendanceGroup)
|
||||
public int updateSurProjectAttendanceGroup(SurProjectAttendanceGroup quartzProjectAttendanceGroup)
|
||||
{
|
||||
surProjectAttendanceGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceGroupMapper.updateSurProjectAttendanceGroup(surProjectAttendanceGroup);
|
||||
String userName= SecurityTools.getUsername();
|
||||
quartzProjectAttendanceGroup.setUpdateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||
|
||||
quartzProjectAttendanceGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return attendanceGroupMapper.updateSurProjectAttendanceGroup(quartzProjectAttendanceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班组信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除广联达班组信息
|
||||
*
|
||||
* @param ids 需要删除的广联达班组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceGroupByIds(String ids)
|
||||
public int deleteSurProjectAttendanceGroupByIds(Long[] ids)
|
||||
{
|
||||
return surProjectAttendanceGroupMapper.deleteSurProjectAttendanceGroupByIds(Convert.toStrArray(ids));
|
||||
return attendanceGroupMapper.deleteSurProjectAttendanceGroupByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班组信息信息
|
||||
*
|
||||
* @param id 班组信息ID
|
||||
* 删除广联达班组信息信息
|
||||
*
|
||||
* @param id 广联达班组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceGroupById(Long id)
|
||||
{
|
||||
return surProjectAttendanceGroupMapper.deleteSurProjectAttendanceGroupById(id);
|
||||
return attendanceGroupMapper.deleteSurProjectAttendanceGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除广联达班组信息
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceGroupByParams(List<String> list) {
|
||||
return attendanceGroupMapper.deleteSurProjectAttendanceGroupByParams(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增广联达班组信息
|
||||
*
|
||||
* @param quartzProjectAttendanceGroupList 广联达班组信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int batchSurProjectAttendanceGroup(List<SurProjectAttendanceGroup> quartzProjectAttendanceGroupList) {
|
||||
return attendanceGroupMapper.batchSurProjectAttendanceGroup(quartzProjectAttendanceGroupList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(SurProjectAttendanceGroup group) {
|
||||
SurProjectAttendanceGroup where=new SurProjectAttendanceGroup();
|
||||
where.setServerid(group.getServerid());
|
||||
where.setCfgid(group.getCfgid());
|
||||
List<SurProjectAttendanceGroup> list=selectSurProjectAttendanceGroupList(where);
|
||||
if(list.size()==0){
|
||||
insertSurProjectAttendanceGroup(group);
|
||||
}else{
|
||||
group.setId(list.get(0).getId());
|
||||
updateSurProjectAttendanceGroup(group);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新济工网的分组类型
|
||||
* @param group
|
||||
*/
|
||||
@Override
|
||||
public void updateJgw(SurProjectAttendanceGroup group) {
|
||||
SurProjectAttendanceGroup where=new SurProjectAttendanceGroup();
|
||||
where.setBizLicense(group.getBizLicense());
|
||||
List<SurProjectAttendanceGroup> list=selectSurProjectAttendanceGroupList(where);
|
||||
for(SurProjectAttendanceGroup g:list){
|
||||
g.setCompanyTypeId(group.getCompanyTypeId());
|
||||
updateSurProjectAttendanceGroup(g);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
package com.yanzhu.xd.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.xd.system.mapper.SurProjectAttendanceUserMapper;
|
||||
|
@ -19,79 +24,291 @@ import com.ruoyi.common.core.text.Convert;
|
|||
public class SurProjectAttendanceUserServiceImpl implements ISurProjectAttendanceUserService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectAttendanceUserMapper surProjectAttendanceUserMapper;
|
||||
private SurProjectAttendanceUserMapper attendanceUserMapper;
|
||||
|
||||
/**
|
||||
* 查询实名制人员
|
||||
*
|
||||
* @param id 实名制人员ID
|
||||
* @return 实名制人员
|
||||
* 查询考勤人员基本属性
|
||||
*
|
||||
* @param id 考勤人员基本属性主键
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
@Override
|
||||
public SurProjectAttendanceUser selectSurProjectAttendanceUserById(Long id)
|
||||
{
|
||||
return surProjectAttendanceUserMapper.selectSurProjectAttendanceUserById(id);
|
||||
return attendanceUserMapper.selectSurProjectAttendanceUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询实名制人员列表
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* @return 实名制人员
|
||||
* 查询考勤人员信息
|
||||
*
|
||||
* @param quartzProjectAttendanceUser
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserList(SurProjectAttendanceUser surProjectAttendanceUser)
|
||||
{
|
||||
return surProjectAttendanceUserMapper.selectSurProjectAttendanceUserList(surProjectAttendanceUser);
|
||||
public SurProjectAttendanceUser findCurrentAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser) {
|
||||
return attendanceUserMapper.findCurrentAttendanceUser(quartzProjectAttendanceUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增实名制人员
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* 查询[研筑]考勤人员信息
|
||||
*
|
||||
* @param quartzProjectAttendanceUser
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
public SurProjectAttendanceUser findYzCurrentAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser){
|
||||
return attendanceUserMapper.findYzCurrentAttendanceUser(quartzProjectAttendanceUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考勤人员基本属性列表
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 考勤人员基本属性
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserList(SurProjectAttendanceUser quartzProjectAttendanceUser)
|
||||
{
|
||||
return attendanceUserMapper.selectSurProjectAttendanceUserList(quartzProjectAttendanceUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurProjectAttendanceUser(SurProjectAttendanceUser surProjectAttendanceUser)
|
||||
public int insertSurProjectAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser)
|
||||
{
|
||||
surProjectAttendanceUser.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceUserMapper.insertSurProjectAttendanceUser(surProjectAttendanceUser);
|
||||
if(StringUtils.isEmpty(quartzProjectAttendanceUser.getCreateBy())){
|
||||
quartzProjectAttendanceUser.setCreateBy("task");
|
||||
quartzProjectAttendanceUser.setCreateTime(DateUtils.getNowDate());
|
||||
}
|
||||
return attendanceUserMapper.insertSurProjectAttendanceUser(quartzProjectAttendanceUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改实名制人员
|
||||
*
|
||||
* @param surProjectAttendanceUser 实名制人员
|
||||
* 修改考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurProjectAttendanceUser(SurProjectAttendanceUser surProjectAttendanceUser)
|
||||
public int updateSurProjectAttendanceUser(SurProjectAttendanceUser quartzProjectAttendanceUser)
|
||||
{
|
||||
surProjectAttendanceUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return surProjectAttendanceUserMapper.updateSurProjectAttendanceUser(surProjectAttendanceUser);
|
||||
if(StringUtils.isEmpty(quartzProjectAttendanceUser.getCreateBy())){
|
||||
quartzProjectAttendanceUser.setUpdateBy("task");
|
||||
}
|
||||
quartzProjectAttendanceUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return attendanceUserMapper.updateSurProjectAttendanceUser(quartzProjectAttendanceUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除实名制人员对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* 批量删除考勤人员基本属性
|
||||
*
|
||||
* @param ids 需要删除的考勤人员基本属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceUserByIds(String ids)
|
||||
public int deleteSurProjectAttendanceUserByIds(Long[] ids)
|
||||
{
|
||||
return surProjectAttendanceUserMapper.deleteSurProjectAttendanceUserByIds(Convert.toStrArray(ids));
|
||||
return attendanceUserMapper.deleteSurProjectAttendanceUserByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除实名制人员信息
|
||||
*
|
||||
* @param id 实名制人员ID
|
||||
* 删除考勤人员基本属性信息
|
||||
*
|
||||
* @param id 考勤人员基本属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceUserById(Long id)
|
||||
{
|
||||
return surProjectAttendanceUserMapper.deleteSurProjectAttendanceUserById(id);
|
||||
return attendanceUserMapper.deleteSurProjectAttendanceUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考勤人员基本属性
|
||||
*
|
||||
* @param list 需要删除的数据参数集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectAttendanceUserByParams(List<String> list) {
|
||||
return attendanceUserMapper.deleteSurProjectAttendanceUserByParams(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增考勤人员基本属性
|
||||
*
|
||||
* @param quartzProjectAttendanceUserList 考勤人员基本属性列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int batchSurProjectAttendanceUser(List<SurProjectAttendanceUser> quartzProjectAttendanceUserList) {
|
||||
return attendanceUserMapper.batchSurProjectAttendanceUser(quartzProjectAttendanceUserList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(SurProjectAttendanceUser user) {
|
||||
SurProjectAttendanceUser where=new SurProjectAttendanceUser();
|
||||
where.setWorkerId(user.getWorkerId());
|
||||
where.setCfgid(user.getCfgid());
|
||||
List<SurProjectAttendanceUser> list=selectSurProjectAttendanceUserList(where);
|
||||
if(list.size()==0){
|
||||
insertSurProjectAttendanceUser(user);
|
||||
}else{
|
||||
SurProjectAttendanceUser old=list.get(0);
|
||||
if(user.getVendorsCode().equals("jgw")){
|
||||
user.setCompanyId(old.getCompanyId());
|
||||
String oldNav=old.getNativePlace();
|
||||
String newNav=user.getNativePlace();
|
||||
if(oldNav==null || !oldNav.equals(newNav)){
|
||||
old.setNativePlace(newNav);
|
||||
}
|
||||
}
|
||||
user.setId(old.getId());
|
||||
updateSurProjectAttendanceUser(user);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> queryAttendanceData(SurProjectAttendanceUser where) {
|
||||
List<SurProjectAttendanceUser> list= attendanceUserMapper.queryAttendanceUsers(where);
|
||||
List<String> workerIds=new ArrayList<>();
|
||||
for(SurProjectAttendanceUser u: list){
|
||||
workerIds.add(u.getWorkerId());
|
||||
}
|
||||
where.setWorkerIds(workerIds);
|
||||
List<SurProjectAttendanceUser> datas= attendanceUserMapper.todayAttendanceData(workerIds);
|
||||
for (SurProjectAttendanceUser u:list) {
|
||||
u.setInTime(findDate(datas,u,"E"));
|
||||
u.setOutTime(findDate(datas,u,"L"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countTodayAttendance(SurProjectAttendanceUser where) {
|
||||
return attendanceUserMapper.countTodayAttendance(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> todayAttendance(SurProjectAttendanceUser where) {
|
||||
if(where.getIndex()<1){
|
||||
where.setIndex(1);
|
||||
}
|
||||
where.setIndex((where.getIndex()-1)* where.getSize());
|
||||
List<SurProjectAttendanceUser> list= attendanceUserMapper.todayAttendance(where);
|
||||
List<String> workerIds=new ArrayList<>();
|
||||
for(SurProjectAttendanceUser u: list){
|
||||
workerIds.add(u.getWorkerId());
|
||||
}
|
||||
List<SurProjectAttendanceUser> datas= attendanceUserMapper.todayAttendanceData(workerIds);
|
||||
for (SurProjectAttendanceUser u:list) {
|
||||
u.setInTime(findDate(datas,u,"E"));
|
||||
u.setOutTime(findDate(datas,u,"L"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countAttendance(SurProjectAttendanceUser user) {
|
||||
SurProjectAttendanceUser where=new SurProjectAttendanceUser();
|
||||
where.setCreateBy(user.getCreateBy());
|
||||
where.setSubDeptId(user.getSubDeptId());
|
||||
where.setProjectId(user.getProjectId());
|
||||
return attendanceUserMapper.countAttendance(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(SurProjectAttendanceUser quartzProjectAttendanceUser) {
|
||||
return attendanceUserMapper.selectSurProjectAttendanceUserListJgw(quartzProjectAttendanceUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 在岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> queryWorkerOnDuty(SurProjectAttendanceUser where) {
|
||||
return attendanceUserMapper.queryWorkerOnDuty(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupUserByParams(SurProjectAttendanceUser where){
|
||||
return attendanceUserMapper.groupUserByParams(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 在岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> attendanceUserList(SurProjectAttendanceUser where){
|
||||
return attendanceUserMapper.attendanceUserList(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计人员数据
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> findUserAllByDays(Long projectId){
|
||||
return attendanceUserMapper.findUserAllByDays(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按部门汇总在岗人数
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> groupByWorkerOnDutyByDept(SurProjectAttendanceUser where) {
|
||||
return attendanceUserMapper.groupByWorkerOnDutyByDept(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> querySurProjectAttendanceUserList(SurProjectAttendanceUser quartzProjectAttendanceUser) {
|
||||
return attendanceUserMapper.querySurProjectAttendanceUserList(quartzProjectAttendanceUser);
|
||||
}
|
||||
/**
|
||||
* 按部门汇总在岗|离岗人数
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> groupByWorkerByDept(SurProjectAttendanceUser where) {
|
||||
return attendanceUserMapper.groupByWorkerByDept(where);
|
||||
}
|
||||
/**
|
||||
* 在岗|离岗工人查询
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectAttendanceUser> queryWorkerByState(SurProjectAttendanceUser where) {
|
||||
return attendanceUserMapper.queryWorkerByState(where);
|
||||
}
|
||||
|
||||
private Date findDate(List<SurProjectAttendanceUser> datas, SurProjectAttendanceUser u, String type) {
|
||||
for (SurProjectAttendanceUser user:datas) {
|
||||
if(user.getWorkerId().equals(u.getWorkerId()) && user.getName().equals(type)){
|
||||
if(type.equals("L")){
|
||||
return user.getOutTime();
|
||||
}else{
|
||||
return user.getInTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -91,4 +91,9 @@ public class SysNativeServiceImpl implements ISysNativeService
|
|||
{
|
||||
return sysNativeMapper.deleteSysNativeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysNative> selectSysNativeListById(long id) {
|
||||
return sysNativeMapper.selectSysNativeListById(id);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,25 @@
|
|||
package com.yanzhu.xd.system.task;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class AttendanceTask {
|
||||
public static String getResult(Request request) {
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
Response response;
|
||||
try {
|
||||
response = client.newCall(request).execute();
|
||||
if (response.body() != null) {
|
||||
return response.body().string();
|
||||
} else {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.yanzhu.xd.system.utils;
|
||||
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
public class SecurityTools {
|
||||
public static String getUsername() {
|
||||
try {
|
||||
return ShiroUtils.getLoginName();
|
||||
} catch (Exception e) {
|
||||
return "task";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN sys_dict_data sdd1 ON sdd1.dict_type = 'attendance_vendors' AND sdd1.dict_value = a.vendors_code
|
||||
) sur_project_attendance_cfg
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectAttendanceCfgList" parameterType="SurProjectAttendanceCfg" resultMap="SurProjectAttendanceCfgResult">
|
||||
<include refid="selectSurProjectAttendanceCfgVo"/>
|
||||
<where>
|
||||
|
@ -45,12 +46,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectSurProjectAttendanceCfgListForAllInfo" parameterType="SurProjectAttendanceCfg" resultMap="SurProjectAttendanceCfgResult">
|
||||
SELECT a.*,b.projectName,c.`unitName` dept_name
|
||||
FROM sur_project_attendance_cfg a,sur_project b,sur_project_unit_info c WHERE a.project_id=b.id AND c.`unitId`=b.`deptId`
|
||||
<if test="id != null "> and a.id = #{id}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectAttendanceCfgById" parameterType="Long" resultMap="SurProjectAttendanceCfgResult">
|
||||
<include refid="selectSurProjectAttendanceCfgVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertSurProjectAttendanceCfg" parameterType="SurProjectAttendanceCfg" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_attendance_cfg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -66,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="subDeptId != null">#{subDeptId},</if>
|
||||
|
@ -80,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurProjectAttendanceCfg" parameterType="SurProjectAttendanceCfg">
|
||||
|
@ -107,10 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceCfgByIds" parameterType="String">
|
||||
delete from sur_project_attendance_cfg where id in
|
||||
delete from sur_project_attendance_cfg where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
|
@ -8,160 +8,564 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="cfgid" column="cfgid" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="projectId" column="projectId" />
|
||||
<result property="projectName" column="projectName" />
|
||||
<result property="deptId" column="deptId" />
|
||||
<result property="deptName" column="deptName" />
|
||||
<result property="vendorsCode" column="vendors_code" />
|
||||
<result property="serverid" column="serverid" />
|
||||
<result property="workerId" column="workerId" />
|
||||
<result property="attendanceType" column="attendance_type" />
|
||||
<result property="attendanceTime" column="attendance_time" />
|
||||
<result property="workerName" column="workerName" />
|
||||
<result property="identification" column="identification" />
|
||||
<result property="workerPhoto" column="workerPhoto" />
|
||||
<result property="workerGender" column="workerGender" />
|
||||
<result property="birthDate" column="birthDate" />
|
||||
<result property="ethnic" column="ethnic" />
|
||||
<result property="nativePlace" column="nativePlace" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="workTypeName" column="workTypeName" />
|
||||
<result property="specWorkType" column="specWorkType" />
|
||||
<result property="groupName" column="groupName" />
|
||||
<result property="companyTypeId" column="companyTypeId" />
|
||||
<result property="companyName" column="companyName" />
|
||||
<result property="attendanceTime" column="attendance_time" />
|
||||
<result property="attendanceOutTime" column="attendance_out_time" />
|
||||
<result property="scanPhoto" column="scanPhoto" />
|
||||
<result property="teamId" column="teamId" />
|
||||
<result property="workTypeCode" column="workTypeCode" />
|
||||
<result property="companyId" column="companyId" />
|
||||
<result property="vendorId" column="vendorId" />
|
||||
<result property="projectType" column="projectType" />
|
||||
<result property="deviceCode" column="device_code" />
|
||||
<result property="workPointId" column="work_point_id" />
|
||||
<result property="scanPhoto" column="scanPhoto" />
|
||||
<result property="other" column="other" />
|
||||
<result property="state" column="state" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectAttendanceDataVo">
|
||||
select id, cfgid, app_id, vendors_code, serverid, workerId, attendance_type, attendance_time, identification, teamId, workTypeCode, companyId, vendorId, projectType, device_code, work_point_id, scanPhoto, other, state, remark, is_del, create_by, create_time, update_by, update_time from sur_project_attendance_data
|
||||
select
|
||||
id,
|
||||
cfgid,
|
||||
app_id,
|
||||
projectId,
|
||||
projectName,
|
||||
deptId,
|
||||
deptName,
|
||||
vendors_code,
|
||||
serverid,
|
||||
workerId,
|
||||
workerName,
|
||||
identification,
|
||||
workerPhoto,
|
||||
workerGender,
|
||||
birthDate,
|
||||
ethnic,
|
||||
nativePlace,
|
||||
phone,
|
||||
workTypeName,
|
||||
specWorkType,
|
||||
groupName,
|
||||
companyTypeId,
|
||||
companyName,
|
||||
attendance_time,
|
||||
attendance_out_time,
|
||||
scanPhoto,
|
||||
teamId,
|
||||
workTypeCode,
|
||||
companyId,
|
||||
vendorId,
|
||||
device_code,
|
||||
is_del,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark
|
||||
from sur_project_attendance_data_${year}
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectAttendanceDataList" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
<include refid="selectSurProjectAttendanceDataVo"/>
|
||||
<where>
|
||||
<select id="findCurrentAttendanceData" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select * from sur_project_attendance_data_${year}
|
||||
<where>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="workerId != null and workerId != ''"> and workerId = #{workerId}</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
|
||||
</where>
|
||||
order by id desc LIMIT 1
|
||||
</select>
|
||||
<select id="selectSurProjectAttendanceDataListEx" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select * from sur_project_attendance_data_${year}
|
||||
<where>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="projectId != null "> and projectId = #{projectId}</if>
|
||||
<if test="deptId != null "> and deptId = #{deptId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="serverid != null and serverid != ''"> and serverid = #{serverid}</if>
|
||||
<if test="workerId != null and workerId != ''"> and workerId = #{workerId}</if>
|
||||
<if test="attendanceType != null and attendanceType != ''"> and attendance_type = #{attendanceType}</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and attendance_time = #{attendanceTime}</if>
|
||||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
|
||||
<if test="identification != null and identification != ''"> and identification = #{identification}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
<if test="companyId != null and companyId != ''"> and companyId = #{companyId}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="projectType != null "> and projectType = #{projectType}</if>
|
||||
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||||
<if test="workPointId != null and workPointId != ''"> and work_point_id = #{workPointId}</if>
|
||||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
and companyTypeId=#{companyTypeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto = #{scanPhoto}</if>
|
||||
<if test="other != null and other != ''"> and other = #{other}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) = date(#{attendanceTime})</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
<select id="selectSurProjectAttendanceDataList" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
<include refid="selectSurProjectAttendanceDataVo"/>
|
||||
<where>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="projectId != null ">and cfgid in (select id from sur_project_attendance_cfg where projectId = #{projectId})</if>
|
||||
<if test="deptId != null "> and deptId = #{deptId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
<if test="attendanceOutTime!=null and attendanceOutTime!=''">
|
||||
and date(attendance_out_time) <=date(#{attendanceOutTime})
|
||||
</if>
|
||||
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
and companyTypeId=#{companyTypeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||||
<if test="scanPhoto != null and scanPhoto != ''"> and scanPhoto like concat('%', #{scanPhoto}, '%')</if>
|
||||
<if test="workerName != null and workerName != ''"> and workerName like concat('%', #{workerName}, '%')</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) >= date(#{attendanceTime})</if>
|
||||
<if test="identification != null and identification != ''"> and identification = #{identification}</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectAttendanceDataById" parameterType="Long" resultMap="SurProjectAttendanceDataResult">
|
||||
<include refid="selectSurProjectAttendanceDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="insertSurProjectAttendanceData" parameterType="SurProjectAttendanceData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_attendance_data
|
||||
insert into sur_project_attendance_data_${year}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgid != null">cfgid,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="projectId != null">projectId,</if>
|
||||
<if test="projectName != null">projectName,</if>
|
||||
<if test="deptId != null">deptId,</if>
|
||||
<if test="deptName != null">deptName,</if>
|
||||
<if test="vendorsCode != null">vendors_code,</if>
|
||||
<if test="serverid != null">serverid,</if>
|
||||
<if test="workerId != null">workerId,</if>
|
||||
<if test="attendanceType != null">attendance_type,</if>
|
||||
<if test="attendanceTime != null">attendance_time,</if>
|
||||
<if test="workerName != null">workerName,</if>
|
||||
<if test="identification != null">identification,</if>
|
||||
<if test="workerPhoto != null">workerPhoto,</if>
|
||||
<if test="workerGender != null">workerGender,</if>
|
||||
<if test="birthDate != null">birthDate,</if>
|
||||
<if test="ethnic != null">ethnic,</if>
|
||||
<if test="nativePlace != null">nativePlace,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="workTypeName != null">workTypeName,</if>
|
||||
<if test="specWorkType != null">specWorkType,</if>
|
||||
<if test="groupName != null">groupName,</if>
|
||||
<if test="companyTypeId != null">companyTypeId,</if>
|
||||
<if test="companyName != null">companyName,</if>
|
||||
<if test="attendanceTime != null">attendance_time,</if>
|
||||
<if test="attendanceOutTime != null">attendance_out_time,</if>
|
||||
<if test="scanPhoto != null">scanPhoto,</if>
|
||||
<if test="teamId != null">teamId,</if>
|
||||
<if test="workTypeCode != null">workTypeCode,</if>
|
||||
<if test="companyId != null">companyId,</if>
|
||||
<if test="vendorId != null">vendorId,</if>
|
||||
<if test="projectType != null">projectType,</if>
|
||||
<if test="deviceCode != null">device_code,</if>
|
||||
<if test="workPointId != null">work_point_id,</if>
|
||||
<if test="scanPhoto != null">scanPhoto,</if>
|
||||
<if test="other != null">other,</if>
|
||||
<if test="state != null">state,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgid != null">#{cfgid},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="projectName != null">#{projectName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="vendorsCode != null">#{vendorsCode},</if>
|
||||
<if test="serverid != null">#{serverid},</if>
|
||||
<if test="workerId != null">#{workerId},</if>
|
||||
<if test="attendanceType != null">#{attendanceType},</if>
|
||||
<if test="attendanceTime != null">#{attendanceTime},</if>
|
||||
<if test="workerName != null">#{workerName},</if>
|
||||
<if test="identification != null">#{identification},</if>
|
||||
<if test="workerPhoto != null">#{workerPhoto},</if>
|
||||
<if test="workerGender != null">#{workerGender},</if>
|
||||
<if test="birthDate != null">#{birthDate},</if>
|
||||
<if test="ethnic != null">#{ethnic},</if>
|
||||
<if test="nativePlace != null">#{nativePlace},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="workTypeName != null">#{workTypeName},</if>
|
||||
<if test="specWorkType != null">#{specWorkType},</if>
|
||||
<if test="groupName != null">#{groupName},</if>
|
||||
<if test="companyTypeId != null">#{companyTypeId},</if>
|
||||
<if test="companyName != null">#{companyName},</if>
|
||||
<if test="attendanceTime != null">#{attendanceTime},</if>
|
||||
<if test="attendanceOutTime != null">#{attendanceOutTime},</if>
|
||||
<if test="scanPhoto != null">#{scanPhoto},</if>
|
||||
<if test="teamId != null">#{teamId},</if>
|
||||
<if test="workTypeCode != null">#{workTypeCode},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="vendorId != null">#{vendorId},</if>
|
||||
<if test="projectType != null">#{projectType},</if>
|
||||
<if test="deviceCode != null">#{deviceCode},</if>
|
||||
<if test="workPointId != null">#{workPointId},</if>
|
||||
<if test="scanPhoto != null">#{scanPhoto},</if>
|
||||
<if test="other != null">#{other},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurProjectAttendanceData" parameterType="SurProjectAttendanceData">
|
||||
update sur_project_attendance_data
|
||||
update sur_project_attendance_data_${year}
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgid != null">cfgid = #{cfgid},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="projectId != null">projectId = #{projectId},</if>
|
||||
<if test="projectName != null">projectName = #{projectName},</if>
|
||||
<if test="deptId != null">deptId = #{deptId},</if>
|
||||
<if test="deptName != null">deptName = #{deptName},</if>
|
||||
<if test="vendorsCode != null">vendors_code = #{vendorsCode},</if>
|
||||
<if test="serverid != null">serverid = #{serverid},</if>
|
||||
<if test="workerId != null">workerId = #{workerId},</if>
|
||||
<if test="attendanceType != null">attendance_type = #{attendanceType},</if>
|
||||
<if test="attendanceTime != null">attendance_time = #{attendanceTime},</if>
|
||||
<if test="workerName != null">workerName = #{workerName},</if>
|
||||
<if test="identification != null">identification = #{identification},</if>
|
||||
<if test="workerPhoto != null">workerPhoto = #{workerPhoto},</if>
|
||||
<if test="workerGender != null">workerGender = #{workerGender},</if>
|
||||
<if test="birthDate != null">birthDate = #{birthDate},</if>
|
||||
<if test="ethnic != null">ethnic = #{ethnic},</if>
|
||||
<if test="nativePlace != null">nativePlace = #{nativePlace},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="workTypeName != null">workTypeName = #{workTypeName},</if>
|
||||
<if test="specWorkType != null">specWorkType = #{specWorkType},</if>
|
||||
<if test="groupName != null">groupName = #{groupName},</if>
|
||||
<if test="companyTypeId != null">companyTypeId = #{companyTypeId},</if>
|
||||
<if test="companyName != null">companyName = #{companyName},</if>
|
||||
<if test="attendanceTime != null">attendance_time = #{attendanceTime},</if>
|
||||
<if test="attendanceOutTime != null">attendance_out_time = #{attendanceOutTime},</if>
|
||||
<if test="scanPhoto != null">scanPhoto = #{scanPhoto},</if>
|
||||
<if test="teamId != null">teamId = #{teamId},</if>
|
||||
<if test="workTypeCode != null">workTypeCode = #{workTypeCode},</if>
|
||||
<if test="companyId != null">companyId = #{companyId},</if>
|
||||
<if test="vendorId != null">vendorId = #{vendorId},</if>
|
||||
<if test="projectType != null">projectType = #{projectType},</if>
|
||||
<if test="deviceCode != null">device_code = #{deviceCode},</if>
|
||||
<if test="workPointId != null">work_point_id = #{workPointId},</if>
|
||||
<if test="scanPhoto != null">scanPhoto = #{scanPhoto},</if>
|
||||
<if test="other != null">other = #{other},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceDataById" parameterType="Long">
|
||||
delete from sur_project_attendance_data where id = #{id}
|
||||
delete from sur_project_attendance_data_${year} where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceDataByIds" parameterType="String">
|
||||
delete from sur_project_attendance_data where id in
|
||||
delete from sur_project_attendance_data_${year} where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceDataByParams" parameterType="String">
|
||||
delete from sur_project_attendance_data_${year} where CONCAT(app_id,'-',serverid,'-',workerId) in
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchSurProjectAttendanceData">
|
||||
insert into sur_project_attendance_data_${year}( id, cfgid, app_id, projectId, projectName, deptId, deptName, vendors_code, serverid, workerId, workerName, identification, workerPhoto, workerGender, birthDate, ethnic, nativePlace, phone, workTypeName, specWorkType, groupName, companyTypeId,
|
||||
companyName, attendance_time, attendance_out_time, scanPhoto, teamId,workTypeCode, companyId, vendorId, device_code, is_del, create_by, create_time, update_by, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.cfgid},#{item.appId}, #{item.projectId}, #{item.projectName}, #{item.deptId}, #{item.deptName}, #{item.vendorsCode}, #{item.serverid}, #{item.workerId}, #{item.workerName}, #{item.identification},#{item.workerPhoto}, #{item.workerGender}, #{item.birthDate},#{item.ethnic}, #{item.nativePlace}, #{item.phone}, #{item.workTypeName}, #{item.specWorkType}, #{item.groupName}, #{item.companyTypeId},
|
||||
#{item.companyName}, #{item.attendanceTime}, #{item.attendanceOutTime}, #{item.scanPhoto},#{item.teamId}, #{item.workTypeCode}, #{item.companyId}, #{item.vendorId}, #{item.deviceCode},#{item.isDel}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getLastServerId" parameterType="SurProjectAttendanceData" resultType="Long">
|
||||
SELECT IF(MAX(serverid+0),MAX(serverid+0),0) serverid FROM sur_project_attendance_data_${year} WHERE cfgid=#{cfgid}
|
||||
</select>
|
||||
|
||||
<select id="groupByComanyOld" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select companyTypeId,count(1) id from ( <include refid="selectSurProjectAttendanceDataVo"/> ) x2 where id in (
|
||||
select min(id) from ( <include refid="selectSurProjectAttendanceDataVo"/> ) x1
|
||||
where date(attendance_time)=#{attendanceTime}
|
||||
<if test="subDeptId!=null and subDeptId>0"> and project_id in (
|
||||
SELECT id FROM sur_project WHERE isdel=0 AND deptid = #{subDeptId}
|
||||
)
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0"> and project_id=#{projectId}</if>
|
||||
group by workerId )
|
||||
and companyTypeId in (1,2,3,4,5,6,8) group by companyTypeId
|
||||
</select>
|
||||
<select id="groupByComany" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select g.companyTypeId,count(1) id from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g
|
||||
where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId
|
||||
and u.workerid in(
|
||||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=CURDATE()
|
||||
and cfgid in (select id from sur_project_attendance_cfg
|
||||
<where>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and project_id=#{projectId}
|
||||
</if>
|
||||
<if test="subDeptId!=null and subDeptId>0">
|
||||
and project_id in (SELECT id FROM sur_project WHERE deptid=#{subDeptId})
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
)
|
||||
and g.companyTypeId in (1,2,3,4,5,6,8)
|
||||
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="subDeptId!=null and subDeptId>0">
|
||||
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{subDeptId})
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and c.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by g.companyTypeId
|
||||
</select>
|
||||
|
||||
<select id="groupAllByComany" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select g.companyTypeId,count(1) id
|
||||
from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g,
|
||||
sur_project sp
|
||||
where u.cfgid=c.id and u.companyId=g.companyId and u.state=#{id} and c.project_id = sp.id
|
||||
and sp.isDel=0
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="subDeptId!=null and subDeptId>0">
|
||||
and sp.deptId=#{subDeptId}
|
||||
</if>
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and c.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by g.companyTypeId
|
||||
</select>
|
||||
|
||||
<select id="getHuazhuPage" parameterType="SurProjectAttendanceData" resultType="Long">
|
||||
select max(vendorId) vendorId from sur_project_attendance_data_${year} WHERE cfgid=#{id}
|
||||
</select>
|
||||
|
||||
<select id="initOtherData" parameterType="map" resultType="map">
|
||||
select d.workerId,d.app_id,d.serverid,u.companyId,u.companyName,u.`name`,d.identification,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
||||
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,d.teamId,u.workTypeCode,d.vendorId,d.device_code,d.scanPhoto,d.is_del
|
||||
from sur_project_attendance_data d
|
||||
left JOIN sur_project_attendance_user u on d.workerId = u.workerId and d.cfgid = u.cfgid
|
||||
left join sur_project_attendance_group g on u.companyId = g.companyId and g.cfgid = u.cfgid
|
||||
where d.cfgid=#{cfgid} and date(d.attendance_time) = #{date}
|
||||
GROUP BY d.workerId
|
||||
</select>
|
||||
|
||||
<select id="initHuaZhuData" parameterType="map" resultType="map">
|
||||
select d.workerId,d.app_id,d.serverid,u.companyId,u.companyName,u.`name`,d.identification,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
||||
u.workTypeName,u.specWorkType,u.groupName,d.teamId,u.workTypeCode,d.vendorId,d.device_code,d.scanPhoto,d.is_del,
|
||||
CASE WHEN sd.type_flag = 2 THEN '1' WHEN sd.type_flag = 3 THEN '2' WHEN sd.type_flag = 4 THEN '8' else '0' end as companyTypeId
|
||||
from sur_project_attendance_data d
|
||||
left JOIN sur_project_attendance_user u on d.workerId = u.workerId and d.cfgid = u.cfgid
|
||||
left join sys_dept sd on u.companyName = sd.dept_name
|
||||
where d.cfgid=#{cfgid} and date(d.attendance_time) = #{date}
|
||||
GROUP BY d.workerId
|
||||
</select>
|
||||
|
||||
<select id="findHuaZhuCompanyType" parameterType="string" resultType="string">
|
||||
select CASE WHEN sd.type_flag = 2 THEN '1' WHEN sd.type_flag = 3 THEN '2' WHEN sd.type_flag = 4 THEN '8' else '0' end as companyTypeId
|
||||
from sys_dept sd
|
||||
where sd.dept_name = #{deptName}
|
||||
</select>
|
||||
|
||||
<select id="todayAttendance" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select ady.* from sur_project_attendance_data_${year} ady
|
||||
left join sur_project sp on sp.id = ady.projectId
|
||||
where sp.isDel=0
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and ady.projectId=#{projectId}
|
||||
</if>
|
||||
<if test="id==1">
|
||||
and ady.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and ady.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and ady.companyTypeId =8
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and sp.deptId=#{deptId}
|
||||
</if>
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and ady.projectId in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(ady.attendance_time) =date(#{attendanceTime})</if>
|
||||
</select>
|
||||
|
||||
<select id="attendanceDataList" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select ady.* from sur_project_attendance_data_${year} ady
|
||||
where ady.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
<if test="companyTypeId==101">
|
||||
and ady.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and ady.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and ady.companyTypeId =8
|
||||
</if>
|
||||
<if test="workerId != null and workerId != ''"> and ady.workerId = #{workerId}</if>
|
||||
<if test="workerName != null and workerName != ''"> and ady.workerName like concat('%', #{workerName}, '%')</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(ady.attendance_time) = date(#{attendanceTime})</if>
|
||||
and ady.is_del=0
|
||||
order by ady.id desc
|
||||
</select>
|
||||
|
||||
<select id="groupTodayCompanyTypeId" parameterType="SurProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||
select ady.companyTypeId,count(1) id from sur_project_attendance_data_${year} ady
|
||||
where ady.cfgid in (select id from sur_project_attendance_cfg where
|
||||
is_del=0
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and projectId=#{projectId}
|
||||
</if>
|
||||
and projectId in (select id from sur_project sp where sp.isDel=0
|
||||
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and sp.deptId=#{deptId}
|
||||
</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(ady.attendance_time) =date(#{attendanceTime})</if>
|
||||
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and ady.projectId in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
group by ady.companyTypeId
|
||||
</select>
|
||||
|
||||
<select id="findGroupAllByParams" parameterType="SurProjectAttendanceData" resultType="Map">
|
||||
select '1' as type,g.companyTypeId,count(1) as total
|
||||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and u.state=0
|
||||
group by g.companyTypeId
|
||||
UNION ALL
|
||||
select '2' as type,g.companyTypeId,count(1) as total
|
||||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and u.state=1
|
||||
group by g.companyTypeId
|
||||
UNION ALL
|
||||
select '3' as type, d.companyTypeId,count(1) as total from sur_project_attendance_data_${year} d
|
||||
where d.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and d.is_del=0
|
||||
and date(d.attendance_time) = date(now())
|
||||
group by d.companyTypeId
|
||||
</select>
|
||||
|
||||
<select id="groupDataByParams" parameterType="SurProjectAttendanceData" resultType="Map">
|
||||
select d.companyTypeId,count(1) as total from sur_project_attendance_data_${year} d
|
||||
where d.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and d.is_del=0
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(d.attendance_time) = date(#{attendanceTime})</if>
|
||||
<if test="workerName != null and workerName != ''"> and d.workerName like concat('%', #{workerName}, '%')</if>
|
||||
group by d.companyTypeId
|
||||
</select>
|
||||
|
||||
<select id="findGroupAllByDays" parameterType="SurProjectAttendanceData" resultType="Map">
|
||||
select '3' as type, DATE_FORMAT(days.attendanceTime, '%m-%d') as attendanceTime,days.total from(
|
||||
select date(d.attendance_time) as attendanceTime, DATE_FORMAT(d.attendance_time, '%m-%d'),count(1) as total from sur_project_attendance_data_${year} d
|
||||
where d.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and d.is_del=0
|
||||
and date(d.attendance_time) between #{attendanceTime} and #{attendanceOutTime}
|
||||
group by date(d.attendance_time)
|
||||
order by date(d.attendance_time)
|
||||
)days
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -37,18 +37,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectAttendanceGroupVo">
|
||||
select id, cfgid, app_id, serverid, bizLicense, companyCode, companyId, companyName, companyTypeId, vendorId, name, leaderName, leaderPhone, teamId, teamName, type, leaderId, deleted, createTimestamp, platformGroupId, platformTeamId, enterDate, exitDate, remark, is_del, create_by, create_time, update_by, update_time from sur_project_attendance_group
|
||||
select id, cfgid, app_id, serverid, bizLicense, companyCode, companyId, companyName, companyTypeId, vendorId, name, leaderName, leaderPhone, teamId, teamName, type, leaderId, deleted, createTimestamp, platformGroupId, platformTeamId, enterDate, exitDate, remark, is_del, create_by, create_time, update_by, update_time
|
||||
from view_sur_project_attendance_group
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectAttendanceGroupList" parameterType="SurProjectAttendanceGroup" resultMap="SurProjectAttendanceGroupResult">
|
||||
<select id="selectSurProjectAttendanceGroupViewList" parameterType="SurProjectAttendanceGroup" resultMap="SurProjectAttendanceGroupResult">
|
||||
<include refid="selectSurProjectAttendanceGroupVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId}</if>
|
||||
<if test="serverid != null and serverid != ''"> and serverid = #{serverid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||
<if test="bizLicense != null and bizLicense != ''"> and bizLicense = #{bizLicense}</if>
|
||||
<if test="companyCode != null and companyCode != ''"> and companyCode = #{companyCode}</if>
|
||||
<if test="companyId != null and companyId != ''"> and companyId = #{companyId}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="companyTypeId != null and companyTypeId != ''"> and companyTypeId = #{companyTypeId}</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
|
@ -60,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="leaderId != null "> and leaderId = #{leaderId}</if>
|
||||
<if test="deleted != null "> and deleted = #{deleted}</if>
|
||||
<if test="createTimestamp != null "> and createTimestamp = #{createTimestamp}</if>
|
||||
<if test="createTime != null "> and createTime = #{createTime}</if>
|
||||
<if test="platformGroupId != null "> and platformGroupId = #{platformGroupId}</if>
|
||||
<if test="platformTeamId != null "> and platformTeamId = #{platformTeamId}</if>
|
||||
<if test="enterDate != null "> and enterDate = #{enterDate}</if>
|
||||
|
@ -68,12 +69,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectSurProjectAttendanceGroupList" parameterType="SurProjectAttendanceGroup" resultMap="SurProjectAttendanceGroupResult">
|
||||
select id, cfgid, app_id, serverid, bizLicense, companyCode, companyId, companyName, companyTypeId, vendorId, name, leaderName, leaderPhone, teamId, teamName, type, leaderId, deleted, createTimestamp, platformGroupId, platformTeamId, enterDate, exitDate, remark, is_del, create_by, create_time, update_by, update_time
|
||||
from sur_project_attendance_group
|
||||
<where>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||
<if test="bizLicense != null and bizLicense != ''"> and bizLicense = #{bizLicense}</if>
|
||||
<if test="companyCode != null and companyCode != ''"> and companyCode = #{companyCode}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="companyTypeId != null and companyTypeId != ''"> and companyTypeId = #{companyTypeId}</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="leaderName != null and leaderName != ''"> and leaderName like concat('%', #{leaderName}, '%')</if>
|
||||
<if test="leaderPhone != null and leaderPhone != ''"> and leaderPhone = #{leaderPhone}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and teamName like concat('%', #{teamName}, '%')</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="leaderId != null "> and leaderId = #{leaderId}</if>
|
||||
<if test="deleted != null "> and deleted = #{deleted}</if>
|
||||
<if test="createTime != null "> and createTime = #{createTime}</if>
|
||||
<if test="platformGroupId != null "> and platformGroupId = #{platformGroupId}</if>
|
||||
<if test="platformTeamId != null "> and platformTeamId = #{platformTeamId}</if>
|
||||
<if test="enterDate != null "> and enterDate = #{enterDate}</if>
|
||||
<if test="exitDate != null "> and exitDate = #{exitDate}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectAttendanceGroupById" parameterType="Long" resultMap="SurProjectAttendanceGroupResult">
|
||||
<include refid="selectSurProjectAttendanceGroupVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertSurProjectAttendanceGroup" parameterType="SurProjectAttendanceGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_attendance_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -105,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgid != null">#{cfgid},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
|
@ -135,7 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurProjectAttendanceGroup" parameterType="SurProjectAttendanceGroup">
|
||||
|
@ -178,10 +209,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceGroupByIds" parameterType="String">
|
||||
delete from sur_project_attendance_group where id in
|
||||
delete from sur_project_attendance_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceGroupByParams" parameterType="String">
|
||||
delete from sur_project_attendance_group where CONCAT(app_id,'-',serverid) in
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchSurProjectAttendanceGroup">
|
||||
insert into sur_project_attendance_group(id,cfgid,app_id,serverid,bizLicense,companyCode,companyId,companyName,companyTypeId,vendorId,name,leaderName,leaderPhone,teamId,teamName,type,leaderId,deleted,createTimestamp,platformGroupId,platformTeamId,enterDate,exitDate,remark,create_by,create_time,update_by,update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.id}, #{item.cfgid}, #{item.appId}, #{item.serverid}, #{item.bizLicense}, #{item.companyCode}, #{item.companyId}, #{item.companyName},#{item.companyTypeId}, #{item.vendorId}, #{item.name}, #{item.leaderName}, #{item.leaderPhone}, #{item.teamId}, #{item.teamName}, #{item.type}, #{item.leaderId}, #{item.deleted}, #{item.createTimestamp}, #{item.platformGroupId}, #{item.platformTeamId}, #{item.enterDate},
|
||||
#{item.exitDate}, #{item.remark}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
|
@ -45,19 +45,147 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="subDeptId" column="sub_dept_id"/>
|
||||
<result property="companyTypeId" column="companyTypeId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectAttendanceUserVo">
|
||||
select id, cfgid, app_id, vendors_code, workerId, laborWorkerId, workerCategory, qrCode, name, ethnic, nativePlace, gender, birthDate, phone, degreeName, photo, recentPhoto, groupId, groupName, leader, workTypeCode, workTypeName, specWorkType, hatCode, state, enterDate, exitDate, companyId, companyName, vendorId, teamId, teamName, enterType, other, remark, is_del, create_by, create_time, update_by, update_time from sur_project_attendance_user
|
||||
SELECT * FROM (
|
||||
SELECT a.*,b.project_id,b.sub_dept_id
|
||||
FROM sur_project_attendance_user a,sur_project_attendance_cfg b
|
||||
WHERE a.cfgid=b.id )
|
||||
sur_project_attendance_user
|
||||
</sql>
|
||||
<select id="selectSurProjectAttendanceUserListJgw" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
SELECT u.id,u.cfgid,u.app_id,u.vendors_code,u.workerId,u.laborWorkerId,u.workerCategory,u.qrCode,u.name,
|
||||
u.ethnic,u.nativePlace,u.gender,u.birthDate,u.phone,u.degreeName,u.photo,u.recentPhoto,
|
||||
u.groupId,u.leader,u.workTypeCode,u.specWorkType,
|
||||
u.hatCode,u.state,u.enterDate,u.exitDate,u.companyId,u.vendorId,
|
||||
u.teamId,u.teamName,u.enterType,u.is_del,u.create_by,u.create_time,u.update_by,u.update_time,
|
||||
c.project_id,c.sub_dept_id,u.companyName,u.workTypeName,g.teamname groupName,g.companyName remark
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg c,sur_project_attendance_group g
|
||||
WHERE u.cfgid=c.id AND g.companyid=u.companyid AND u.vendors_code='jgw'
|
||||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and g.companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
and g.companyTypeId=#{companyTypeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="cfgid != null "> and u.cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and u.app_id = #{appId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and u.vendors_code = #{vendorsCode}</if>
|
||||
<if test="workerId != null "> and u.workerId = #{workerId}</if>
|
||||
<if test="laborWorkerId != null "> and u.laborWorkerId = #{laborWorkerId}</if>
|
||||
<if test="workerCategory != null "> and u.workerCategory = #{workerCategory}</if>
|
||||
<if test="qrCode != null "> and u.qrCode = #{qrCode}</if>
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
<if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
|
||||
<if test="nativePlace != null and nativePlace != ''"> and u.nativePlace = #{nativePlace}</if>
|
||||
<if test="gender != null "> and u.gender = #{gender}</if>
|
||||
<if test="birthDate != null "> and u.birthDate = #{birthDate}</if>
|
||||
<if test="phone != null and phone != ''"> and u.phone = #{phone}</if>
|
||||
<if test="degreeName != null and degreeName != ''"> and u.degreeName like concat('%', #{degreeName}, '%')</if>
|
||||
<if test="photo != null and photo != ''"> and u.photo = #{photo}</if>
|
||||
<if test="recentPhoto != null and recentPhoto != ''"> and u.recentPhoto = #{recentPhoto}</if>
|
||||
<if test="groupId != null "> and u.groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and u.groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="leader != null "> and u.leader = #{leader}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and u.workTypeCode = #{workTypeCode}</if>
|
||||
<if test="workTypeName != null and workTypeName != ''"> and u.workTypeName like concat('%', #{workTypeName}, '%')</if>
|
||||
<if test="specWorkType != null "> and u.specWorkType = #{specWorkType}</if>
|
||||
<if test="hatCode != null and hatCode != ''"> and u.hatCode = #{hatCode}</if>
|
||||
<if test="state != null "> and u.state = #{state}</if>
|
||||
<if test="enterDate != null and enterDate != ''"> and u.enterDate = #{enterDate}</if>
|
||||
<if test="exitDate != null and exitDate != ''"> and u.exitDate = #{exitDate}</if>
|
||||
<if test="companyId != null "> and u.companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and u.companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="vendorId != null "> and u.vendorId = #{vendorId}</if>
|
||||
<if test="teamId != null "> and u.teamId = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and u.teamName like concat('%', #{teamName}, '%')</if>
|
||||
<if test="enterType != null and enterType != ''"> and u.enterType = #{enterType}</if>
|
||||
<if test="other != null and other != ''"> and u.other = #{other}</if>
|
||||
<if test="projectId != null and projectId > 0 "> and c.project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId >0 "> and c.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="isDel != null "> and u.is_del = #{isDel}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
<include refid="selectSurProjectAttendanceUserVo"/>
|
||||
<where>
|
||||
<select id="querySurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
SELECT * FROM (
|
||||
SELECT a.id,
|
||||
a.cfgid,
|
||||
a.app_id,
|
||||
a.vendors_code,
|
||||
a.workerId,
|
||||
a.laborWorkerId,
|
||||
a.workerCategory,
|
||||
a.qrCode,
|
||||
a.name,
|
||||
a.ethnic,
|
||||
a.nativePlace,
|
||||
a.gender,
|
||||
a.birthDate,
|
||||
a.phone,
|
||||
a.degreeName,
|
||||
a.photo,
|
||||
a.recentPhoto,
|
||||
a.groupId,
|
||||
a.groupName,
|
||||
a.leader,
|
||||
a.workTypeCode,
|
||||
a.workTypeName,
|
||||
a.specWorkType,
|
||||
a.hatCode,
|
||||
a.state,
|
||||
a.enterDate,
|
||||
a.exitDate,
|
||||
a.companyId,
|
||||
a.companyName,
|
||||
a.vendorId,
|
||||
a.teamId,
|
||||
a.teamName,
|
||||
a.enterType,
|
||||
a.other,
|
||||
a.is_del,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,b.project_id,b.sub_dept_id,g.companyTypeId,g.companyName as remark
|
||||
FROM sur_project_attendance_user a,sur_project_attendance_cfg b,view_sur_project_attendance_group g
|
||||
WHERE a.cfgid=b.id and a.companyId=g.companyId and g.id in(select min(id) from view_sur_project_attendance_group group by companyid)
|
||||
)
|
||||
sur_project_attendance_user
|
||||
<where>
|
||||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
and companyTypeId=#{companyTypeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="workerId != null and workerId != ''"> and workerId = #{workerId}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
<if test="laborWorkerId != null "> and laborWorkerId = #{laborWorkerId}</if>
|
||||
<if test="workerCategory != null "> and workerCategory = #{workerCategory}</if>
|
||||
<if test="qrCode != null "> and qrCode = #{qrCode}</if>
|
||||
|
@ -70,7 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="degreeName != null and degreeName != ''"> and degreeName like concat('%', #{degreeName}, '%')</if>
|
||||
<if test="photo != null and photo != ''"> and photo = #{photo}</if>
|
||||
<if test="recentPhoto != null and recentPhoto != ''"> and recentPhoto = #{recentPhoto}</if>
|
||||
<if test="groupId != null and groupId != ''"> and groupId = #{groupId}</if>
|
||||
<if test="groupId != null "> and groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="leader != null "> and leader = #{leader}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
|
@ -80,22 +208,96 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="enterDate != null and enterDate != ''"> and enterDate = #{enterDate}</if>
|
||||
<if test="exitDate != null and exitDate != ''"> and exitDate = #{exitDate}</if>
|
||||
<if test="companyId != null and companyId != ''"> and companyId = #{companyId}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and teamName like concat('%', #{teamName}, '%')</if>
|
||||
<if test="enterType != null and enterType != ''"> and enterType = #{enterType}</if>
|
||||
<if test="other != null and other != ''"> and other = #{other}</if>
|
||||
<if test="projectId != null and projectId > 0 "> and project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId >0 "> and sub_dept_id = #{subDeptId}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectSurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
<include refid="selectSurProjectAttendanceUserVo"/>
|
||||
<where>
|
||||
<if test="companyTypeId!=null">
|
||||
<if test="companyTypeId>100">
|
||||
<if test="companyTypeId==101">
|
||||
and companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
</if>
|
||||
<if test="companyTypeId <100">
|
||||
and companyTypeId=#{companyTypeId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
<if test="laborWorkerId != null "> and laborWorkerId = #{laborWorkerId}</if>
|
||||
<if test="workerCategory != null "> and workerCategory = #{workerCategory}</if>
|
||||
<if test="qrCode != null "> and qrCode = #{qrCode}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="ethnic != null and ethnic != ''"> and ethnic = #{ethnic}</if>
|
||||
<if test="nativePlace != null and nativePlace != ''"> and nativePlace = #{nativePlace}</if>
|
||||
<if test="gender != null "> and gender = #{gender}</if>
|
||||
<if test="birthDate != null "> and birthDate = #{birthDate}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="degreeName != null and degreeName != ''"> and degreeName like concat('%', #{degreeName}, '%')</if>
|
||||
<if test="photo != null and photo != ''"> and photo = #{photo}</if>
|
||||
<if test="recentPhoto != null and recentPhoto != ''"> and recentPhoto = #{recentPhoto}</if>
|
||||
<if test="groupId != null "> and groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="leader != null "> and leader = #{leader}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
<if test="workTypeName != null and workTypeName != ''"> and workTypeName like concat('%', #{workTypeName}, '%')</if>
|
||||
<if test="specWorkType != null "> and specWorkType = #{specWorkType}</if>
|
||||
<if test="hatCode != null and hatCode != ''"> and hatCode = #{hatCode}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="enterDate != null and enterDate != ''"> and enterDate = #{enterDate}</if>
|
||||
<if test="exitDate != null and exitDate != ''"> and exitDate = #{exitDate}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and teamName like concat('%', #{teamName}, '%')</if>
|
||||
<if test="enterType != null and enterType != ''"> and enterType = #{enterType}</if>
|
||||
<if test="other != null and other != ''"> and other = #{other}</if>
|
||||
<if test="projectId != null and projectId > 0 "> and project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId >0 "> and sub_dept_id = #{subDeptId}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectAttendanceUserById" parameterType="Long" resultMap="SurProjectAttendanceUserResult">
|
||||
<include refid="selectSurProjectAttendanceUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findCurrentAttendanceUser" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
select u.companyId,u.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
||||
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
|
||||
from sur_project_attendance_user u
|
||||
left join sur_project_attendance_group g on u.companyId = g.companyId and g.cfgid = u.cfgid
|
||||
where u.cfgid=#{cfgid} and u.workerId=#{workerId}
|
||||
</select>
|
||||
|
||||
<select id="findYzCurrentAttendanceUser" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
select u.companyId,g.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
|
||||
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
|
||||
from sur_project_attendance_user u
|
||||
left join sur_project_attendance_group g on u.groupId = g.serverid and g.cfgid = u.cfgid
|
||||
where u.cfgid=#{cfgid} and u.workerId=#{workerId} ORDER BY u.id desc LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insertSurProjectAttendanceUser" parameterType="SurProjectAttendanceUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_attendance_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -131,14 +333,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="teamId != null">teamId,</if>
|
||||
<if test="teamName != null">teamName,</if>
|
||||
<if test="enterType != null">enterType,</if>
|
||||
<if test="other != null">other,</if>
|
||||
<if test="other != null and other != ''">other,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgid != null">#{cfgid},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
|
@ -172,14 +374,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="teamId != null">#{teamId},</if>
|
||||
<if test="teamName != null">#{teamName},</if>
|
||||
<if test="enterType != null">#{enterType},</if>
|
||||
<if test="other != null">#{other},</if>
|
||||
<if test="other != null and other != ''">#{other},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSurProjectAttendanceUser" parameterType="SurProjectAttendanceUser">
|
||||
|
@ -217,7 +419,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="teamId != null">teamId = #{teamId},</if>
|
||||
<if test="teamName != null">teamName = #{teamName},</if>
|
||||
<if test="enterType != null">enterType = #{enterType},</if>
|
||||
<if test="other != null">other = #{other},</if>
|
||||
<if test="other != null and other != ''">other = #{other},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
|
@ -233,10 +435,378 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceUserByIds" parameterType="String">
|
||||
delete from sur_project_attendance_user where id in
|
||||
delete from sur_project_attendance_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectAttendanceUserByParams" parameterType="String">
|
||||
delete from sur_project_attendance_user where CONCAT(app_id,'-',workerId) in
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchSurProjectAttendanceUser">
|
||||
insert into sur_project_attendance_user( id, cfgid, vendors_code, workerId, laborWorkerId, workerCategory, qrCode, name, ethnic, nativePlace, gender, birthDate, phone, degreeName, photo, recentPhoto, groupId, groupName, leader, workTypeCode, workTypeName, specWorkType, hatCode, state, enterDate, exitDate, companyId, companyName, vendorId, teamId, teamName, enterType, other, remark, is_del, create_by, create_time, update_by, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.cfgid}, #{item.vendorsCode}, #{item.workerId}, #{item.laborWorkerId}, #{item.workerCategory}, #{item.qrCode}, #{item.name}, #{item.ethnic}, #{item.nativePlace}, #{item.gender}, #{item.birthDate}, #{item.phone}, #{item.degreeName}, #{item.photo}, #{item.recentPhoto}, #{item.groupId}, #{item.groupName}, #{item.leader}, #{item.workTypeCode}, #{item.workTypeName}, #{item.specWorkType}, #{item.hatCode}, #{item.state}, #{item.enterDate}, #{item.exitDate}, #{item.companyId}, #{item.companyName}, #{item.vendorId}, #{item.teamId}, #{item.teamName}, #{item.enterType}, #{item.other}, #{item.remark}, #{item.isDel}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<sql id="sqlAttendanceData">
|
||||
(
|
||||
SELECT * FROM sur_project_attendance_data WHERE DATE(attendance_time)=date(#{createBy}) AND cfgid IN (
|
||||
SELECT id FROM sur_project_attendance_cfg WHERE project_id=#{projectId} AND sub_dept_id=#{subDeptId}
|
||||
) ) xx
|
||||
</sql>
|
||||
<select id="queryAttendanceData" parameterType="SurProjectAttendanceCfg" resultMap="SurProjectAttendanceUserResult">
|
||||
select * from (
|
||||
select n.*,m.inTime,m.outTime from (
|
||||
|
||||
SELECT * FROM (
|
||||
SELECT workerId,attendance_time inTime,null outtime FROM sur_project_attendance_data WHERE id IN (
|
||||
SELECT min(id) id FROM <include refid="sqlAttendanceData"/> WHERE attendance_type='e' GROUP BY workerId )) X WHERE workerId NOT IN (
|
||||
SELECT workerId FROM <include refid="sqlAttendanceData"/> WHERE attendance_type='l' GROUP BY workerId
|
||||
)
|
||||
|
||||
union
|
||||
|
||||
select * from (
|
||||
select workerId,null inTime,attendance_time outTime from sur_project_attendance_data where id in (
|
||||
select max(id) id from <include refid="sqlAttendanceData"/> where attendance_type='l' group by workerId )) x where workerId not in (
|
||||
SELECT workerId FROM <include refid="sqlAttendanceData"/> WHERE attendance_type='e' GROUP BY workerId
|
||||
)
|
||||
|
||||
union
|
||||
|
||||
select x.workerId,y.attendance_time inTime,x.attendance_time outTime from (
|
||||
SELECT id,workerId,attendance_time FROM sur_project_attendance_data WHERE id IN (
|
||||
SELECT MAX(id) id FROM <include refid="sqlAttendanceData"/> WHERE attendance_type='l' GROUP BY workerId )
|
||||
) x cross join (
|
||||
|
||||
SELECT id,workerId,attendance_time FROM sur_project_attendance_data WHERE id IN (
|
||||
SELECT MIN(id) id FROM <include refid="sqlAttendanceData"/> WHERE attendance_type='e' GROUP BY workerId )
|
||||
) y on x.workerId=y.workerId
|
||||
|
||||
) m left join sur_project_attendance_user n on m.workerId=n.workerId
|
||||
) oo
|
||||
</select>
|
||||
|
||||
<select id="countAttendance" resultType="Long" parameterType="SurProjectAttendanceCfg">
|
||||
select count(1) cnt from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g
|
||||
where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId
|
||||
and u.workerid in(
|
||||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=date(#{createBy}) AND cfgid IN (
|
||||
SELECT id FROM sur_project_attendance_cfg WHERE project_id=#{projectId} AND sub_dept_id=#{subDeptId}
|
||||
) group by workerid
|
||||
)
|
||||
</select>
|
||||
<select id="queryAttendanceByUserIds" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
select workerid,attendance_type name,min(attendance_time) inTime,max(attendance_time) outTime from sur_project_attendance_data
|
||||
where DATE(attendance_time)=date(#{createBy})
|
||||
<if test="workerIds !=null and workerIds.size()>0">
|
||||
and workerid in
|
||||
<foreach collection="workerIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by workerid,attendance_type
|
||||
</select>
|
||||
<select id="queryAttendanceUsers" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
|
||||
select u.* from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g
|
||||
where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId
|
||||
and u.workerid in(
|
||||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=date(#{createBy}) AND cfgid IN (
|
||||
SELECT id FROM sur_project_attendance_cfg WHERE project_id=#{projectId} AND sub_dept_id=#{subDeptId}
|
||||
) group by workerid
|
||||
)
|
||||
order by u.id limit #{index},#{size}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countTodayAttendance" resultType="Long" parameterType="SurProjectAttendanceUser">
|
||||
select count(1) cnt from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g
|
||||
where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId
|
||||
and u.workerid in(
|
||||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=CURDATE() group by workerid
|
||||
)
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and c.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="todayAttendanceOld" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
select a.* ,
|
||||
(select min(attendance_time) from sur_project_attendance_data b where b.workerId=a.workerId and date(b.attendance_time)=CURDATE() and b.attendance_type='e') inTime,
|
||||
(SELECT Max(attendance_time) FROM sur_project_attendance_data b WHERE b.workerId=a.workerId AND DATE(b.attendance_time)=CURDATE() AND b.attendance_type='l') outTime
|
||||
from (
|
||||
select u.* from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g
|
||||
where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId
|
||||
and u.workerid in(
|
||||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=CURDATE()
|
||||
)
|
||||
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and c.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by u.id limit #{index},#{size} ) a
|
||||
</select>
|
||||
<select id="todayAttendance" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
|
||||
select u.* from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g
|
||||
where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId
|
||||
and u.workerid in(
|
||||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=CURDATE() group by workerid
|
||||
)
|
||||
|
||||
<if test="id==1">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="id==2">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="id==8">
|
||||
and g.companyTypeId =8
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and c.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and c.project_id in (SELECT id FROM sur_project WHERE deptid=#{deptId})
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and c.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by u.id limit #{index},#{size}
|
||||
</select>
|
||||
<select id="todayAttendanceData" parameterType="java.util.List" resultMap="SurProjectAttendanceUserResult">
|
||||
select workerid,attendance_type name,min(attendance_time) inTime,max(attendance_time) outTime from sur_project_attendance_data where DATE(attendance_time)=CURDATE()
|
||||
<if test="list !=null and list.size()>0">
|
||||
and workerid in
|
||||
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by workerid,attendance_type
|
||||
</select>
|
||||
|
||||
<select id="todayAttendanceOtherData" parameterType="map" resultMap="SurProjectAttendanceUserResult">
|
||||
select workerid,min(attendance_time) inTime,max(attendance_time) outTime from sur_project_attendance_data where cfgid=#{cfgid} and DATE(attendance_time)=#{date}
|
||||
<if test="list !=null and list.size()>0">
|
||||
and workerid in
|
||||
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by workerid
|
||||
</select>
|
||||
|
||||
<select id="queryWorkerOnDuty" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
SELECT u.id,u.cfgid,u.app_id,u.vendors_code,u.workerId,u.laborWorkerId,u.workerCategory,u.qrCode,u.name,
|
||||
u.ethnic,u.nativePlace,u.gender,u.birthDate,u.phone,u.photo,u.recentPhoto,
|
||||
u.groupId,u.leader,u.workTypeCode,u.specWorkType,
|
||||
u.hatCode,u.state,u.enterDate,u.exitDate,u.companyId,u.vendorId,
|
||||
u.teamId,u.teamName,u.enterType,u.is_del,u.create_by,u.create_time,u.update_by,u.update_time,
|
||||
b.project_id,b.sub_dept_id,u.companyName,u.workTypeName,u.groupName,
|
||||
b.project_id,b.sub_dept_id, g.teamname remark,g.companyName degreeName
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project sp
|
||||
WHERE u.cfgid=b.id and u.state=0 and u.companyId=g.companyId and sp.isDel=0 and b.project_id = sp.id
|
||||
<if test="id==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="id==102">
|
||||
and g.companyTypeId =8
|
||||
</if>
|
||||
<if test="id==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and sp.deptId=#{deptId}
|
||||
</if>
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and b.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="attendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
SELECT u.id,u.cfgid,u.app_id,u.vendors_code,u.workerId,u.laborWorkerId,u.workerCategory,u.qrCode,u.name,
|
||||
u.ethnic,u.nativePlace,u.gender,u.birthDate,u.phone,u.photo,u.recentPhoto,
|
||||
u.groupId,u.leader,u.workTypeCode,u.specWorkType,
|
||||
u.hatCode,u.state,u.enterDate,u.exitDate,u.companyId,u.vendorId,
|
||||
u.teamId,u.teamName,u.enterType,u.is_del,u.create_by,u.create_time,u.update_by,u.update_time,
|
||||
b.project_id,b.sub_dept_id,u.companyName,u.workTypeName,u.groupName,
|
||||
b.project_id,b.sub_dept_id, g.teamname remark,g.companyName degreeName,g.companyTypeId
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project sp
|
||||
WHERE u.cfgid=b.id and u.companyId=g.companyId and sp.isDel=0 and b.project_id = sp.id
|
||||
<if test="companyTypeId==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="companyTypeId==102">
|
||||
and g.companyTypeId =8
|
||||
</if>
|
||||
<if test="companyTypeId==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="id != null"> and u.id = #{id}</if>
|
||||
<if test="state != null "> and u.state = #{state}</if>
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
<select id="groupByWorkerOnDutyByDept" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
SELECT p.id, p.projectName NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project p,sys_dept c
|
||||
where u.cfgid=b.id and u.state=0 and u.companyId=g.companyId and b.project_id=p.id and c.dept_id=b.sub_dept_id
|
||||
and p.isDel=0
|
||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and p.deptId=#{deptId}
|
||||
</if>
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and p.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and b.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by p.projectName,c.dept_name,g.companyTypeId,p.id
|
||||
order by p.id
|
||||
</select>
|
||||
|
||||
<select id="groupUserByParams" parameterType="SurProjectAttendanceUser" resultType="Map">
|
||||
select '1' as type,g.companyTypeId,count(1) as total
|
||||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and u.state=0
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
group by g.companyTypeId
|
||||
UNION ALL
|
||||
select '2' as type,g.companyTypeId,count(1) as total
|
||||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and u.state=1
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
group by g.companyTypeId
|
||||
</select>
|
||||
|
||||
<select id="findUserAllByDays" parameterType="Long" resultType="Map">
|
||||
select '1' as type,g.companyTypeId,count(1) as total
|
||||
from sur_project_attendance_user u
|
||||
left join view_sur_project_attendance_group g on g.cfgid = u.cfgid and u.companyId=g.companyId
|
||||
where u.cfgid in (select cfg.id from sur_project_attendance_cfg cfg where cfg.project_id=#{projectId} and cfg.is_del=0)
|
||||
and g.companyTypeId in (0,1,2,3,4,5,6,8)
|
||||
and u.state=0
|
||||
group by g.companyTypeId
|
||||
</select>
|
||||
|
||||
<select id="groupByWorkerByDept" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
SELECT p.id, p.projectName NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project p,sys_dept c
|
||||
where u.cfgid=b.id and u.state= #{state} and u.companyId=g.companyId and b.project_id=p.id and c.dept_id=b.sub_dept_id
|
||||
and p.isDel=0
|
||||
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and p.deptId=#{deptId}
|
||||
</if>
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and p.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and b.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by p.projectName,c.dept_name,g.companyTypeId,p.id
|
||||
order by p.id
|
||||
</select>
|
||||
|
||||
<select id="queryWorkerByState" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
SELECT u.id,u.cfgid,u.app_id,u.vendors_code,u.workerId,u.laborWorkerId,u.workerCategory,u.qrCode,u.name,
|
||||
u.ethnic,u.nativePlace,u.gender,u.birthDate,u.phone,u.photo,u.recentPhoto,
|
||||
u.groupId,u.leader,u.workTypeCode,u.specWorkType,
|
||||
u.hatCode,u.state,u.enterDate,u.exitDate,u.companyId,u.vendorId,
|
||||
u.teamId,u.teamName,u.enterType,u.is_del,u.create_by,u.create_time,u.update_by,u.update_time,
|
||||
b.project_id,b.sub_dept_id,u.companyName,u.workTypeName,u.groupName,
|
||||
b.project_id,b.sub_dept_id, g.teamname remark,g.companyName degreeName
|
||||
FROM sur_project_attendance_user u,sur_project_attendance_cfg b,view_sur_project_attendance_group g,sur_project sp
|
||||
WHERE u.cfgid=b.id and u.state=#{state} and u.companyId=g.companyId and sp.isDel=0 and b.project_id = sp.id
|
||||
<if test="id==101">
|
||||
and g.companyTypeId in (1,6)
|
||||
</if>
|
||||
<if test="id==102">
|
||||
and g.companyTypeId =8
|
||||
</if>
|
||||
<if test="id==103">
|
||||
and g.companyTypeId in (0,2,3,4,5)
|
||||
</if>
|
||||
<if test="projectId!=null and projectId>0">
|
||||
and b.project_id=#{projectId}
|
||||
</if>
|
||||
<if test="deptId!=null and deptId>0">
|
||||
and sp.deptId=#{deptId}
|
||||
</if>
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and b.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -70,5 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectSysNativeListById" parameterType="Long" resultMap="SysNativeResult">
|
||||
SELECT * FROM sys_native WHERE id=#{id}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue