Compare commits
No commits in common. "a01534c6dcfda09fd316a40133af4ac0d43bd140" and "a706dadaf8dcc66663fced6b38c0a3d22d4a14d5" have entirely different histories.
a01534c6dc
...
a706dadaf8
|
|
@ -2,7 +2,6 @@ package com.yanzhu.system.api;
|
||||||
|
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -27,14 +26,4 @@ public interface RemoteFileService
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
|
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
|
||||||
|
|
||||||
/**
|
|
||||||
* 指定上传文件
|
|
||||||
* @param proPackage 项目包
|
|
||||||
* @param dirs 目录
|
|
||||||
* @param file 文件
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@PostMapping(value = "/upload/{proPackage}/dirs/{dirs}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
||||||
public R<SysFile> dirsUploadFile(@PathVariable("proPackage") String proPackage, @PathVariable("dirs") String dirs, @RequestPart(value = "file") MultipartFile file);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,6 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ
|
||||||
{
|
{
|
||||||
return R.fail("上传文件失败:" + throwable.getMessage());
|
return R.fail("上传文件失败:" + throwable.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public R<SysFile> dirsUploadFile(String proPackage, String dirs, MultipartFile file)
|
|
||||||
{
|
|
||||||
return R.fail("上传文件失败:" + throwable.getMessage());
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.yanzhu.common.core.enums;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yanzhu.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否状态
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
*/
|
||||||
|
public enum ShiFouEnum {
|
||||||
|
|
||||||
|
FOU("0", "否"), SHI("1", "是");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
ShiFouEnum(String code, String info)
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode()
|
||||||
|
{
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo()
|
||||||
|
{
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLongCode()
|
||||||
|
{
|
||||||
|
return Convert.toLong(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -29,7 +29,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||||
private static String[] parsePatterns = {
|
private static String[] parsePatterns = {
|
||||||
"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
|
"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
|
||||||
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
|
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
|
||||||
"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM", "yyyy年MM月dd日"};
|
"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前Date型日期
|
* 获取当前Date型日期
|
||||||
|
|
@ -78,14 +78,9 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||||
return parseDateToStr(format, new Date());
|
return parseDateToStr(format, new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String date(final Date date)
|
|
||||||
{
|
|
||||||
return parseDateToStr(YYYY_MM_DD, date);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final String dateTime(final Date date)
|
public static final String dateTime(final Date date)
|
||||||
{
|
{
|
||||||
return parseDateToStr(YYYY_MM_DD_HH_MM_SS, date);
|
return parseDateToStr(YYYY_MM_DD, date);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String parseDateToStr(final String format, final Date date)
|
public static final String parseDateToStr(final String format, final Date date)
|
||||||
|
|
@ -115,21 +110,12 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期格式字符串
|
* 日期路径 即年/月/日 如20180808
|
||||||
*/
|
*/
|
||||||
public static final String dateStr()
|
public static final String dateTime()
|
||||||
{
|
{
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
return DateFormatUtils.format(now, YYYY_MM_DD);
|
return DateFormatUtils.format(now, "yyyyMMdd");
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 时间格式字符串
|
|
||||||
*/
|
|
||||||
public static final String dateTimeStr()
|
|
||||||
{
|
|
||||||
Date now = new Date();
|
|
||||||
return DateFormatUtils.format(now, YYYY_MM_DD_HH_MM_SS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -163,7 +149,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||||
/**
|
/**
|
||||||
* 计算时间差
|
* 计算时间差
|
||||||
*
|
*
|
||||||
* @param endDate 最后时间
|
* @param endTime 最后时间
|
||||||
* @param startTime 开始时间
|
* @param startTime 开始时间
|
||||||
* @return 时间差(天/小时/分钟)
|
* @return 时间差(天/小时/分钟)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package com.yanzhu.common.core.utils.file;
|
package com.yanzhu.common.core.utils.file;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
@ -14,8 +12,6 @@ import com.yanzhu.common.core.utils.uuid.IdUtils;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.springframework.mock.web.MockMultipartFile;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件处理工具类
|
* 文件处理工具类
|
||||||
|
|
@ -336,60 +332,4 @@ public class FileUtils
|
||||||
String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString());
|
String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString());
|
||||||
return encode.replaceAll("\\+", "%20");
|
return encode.replaceAll("\\+", "%20");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载文件为Multipart
|
|
||||||
* @param fileUrl
|
|
||||||
* @return
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
public static byte[] downloadFileToFileBytes(String fileUrl) throws IOException {
|
|
||||||
// 通过 URL 获取文件
|
|
||||||
URL url = new URL(fileUrl);
|
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
|
||||||
connection.setRequestMethod("GET");
|
|
||||||
// 获取输入流
|
|
||||||
try (InputStream inputStream = connection.getInputStream()) {
|
|
||||||
// 将输入流转换为字节数组
|
|
||||||
byte[] fileBytes = readInputStream(inputStream);
|
|
||||||
return fileBytes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载文件为Multipart
|
|
||||||
* @param fileUrl
|
|
||||||
* @return
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
public static MultipartFile downloadFileToMultipart(String fileUrl) throws IOException {
|
|
||||||
// 通过 URL 获取文件
|
|
||||||
URL url = new URL(fileUrl);
|
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
|
||||||
connection.setRequestMethod("GET");
|
|
||||||
|
|
||||||
// 获取输入流
|
|
||||||
try (InputStream inputStream = connection.getInputStream()) {
|
|
||||||
// 将输入流转换为字节数组
|
|
||||||
byte[] fileBytes = readInputStream(inputStream);
|
|
||||||
// 创建 MockMultipartFile 对象
|
|
||||||
return new MockMultipartFile("file", System.currentTimeMillis()+".jpg", "image/jpeg", fileBytes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 读取文件流
|
|
||||||
* @param inputStream
|
|
||||||
* @return
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
private static byte[] readInputStream(InputStream inputStream) throws IOException {
|
|
||||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
||||||
byte[] buffer = new byte[1024];
|
|
||||||
int length;
|
|
||||||
while ((length = inputStream.read(buffer)) != -1) {
|
|
||||||
byteArrayOutputStream.write(buffer, 0, length);
|
|
||||||
}
|
|
||||||
return byteArrayOutputStream.toByteArray();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -99,14 +98,13 @@ public class SysFileController
|
||||||
/**
|
/**
|
||||||
* 文件上传请求
|
* 文件上传请求
|
||||||
*/
|
*/
|
||||||
@PostMapping("/upload/{proPackage}/dirs/{dirs}")
|
@PostMapping("uploadPath")
|
||||||
public R<SysFile> dirsUploadFile(@PathVariable("busKey") String proPackage, @PathVariable("dirs") String dirs, MultipartFile file)
|
public R<SysFile> uploadPath(MultipartFile file, String path)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String catalog = "/"+proPackage+"/"+dirs;
|
|
||||||
// 上传并返回访问地址
|
// 上传并返回访问地址
|
||||||
String url = sysFileService.dirsUploadFile(catalog,file);
|
String url = sysFileService.uploadFile(file);
|
||||||
SysFile sysFile = new SysFile();
|
SysFile sysFile = new SysFile();
|
||||||
sysFile.setName(FileUtils.getName(url));
|
sysFile.setName(FileUtils.getName(url));
|
||||||
sysFile.setUrl(url);
|
sysFile.setUrl(url);
|
||||||
|
|
|
||||||
|
|
@ -40,19 +40,6 @@ public class FastDfsSysFileServiceImpl implements ISysFileService
|
||||||
return domain + "/" + storePath.getFullPath();
|
return domain + "/" + storePath.getFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传接口
|
|
||||||
*
|
|
||||||
* @param dirs 文件目录
|
|
||||||
* @param file 上传的文件
|
|
||||||
* @return 访问地址
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String dirsUploadFile(String dirs, MultipartFile file) throws Exception{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名文件上传接口
|
* 签名文件上传接口
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,6 @@ public interface ISysFileService
|
||||||
*/
|
*/
|
||||||
public String uploadFile(MultipartFile file) throws Exception;
|
public String uploadFile(MultipartFile file) throws Exception;
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传接口
|
|
||||||
*
|
|
||||||
* @param dirs 文件目录
|
|
||||||
* @param file 上传的文件
|
|
||||||
* @return 访问地址
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public String dirsUploadFile(String dirs, MultipartFile file) throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名文件上传接口
|
* 签名文件上传接口
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -47,20 +47,6 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
||||||
return localFilePrefix + name;
|
return localFilePrefix + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传接口
|
|
||||||
*
|
|
||||||
* @param dirs 文件目录
|
|
||||||
* @param file 上传的文件
|
|
||||||
* @return 访问地址
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String dirsUploadFile(String dirs, MultipartFile file) throws Exception{
|
|
||||||
String name = FileUploadUtils.upload(localFilePath+dirs, file);
|
|
||||||
return localFilePrefix + name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名文件上传接口
|
* 签名文件上传接口
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -43,19 +43,6 @@ public class MinioSysFileServiceImpl implements ISysFileService
|
||||||
return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName;
|
return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传接口
|
|
||||||
*
|
|
||||||
* @param dirs 文件目录
|
|
||||||
* @param file 上传的文件
|
|
||||||
* @return 访问地址
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String dirsUploadFile(String dirs, MultipartFile file) throws Exception{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名文件上传接口
|
* 签名文件上传接口
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.yanzhu.job.config;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用映射配置
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class ResourcesConfig implements WebMvcConfigurer
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 上传文件存储在本地的根路径
|
||||||
|
*/
|
||||||
|
@Value("${file.path}")
|
||||||
|
private String localFilePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源映射路径 前缀
|
||||||
|
*/
|
||||||
|
@Value("${file.prefix}")
|
||||||
|
public String localFilePrefix;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addResourceHandlers(ResourceHandlerRegistry registry)
|
||||||
|
{
|
||||||
|
/** 本地文件上传路径 */
|
||||||
|
registry.addResourceHandler(localFilePrefix + "/**")
|
||||||
|
.addResourceLocations("file:" + localFilePath + File.separator);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启跨域
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
|
// 设置允许跨域的路由
|
||||||
|
registry.addMapping(localFilePrefix + "/**")
|
||||||
|
// 设置允许跨域请求的域名
|
||||||
|
.allowedOrigins("*")
|
||||||
|
// 设置允许的方法
|
||||||
|
.allowedMethods("GET");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUploadPath(){
|
||||||
|
return (localFilePath+"/upload/").replaceAll("//","/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
//package com.yanzhu.job.config;
|
||||||
|
//
|
||||||
|
//import java.util.Properties;
|
||||||
|
//import javax.sql.DataSource;
|
||||||
|
//import org.springframework.context.annotation.Bean;
|
||||||
|
//import org.springframework.context.annotation.Configuration;
|
||||||
|
//import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
|
||||||
|
// *
|
||||||
|
// * @author ruoyi
|
||||||
|
// */
|
||||||
|
//@Configuration
|
||||||
|
//public class ScheduleConfig
|
||||||
|
//{
|
||||||
|
// @Bean
|
||||||
|
// public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
|
||||||
|
// {
|
||||||
|
// SchedulerFactoryBean factory = new SchedulerFactoryBean();
|
||||||
|
// factory.setDataSource(dataSource);
|
||||||
|
//
|
||||||
|
// // quartz参数
|
||||||
|
// Properties prop = new Properties();
|
||||||
|
// prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
|
||||||
|
// prop.put("org.quartz.scheduler.instanceId", "AUTO");
|
||||||
|
// // 线程池配置
|
||||||
|
// prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
|
||||||
|
// prop.put("org.quartz.threadPool.threadCount", "20");
|
||||||
|
// prop.put("org.quartz.threadPool.threadPriority", "5");
|
||||||
|
// // JobStore配置
|
||||||
|
// prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore");
|
||||||
|
// // 集群配置
|
||||||
|
// prop.put("org.quartz.jobStore.isClustered", "true");
|
||||||
|
// prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
|
||||||
|
// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
|
||||||
|
// prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
|
||||||
|
//
|
||||||
|
// // sqlserver 启用
|
||||||
|
// // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
|
||||||
|
// prop.put("org.quartz.jobStore.misfireThreshold", "12000");
|
||||||
|
// prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
|
||||||
|
// factory.setQuartzProperties(prop);
|
||||||
|
//
|
||||||
|
// factory.setSchedulerName("RuoyiScheduler");
|
||||||
|
// // 延时启动
|
||||||
|
// factory.setStartupDelay(1);
|
||||||
|
// factory.setApplicationContextSchedulerContextKey("applicationContextKey");
|
||||||
|
// // 可选,QuartzScheduler
|
||||||
|
// // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了
|
||||||
|
// factory.setOverwriteExistingJobs(true);
|
||||||
|
// // 设置自动启动,默认为true
|
||||||
|
// factory.setAutoStartup(true);
|
||||||
|
//
|
||||||
|
// return factory;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
@ -1,362 +0,0 @@
|
||||||
package com.yanzhu.job.domain;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.yanzhu.common.core.annotation.Excel;
|
|
||||||
import com.yanzhu.common.core.web.domain.BaseEntity;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 考勤管理对象 attendance_ubi_data
|
|
||||||
*
|
|
||||||
* @author yanzhu
|
|
||||||
* @date 2024-10-12
|
|
||||||
*/
|
|
||||||
public class QuartzProAttendanceData extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 公司ID */
|
|
||||||
@Excel(name = "公司ID")
|
|
||||||
private Long comId;
|
|
||||||
|
|
||||||
/** 项目ID */
|
|
||||||
@Excel(name = "项目ID")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
/** 用户ID */
|
|
||||||
@Excel(name = "用户ID")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/** 班组编号(外键) */
|
|
||||||
@Excel(name = "班组编号(外键)")
|
|
||||||
private Long subDeptGroup;
|
|
||||||
|
|
||||||
/** 班组名称 */
|
|
||||||
@Excel(name = "班组名称")
|
|
||||||
private String subDeptGroupName;
|
|
||||||
|
|
||||||
/** 工种类型 */
|
|
||||||
@Excel(name = "工种类型")
|
|
||||||
private String craftType;
|
|
||||||
|
|
||||||
/** 工种岗位 */
|
|
||||||
@Excel(name = "工种岗位")
|
|
||||||
private String craftPost;
|
|
||||||
|
|
||||||
/** 进场时间 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@Excel(name = "进场时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date inTime;
|
|
||||||
|
|
||||||
/** 进场数据 */
|
|
||||||
@Excel(name = "进场数据")
|
|
||||||
private String inData;
|
|
||||||
|
|
||||||
/** 离场时间 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@Excel(name = "离场时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date outTime;
|
|
||||||
|
|
||||||
/** 离场数据 */
|
|
||||||
@Excel(name = "离场数据")
|
|
||||||
private String outData;
|
|
||||||
|
|
||||||
/** 设备NO */
|
|
||||||
@Excel(name = "设备NO")
|
|
||||||
private String deviceNo;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private Long isDel;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private Long state;
|
|
||||||
|
|
||||||
private Long subDeptId;
|
|
||||||
private String subDeptName;
|
|
||||||
private String source;
|
|
||||||
|
|
||||||
public Long getSubDeptId() {
|
|
||||||
return subDeptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubDeptId(Long subDeptId) {
|
|
||||||
this.subDeptId = subDeptId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSubDeptName() {
|
|
||||||
return subDeptName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubDeptName(String subDeptName) {
|
|
||||||
this.subDeptName = subDeptName;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String comName;
|
|
||||||
|
|
||||||
private List<Long> userIds;
|
|
||||||
|
|
||||||
public List<Long> getUserIds() {
|
|
||||||
return userIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<String> days;
|
|
||||||
|
|
||||||
public List<String> getDays() {
|
|
||||||
return days;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDays(List<String> days) {
|
|
||||||
this.days = days;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserIds(List<Long> userIds) {
|
|
||||||
this.userIds = userIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getComName() {
|
|
||||||
return comName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setComName(String comName) {
|
|
||||||
this.comName = comName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProjectName() {
|
|
||||||
return projectName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProjectName(String projectName) {
|
|
||||||
this.projectName = projectName;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setComId(Long comId)
|
|
||||||
{
|
|
||||||
this.comId = comId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getComId()
|
|
||||||
{
|
|
||||||
return comId;
|
|
||||||
}
|
|
||||||
public void setProjectId(Long projectId)
|
|
||||||
{
|
|
||||||
this.projectId = projectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getProjectId()
|
|
||||||
{
|
|
||||||
return projectId;
|
|
||||||
}
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
public void setUserName(String userName)
|
|
||||||
{
|
|
||||||
this.userName = userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName()
|
|
||||||
{
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
public void setSubDeptGroup(Long subDeptGroup)
|
|
||||||
{
|
|
||||||
this.subDeptGroup = subDeptGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSubDeptGroup()
|
|
||||||
{
|
|
||||||
return subDeptGroup;
|
|
||||||
}
|
|
||||||
public void setSubDeptGroupName(String subDeptGroupName)
|
|
||||||
{
|
|
||||||
this.subDeptGroupName = subDeptGroupName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSubDeptGroupName()
|
|
||||||
{
|
|
||||||
return subDeptGroupName;
|
|
||||||
}
|
|
||||||
public void setCraftType(String craftType)
|
|
||||||
{
|
|
||||||
this.craftType = craftType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCraftType()
|
|
||||||
{
|
|
||||||
return craftType;
|
|
||||||
}
|
|
||||||
public void setCraftPost(String craftPost)
|
|
||||||
{
|
|
||||||
this.craftPost = craftPost;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCraftPost()
|
|
||||||
{
|
|
||||||
return craftPost;
|
|
||||||
}
|
|
||||||
public void setInTime(Date inTime)
|
|
||||||
{
|
|
||||||
this.inTime = inTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getInTime()
|
|
||||||
{
|
|
||||||
return inTime;
|
|
||||||
}
|
|
||||||
public void setInData(String inData)
|
|
||||||
{
|
|
||||||
this.inData = inData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInData()
|
|
||||||
{
|
|
||||||
return inData;
|
|
||||||
}
|
|
||||||
public void setOutTime(Date outTime)
|
|
||||||
{
|
|
||||||
this.outTime = outTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getOutTime()
|
|
||||||
{
|
|
||||||
return outTime;
|
|
||||||
}
|
|
||||||
public void setOutData(String outData)
|
|
||||||
{
|
|
||||||
this.outData = outData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOutData()
|
|
||||||
{
|
|
||||||
return outData;
|
|
||||||
}
|
|
||||||
public void setDeviceNo(String deviceNo)
|
|
||||||
{
|
|
||||||
this.deviceNo = deviceNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDeviceNo()
|
|
||||||
{
|
|
||||||
return deviceNo;
|
|
||||||
}
|
|
||||||
public void setIsDel(Long isDel)
|
|
||||||
{
|
|
||||||
this.isDel = isDel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getIsDel()
|
|
||||||
{
|
|
||||||
return isDel;
|
|
||||||
}
|
|
||||||
public void setState(Long state)
|
|
||||||
{
|
|
||||||
this.state = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getState()
|
|
||||||
{
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAdmitGuid() {
|
|
||||||
return admitGuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAdmitGuid(String admitGuid) {
|
|
||||||
this.admitGuid = admitGuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String admitGuid;
|
|
||||||
private String eventGuid;
|
|
||||||
private String inPhoto;
|
|
||||||
private String outPhoto;
|
|
||||||
public String getEventGuid() {
|
|
||||||
return eventGuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEventGuid(String eventGuid) {
|
|
||||||
this.eventGuid = eventGuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInPhoto() {
|
|
||||||
return inPhoto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInPhoto(String inPhoto) {
|
|
||||||
this.inPhoto = inPhoto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOutPhoto() {
|
|
||||||
return outPhoto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOutPhoto(String outPhoto) {
|
|
||||||
this.outPhoto = outPhoto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSource() {
|
|
||||||
return source;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSource(String source) {
|
|
||||||
this.source = source;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("comId", getComId())
|
|
||||||
.append("projectId", getProjectId())
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.append("userName", getUserName())
|
|
||||||
.append("subDeptGroup", getSubDeptGroup())
|
|
||||||
.append("subDeptGroupName", getSubDeptGroupName())
|
|
||||||
.append("craftType", getCraftType())
|
|
||||||
.append("craftPost", getCraftPost())
|
|
||||||
.append("inTime", getInTime())
|
|
||||||
.append("inData", getInData())
|
|
||||||
.append("outTime", getOutTime())
|
|
||||||
.append("outData", getOutData())
|
|
||||||
.append("deviceNo", getDeviceNo())
|
|
||||||
.append("isDel", getIsDel())
|
|
||||||
.append("state", getState())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,7 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2023-09-24
|
* @date 2023-09-24
|
||||||
*/
|
*/
|
||||||
public class QuartzProAttendanceCfg extends BaseEntity
|
public class QuartzProjectAttendanceCfg extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
@ -142,17 +142,7 @@ public class QuartzProAttendanceCfg extends BaseEntity
|
||||||
|
|
||||||
private String compName;
|
private String compName;
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String projectPackage;
|
|
||||||
private String vendorsName;
|
private String vendorsName;
|
||||||
|
|
||||||
public String getProjectPackage() {
|
|
||||||
return projectPackage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProjectPackage(String projectPackage) {
|
|
||||||
this.projectPackage = projectPackage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProjectName() {
|
public String getProjectName() {
|
||||||
return projectName;
|
return projectName;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,512 @@
|
||||||
|
package com.yanzhu.job.domain;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.yanzhu.common.core.annotation.Excel;
|
||||||
|
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 劳务实名制管理对象 sur_project_attendance_data
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public class QuartzProjectAttendanceData extends BaseEntity
|
||||||
|
{
|
||||||
|
public QuartzProjectAttendanceData(){
|
||||||
|
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 */
|
||||||
|
private Long cfgid;
|
||||||
|
|
||||||
|
/** 注册应用ID */
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
/** 厂商编号参考字典attendance_vendors */
|
||||||
|
private String vendorsCode;
|
||||||
|
|
||||||
|
/** 服务端ID */
|
||||||
|
private String serverid;
|
||||||
|
|
||||||
|
/** 队伍id */
|
||||||
|
private Long teamId;
|
||||||
|
|
||||||
|
/** 工种编码 */
|
||||||
|
private String workTypeCode;
|
||||||
|
|
||||||
|
/** 分包商id */
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
|
/** 平台对应分包商ID */
|
||||||
|
private Long vendorId;
|
||||||
|
|
||||||
|
/** 设备编号 */
|
||||||
|
private String deviceCode;
|
||||||
|
|
||||||
|
/** 照片 */
|
||||||
|
private String scanPhoto;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
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 QuartzProjectAttendanceData createFromHuazhu(JSONObject j) {
|
||||||
|
QuartzProjectAttendanceData d=new QuartzProjectAttendanceData();
|
||||||
|
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 QuartzProjectAttendanceData createFromJgw(JSONObject j) {
|
||||||
|
QuartzProjectAttendanceData d=new QuartzProjectAttendanceData();
|
||||||
|
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 QuartzProjectAttendanceData create(JSONObject json) {
|
||||||
|
QuartzProjectAttendanceData d=new QuartzProjectAttendanceData();
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setCfgid(Long cfgid)
|
||||||
|
{
|
||||||
|
this.cfgid = cfgid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCfgid()
|
||||||
|
{
|
||||||
|
return cfgid;
|
||||||
|
}
|
||||||
|
public void setVendorsCode(String vendorsCode)
|
||||||
|
{
|
||||||
|
this.vendorsCode = vendorsCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVendorsCode()
|
||||||
|
{
|
||||||
|
return vendorsCode;
|
||||||
|
}
|
||||||
|
public void setServerid(String serverid)
|
||||||
|
{
|
||||||
|
this.serverid = serverid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServerid()
|
||||||
|
{
|
||||||
|
return serverid;
|
||||||
|
}
|
||||||
|
public void setWorkerId(String workerId)
|
||||||
|
{
|
||||||
|
this.workerId = workerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkerId()
|
||||||
|
{
|
||||||
|
return workerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttendanceTime(String attendanceTime)
|
||||||
|
{
|
||||||
|
this.attendanceTime = attendanceTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttendanceTime()
|
||||||
|
{
|
||||||
|
return attendanceTime;
|
||||||
|
}
|
||||||
|
public void setIdentification(String identification)
|
||||||
|
{
|
||||||
|
this.identification = identification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdentification()
|
||||||
|
{
|
||||||
|
return identification;
|
||||||
|
}
|
||||||
|
public void setTeamId(Long teamId)
|
||||||
|
{
|
||||||
|
this.teamId = teamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTeamId()
|
||||||
|
{
|
||||||
|
return teamId;
|
||||||
|
}
|
||||||
|
public void setWorkTypeCode(String workTypeCode)
|
||||||
|
{
|
||||||
|
this.workTypeCode = workTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkTypeCode()
|
||||||
|
{
|
||||||
|
return workTypeCode;
|
||||||
|
}
|
||||||
|
public void setCompanyId(String companyId)
|
||||||
|
{
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyId()
|
||||||
|
{
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
public void setVendorId(Long vendorId)
|
||||||
|
{
|
||||||
|
this.vendorId = vendorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getVendorId()
|
||||||
|
{
|
||||||
|
return vendorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceCode(String deviceCode)
|
||||||
|
{
|
||||||
|
this.deviceCode = deviceCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceCode()
|
||||||
|
{
|
||||||
|
return deviceCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setScanPhoto(String scanPhoto)
|
||||||
|
{
|
||||||
|
this.scanPhoto = scanPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getScanPhoto()
|
||||||
|
{
|
||||||
|
return scanPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
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("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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,429 @@
|
||||||
|
package com.yanzhu.job.domain;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.yanzhu.common.core.annotation.Excel;
|
||||||
|
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广联达班组信息对象 sur_project_attendance_group
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
public class QuartzProjectAttendanceGroup extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** cfgid */
|
||||||
|
@Excel(name = "cfgid")
|
||||||
|
private Long cfgid;
|
||||||
|
|
||||||
|
/** 注册应用ID */
|
||||||
|
@Excel(name = "注册应用ID")
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
/** 服务器主键id */
|
||||||
|
@Excel(name = "服务器主键id")
|
||||||
|
private String serverid;
|
||||||
|
|
||||||
|
/** 营业执照号 */
|
||||||
|
@Excel(name = "营业执照号")
|
||||||
|
private String bizLicense;
|
||||||
|
|
||||||
|
/** 分包商统一社会信用代码 */
|
||||||
|
@Excel(name = "分包商统一社会信用代码")
|
||||||
|
private String companyCode;
|
||||||
|
|
||||||
|
/** 分包商ID */
|
||||||
|
@Excel(name = "分包商ID")
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
|
/** 分包商名称 */
|
||||||
|
@Excel(name = "分包商名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
/** 分包商类型 */
|
||||||
|
@Excel(name = "分包商类型")
|
||||||
|
private String companyTypeId;
|
||||||
|
|
||||||
|
/** 平台对应分包商ID */
|
||||||
|
@Excel(name = "平台对应分包商ID")
|
||||||
|
private Long vendorId;
|
||||||
|
|
||||||
|
/** 班组名称 */
|
||||||
|
@Excel(name = "班组名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 班组长名称 */
|
||||||
|
@Excel(name = "班组长名称")
|
||||||
|
private String leaderName;
|
||||||
|
|
||||||
|
/** 班组长电话 */
|
||||||
|
@Excel(name = "班组长电话")
|
||||||
|
private String leaderPhone;
|
||||||
|
|
||||||
|
/** 队伍Id */
|
||||||
|
@Excel(name = "队伍Id")
|
||||||
|
private Long teamId;
|
||||||
|
|
||||||
|
/** 队伍名称 */
|
||||||
|
@Excel(name = "队伍名称")
|
||||||
|
private String teamName;
|
||||||
|
|
||||||
|
/** 班组类型0:建筑工人班组;1:管理人员班组 */
|
||||||
|
@Excel(name = "班组类型0:建筑工人班组;1:管理人员班组")
|
||||||
|
private Long type;
|
||||||
|
|
||||||
|
/** 班组长对应的工人ID */
|
||||||
|
@Excel(name = "班组长对应的工人ID")
|
||||||
|
private Long leaderId;
|
||||||
|
|
||||||
|
/** 是否删除 */
|
||||||
|
@Excel(name = "是否删除")
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
/** 基础平台对应班组ID */
|
||||||
|
@Excel(name = "基础平台对应班组ID")
|
||||||
|
private Long platformGroupId;
|
||||||
|
|
||||||
|
/** 基础平台对应队伍ID */
|
||||||
|
@Excel(name = "基础平台对应队伍ID")
|
||||||
|
private Long platformTeamId;
|
||||||
|
|
||||||
|
/** 企业进场日期 */
|
||||||
|
@Excel(name = "企业进场日期")
|
||||||
|
private Long enterDate;
|
||||||
|
|
||||||
|
/** 企业退场日期 */
|
||||||
|
@Excel(name = "企业退场日期")
|
||||||
|
private Long exitDate;
|
||||||
|
|
||||||
|
/** 是否有效 */
|
||||||
|
@Excel(name = "是否有效")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
/** 时间戳 */
|
||||||
|
@Excel(name = "时间戳")
|
||||||
|
private Long createTimestamp;
|
||||||
|
|
||||||
|
public static QuartzProjectAttendanceGroup createHuazhu(JSONObject j) {
|
||||||
|
QuartzProjectAttendanceGroup g=new QuartzProjectAttendanceGroup();
|
||||||
|
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 QuartzProjectAttendanceGroup createJgw(JSONObject j, boolean isDirectlyUnder) {
|
||||||
|
QuartzProjectAttendanceGroup g=new QuartzProjectAttendanceGroup();
|
||||||
|
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 QuartzProjectAttendanceGroup create(JSONObject json) {
|
||||||
|
QuartzProjectAttendanceGroup g=new QuartzProjectAttendanceGroup();
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setCfgid(Long cfgid)
|
||||||
|
{
|
||||||
|
this.cfgid = cfgid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCfgid()
|
||||||
|
{
|
||||||
|
return cfgid;
|
||||||
|
}
|
||||||
|
public void setServerid(String serverid)
|
||||||
|
{
|
||||||
|
this.serverid = serverid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServerid()
|
||||||
|
{
|
||||||
|
return serverid;
|
||||||
|
}
|
||||||
|
public void setBizLicense(String bizLicense)
|
||||||
|
{
|
||||||
|
this.bizLicense = bizLicense;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBizLicense()
|
||||||
|
{
|
||||||
|
return bizLicense;
|
||||||
|
}
|
||||||
|
public void setCompanyCode(String companyCode)
|
||||||
|
{
|
||||||
|
this.companyCode = companyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyCode()
|
||||||
|
{
|
||||||
|
return companyCode;
|
||||||
|
}
|
||||||
|
public void setCompanyId(String companyId)
|
||||||
|
{
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyId()
|
||||||
|
{
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
public void setCompanyName(String companyName)
|
||||||
|
{
|
||||||
|
this.companyName = companyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyName()
|
||||||
|
{
|
||||||
|
return companyName;
|
||||||
|
}
|
||||||
|
public void setCompanyTypeId(String companyTypeId)
|
||||||
|
{
|
||||||
|
this.companyTypeId = companyTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyTypeId()
|
||||||
|
{
|
||||||
|
return companyTypeId;
|
||||||
|
}
|
||||||
|
public void setVendorId(Long vendorId)
|
||||||
|
{
|
||||||
|
this.vendorId = vendorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getVendorId()
|
||||||
|
{
|
||||||
|
return vendorId;
|
||||||
|
}
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setLeaderName(String leaderName)
|
||||||
|
{
|
||||||
|
this.leaderName = leaderName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeaderName()
|
||||||
|
{
|
||||||
|
return leaderName;
|
||||||
|
}
|
||||||
|
public void setLeaderPhone(String leaderPhone)
|
||||||
|
{
|
||||||
|
this.leaderPhone = leaderPhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeaderPhone()
|
||||||
|
{
|
||||||
|
return leaderPhone;
|
||||||
|
}
|
||||||
|
public void setTeamId(Long teamId)
|
||||||
|
{
|
||||||
|
this.teamId = teamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTeamId()
|
||||||
|
{
|
||||||
|
return teamId;
|
||||||
|
}
|
||||||
|
public void setTeamName(String teamName)
|
||||||
|
{
|
||||||
|
this.teamName = teamName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTeamName()
|
||||||
|
{
|
||||||
|
return teamName;
|
||||||
|
}
|
||||||
|
public void setType(Long type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
public void setLeaderId(Long leaderId)
|
||||||
|
{
|
||||||
|
this.leaderId = leaderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLeaderId()
|
||||||
|
{
|
||||||
|
return leaderId;
|
||||||
|
}
|
||||||
|
public void setDeleted(Integer deleted)
|
||||||
|
{
|
||||||
|
this.deleted = deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDeleted()
|
||||||
|
{
|
||||||
|
return deleted;
|
||||||
|
}
|
||||||
|
public void setPlatformGroupId(Long platformGroupId)
|
||||||
|
{
|
||||||
|
this.platformGroupId = platformGroupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPlatformGroupId()
|
||||||
|
{
|
||||||
|
return platformGroupId;
|
||||||
|
}
|
||||||
|
public void setPlatformTeamId(Long platformTeamId)
|
||||||
|
{
|
||||||
|
this.platformTeamId = platformTeamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPlatformTeamId()
|
||||||
|
{
|
||||||
|
return platformTeamId;
|
||||||
|
}
|
||||||
|
public void setEnterDate(Long enterDate)
|
||||||
|
{
|
||||||
|
this.enterDate = enterDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getEnterDate()
|
||||||
|
{
|
||||||
|
return enterDate;
|
||||||
|
}
|
||||||
|
public void setExitDate(Long exitDate)
|
||||||
|
{
|
||||||
|
this.exitDate = exitDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getExitDate()
|
||||||
|
{
|
||||||
|
return exitDate;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
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("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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,733 @@
|
||||||
|
package com.yanzhu.job.domain;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.yanzhu.common.core.annotation.Excel;
|
||||||
|
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤人员基本属性对象 sur_project_attendance_user
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public class QuartzProjectAttendanceUser extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 配置项ID,可以获取项目ID和总包ID */
|
||||||
|
|
||||||
|
private Long cfgid;
|
||||||
|
|
||||||
|
/** 注册应用ID */
|
||||||
|
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
/** 厂商编号参考字典attendance_vendors */
|
||||||
|
|
||||||
|
private String vendorsCode;
|
||||||
|
|
||||||
|
/** 工人id */
|
||||||
|
@Excel(name = "工人id")
|
||||||
|
private String workerId;
|
||||||
|
|
||||||
|
/** 项目工人履历id对于旧劳务,这个字段相当于工人的projectWorkerId,管理人员的registerManagerId */
|
||||||
|
|
||||||
|
private Long laborWorkerId;
|
||||||
|
|
||||||
|
/** 人员类别0:工人,1:管理人员 */
|
||||||
|
@Excel(name = "人员类别0:工人,1:管理人员")
|
||||||
|
private Long workerCategory;
|
||||||
|
|
||||||
|
/** 工号 */
|
||||||
|
|
||||||
|
private Long qrCode;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
@Excel(name = "姓名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 民族 */
|
||||||
|
@Excel(name = "民族")
|
||||||
|
private String ethnic;
|
||||||
|
|
||||||
|
/** 籍贯 */
|
||||||
|
@Excel(name = "籍贯")
|
||||||
|
private String nativePlace;
|
||||||
|
|
||||||
|
/** 性别0:男 1:女 */
|
||||||
|
@Excel(name = "性别0:男 1:女")
|
||||||
|
private Long gender;
|
||||||
|
|
||||||
|
/** 出生日期时间戳 */
|
||||||
|
@Excel(name = "出生日期时间戳")
|
||||||
|
private Long birthDate;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
@Excel(name = "联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 学历 */
|
||||||
|
@Excel(name = "学历")
|
||||||
|
private String degreeName;
|
||||||
|
|
||||||
|
/** 身份证照 */
|
||||||
|
@Excel(name = "身份证照")
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
/** 近照 */
|
||||||
|
|
||||||
|
private String recentPhoto;
|
||||||
|
|
||||||
|
/** 所属班组ID */
|
||||||
|
|
||||||
|
private String groupId;
|
||||||
|
|
||||||
|
/** 所属班组 */
|
||||||
|
@Excel(name = "所属班组")
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
/** 是否班组长 */
|
||||||
|
@Excel(name = "是否班组长")
|
||||||
|
private Integer leader;
|
||||||
|
|
||||||
|
/** 工种编码 */
|
||||||
|
@Excel(name = "工种编码")
|
||||||
|
private String workTypeCode;
|
||||||
|
|
||||||
|
/** 工种 */
|
||||||
|
@Excel(name = "工种")
|
||||||
|
private String workTypeName;
|
||||||
|
|
||||||
|
/** 是否特殊工种 */
|
||||||
|
@Excel(name = "是否特殊工种")
|
||||||
|
private Integer specWorkType;
|
||||||
|
|
||||||
|
/** 安全帽编号 */
|
||||||
|
@Excel(name = "安全帽编号")
|
||||||
|
private String hatCode;
|
||||||
|
|
||||||
|
/** 进退场状态0:进场,1:退场 */
|
||||||
|
@Excel(name = "进退场状态0:进场,1:退场")
|
||||||
|
private Long state;
|
||||||
|
|
||||||
|
/** 进场日期 */
|
||||||
|
@Excel(name = "进场日期")
|
||||||
|
private String enterDate;
|
||||||
|
|
||||||
|
/** 退场日期 */
|
||||||
|
@Excel(name = "退场日期")
|
||||||
|
private String exitDate;
|
||||||
|
|
||||||
|
/** 分包商id */
|
||||||
|
@Excel(name = "分包商id")
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
|
/** 分包商名称 */
|
||||||
|
@Excel(name = "分包商名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
/** 平台对应分包商ID */
|
||||||
|
@Excel(name = "平台对应分包商ID")
|
||||||
|
private Long vendorId;
|
||||||
|
|
||||||
|
/** 队伍id */
|
||||||
|
@Excel(name = "队伍id")
|
||||||
|
private Integer teamId;
|
||||||
|
|
||||||
|
/** 队伍名称 */
|
||||||
|
@Excel(name = "队伍名称")
|
||||||
|
private String teamName;
|
||||||
|
|
||||||
|
/** 进场方式0:自动,1:手动2:拍照 */
|
||||||
|
@Excel(name = "进场方式0:自动,1:手动2:拍照")
|
||||||
|
private String enterType;
|
||||||
|
|
||||||
|
/** 服务返回的JSON */
|
||||||
|
@Excel(name = "服务返回的JSON")
|
||||||
|
private String other;
|
||||||
|
|
||||||
|
/** 是否有效 */
|
||||||
|
@Excel(name = "是否有效")
|
||||||
|
private Long isDel;
|
||||||
|
|
||||||
|
/** 人员部门类型 */
|
||||||
|
@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 QuartzProjectAttendanceUser createFromHuazhu(JSONObject j) {
|
||||||
|
QuartzProjectAttendanceUser u=new QuartzProjectAttendanceUser();
|
||||||
|
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 QuartzProjectAttendanceUser createFromJgw(JSONObject j) {
|
||||||
|
QuartzProjectAttendanceUser u=new QuartzProjectAttendanceUser();
|
||||||
|
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 QuartzProjectAttendanceUser create(JSONObject json) {
|
||||||
|
QuartzProjectAttendanceUser u=new QuartzProjectAttendanceUser();
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setCfgid(Long cfgid)
|
||||||
|
{
|
||||||
|
this.cfgid = cfgid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCfgid()
|
||||||
|
{
|
||||||
|
return cfgid;
|
||||||
|
}
|
||||||
|
public void setVendorsCode(String vendorsCode)
|
||||||
|
{
|
||||||
|
this.vendorsCode = vendorsCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVendorsCode()
|
||||||
|
{
|
||||||
|
return vendorsCode;
|
||||||
|
}
|
||||||
|
public void setWorkerId(String workerId)
|
||||||
|
{
|
||||||
|
this.workerId = workerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkerId()
|
||||||
|
{
|
||||||
|
return workerId;
|
||||||
|
}
|
||||||
|
public void setLaborWorkerId(Long laborWorkerId)
|
||||||
|
{
|
||||||
|
this.laborWorkerId = laborWorkerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLaborWorkerId()
|
||||||
|
{
|
||||||
|
return laborWorkerId;
|
||||||
|
}
|
||||||
|
public void setWorkerCategory(Long workerCategory)
|
||||||
|
{
|
||||||
|
this.workerCategory = workerCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWorkerCategory()
|
||||||
|
{
|
||||||
|
return workerCategory;
|
||||||
|
}
|
||||||
|
public void setQrCode(Long qrCode)
|
||||||
|
{
|
||||||
|
this.qrCode = qrCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQrCode()
|
||||||
|
{
|
||||||
|
return qrCode;
|
||||||
|
}
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setEthnic(String ethnic)
|
||||||
|
{
|
||||||
|
this.ethnic = ethnic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEthnic()
|
||||||
|
{
|
||||||
|
return ethnic;
|
||||||
|
}
|
||||||
|
public void setNativePlace(String nativePlace)
|
||||||
|
{
|
||||||
|
this.nativePlace = nativePlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNativePlace()
|
||||||
|
{
|
||||||
|
return nativePlace;
|
||||||
|
}
|
||||||
|
public void setGender(Long gender)
|
||||||
|
{
|
||||||
|
this.gender = gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getGender()
|
||||||
|
{
|
||||||
|
return gender;
|
||||||
|
}
|
||||||
|
public void setBirthDate(Long birthDate)
|
||||||
|
{
|
||||||
|
this.birthDate = birthDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getBirthDate()
|
||||||
|
{
|
||||||
|
return birthDate;
|
||||||
|
}
|
||||||
|
public void setPhone(String phone)
|
||||||
|
{
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone()
|
||||||
|
{
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
public void setDegreeName(String degreeName)
|
||||||
|
{
|
||||||
|
this.degreeName = degreeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDegreeName()
|
||||||
|
{
|
||||||
|
return degreeName;
|
||||||
|
}
|
||||||
|
public void setPhoto(String photo)
|
||||||
|
{
|
||||||
|
this.photo = photo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhoto()
|
||||||
|
{
|
||||||
|
return photo;
|
||||||
|
}
|
||||||
|
public void setRecentPhoto(String recentPhoto)
|
||||||
|
{
|
||||||
|
this.recentPhoto = recentPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecentPhoto()
|
||||||
|
{
|
||||||
|
return recentPhoto;
|
||||||
|
}
|
||||||
|
public void setGroupId(String groupId)
|
||||||
|
{
|
||||||
|
this.groupId = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroupId()
|
||||||
|
{
|
||||||
|
return groupId;
|
||||||
|
}
|
||||||
|
public void setGroupName(String groupName)
|
||||||
|
{
|
||||||
|
this.groupName = groupName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroupName()
|
||||||
|
{
|
||||||
|
return groupName;
|
||||||
|
}
|
||||||
|
public void setLeader(Integer leader)
|
||||||
|
{
|
||||||
|
this.leader = leader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLeader()
|
||||||
|
{
|
||||||
|
return leader;
|
||||||
|
}
|
||||||
|
public void setWorkTypeCode(String workTypeCode)
|
||||||
|
{
|
||||||
|
this.workTypeCode = workTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkTypeCode()
|
||||||
|
{
|
||||||
|
return workTypeCode;
|
||||||
|
}
|
||||||
|
public void setWorkTypeName(String workTypeName)
|
||||||
|
{
|
||||||
|
this.workTypeName = workTypeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkTypeName()
|
||||||
|
{
|
||||||
|
return workTypeName;
|
||||||
|
}
|
||||||
|
public void setSpecWorkType(Integer specWorkType)
|
||||||
|
{
|
||||||
|
this.specWorkType = specWorkType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSpecWorkType()
|
||||||
|
{
|
||||||
|
return specWorkType;
|
||||||
|
}
|
||||||
|
public void setHatCode(String hatCode)
|
||||||
|
{
|
||||||
|
this.hatCode = hatCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHatCode()
|
||||||
|
{
|
||||||
|
return hatCode;
|
||||||
|
}
|
||||||
|
public void setState(Long state)
|
||||||
|
{
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getState()
|
||||||
|
{
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
public void setEnterDate(String enterDate)
|
||||||
|
{
|
||||||
|
this.enterDate = enterDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnterDate()
|
||||||
|
{
|
||||||
|
return enterDate;
|
||||||
|
}
|
||||||
|
public void setExitDate(String exitDate)
|
||||||
|
{
|
||||||
|
this.exitDate = exitDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExitDate()
|
||||||
|
{
|
||||||
|
return exitDate;
|
||||||
|
}
|
||||||
|
public void setCompanyId(String companyId)
|
||||||
|
{
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyId()
|
||||||
|
{
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
public void setCompanyName(String companyName)
|
||||||
|
{
|
||||||
|
this.companyName = companyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompanyName()
|
||||||
|
{
|
||||||
|
return companyName;
|
||||||
|
}
|
||||||
|
public void setVendorId(Long vendorId)
|
||||||
|
{
|
||||||
|
this.vendorId = vendorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getVendorId()
|
||||||
|
{
|
||||||
|
return vendorId;
|
||||||
|
}
|
||||||
|
public void setTeamId(Integer teamId)
|
||||||
|
{
|
||||||
|
this.teamId = teamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTeamId()
|
||||||
|
{
|
||||||
|
return teamId;
|
||||||
|
}
|
||||||
|
public void setTeamName(String teamName)
|
||||||
|
{
|
||||||
|
this.teamName = teamName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTeamName()
|
||||||
|
{
|
||||||
|
return teamName;
|
||||||
|
}
|
||||||
|
public void setEnterType(String enterType)
|
||||||
|
{
|
||||||
|
this.enterType = enterType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnterType()
|
||||||
|
{
|
||||||
|
return enterType;
|
||||||
|
}
|
||||||
|
public void setOther(String other)
|
||||||
|
{
|
||||||
|
this.other = other;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOther()
|
||||||
|
{
|
||||||
|
return other;
|
||||||
|
}
|
||||||
|
public void setIsDel(Long isDel)
|
||||||
|
{
|
||||||
|
this.isDel = isDel;
|
||||||
|
}
|
||||||
|
|
||||||
|
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("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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
package com.yanzhu.job.mapper;
|
|
||||||
|
|
||||||
import com.yanzhu.job.domain.QuartzProAttendanceCfg;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目考勤配置Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-09-24
|
|
||||||
*/
|
|
||||||
public interface QuartzProAttendanceCfgMapper
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询项目考勤配置信息
|
|
||||||
* @param cfgId 项目考勤主键
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public QuartzProAttendanceCfg selectProAttendanceCfgByCfgId(Long cfgId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询项目考勤配置列表
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceCfg 项目考勤配置
|
|
||||||
* @return 项目考勤配置集合
|
|
||||||
*/
|
|
||||||
public List<QuartzProAttendanceCfg> selectProAttendanceCfgList(QuartzProAttendanceCfg quartzProAttendanceCfg);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
package com.yanzhu.job.mapper;
|
|
||||||
|
|
||||||
import com.yanzhu.job.domain.QuartzProAttendanceData;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 劳务实名制管理Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-09-24
|
|
||||||
*/
|
|
||||||
public interface QuartzProAttendanceDataMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询考勤管理
|
|
||||||
*
|
|
||||||
* @param id 考勤管理主键
|
|
||||||
* @return 考勤管理
|
|
||||||
*/
|
|
||||||
public QuartzProAttendanceData selectProAttendanceDataById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询考勤管理列表
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 考勤管理集合
|
|
||||||
*/
|
|
||||||
public List<QuartzProAttendanceData> selectProAttendanceDataList(QuartzProAttendanceData quartzProAttendanceData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增考勤管理
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertProAttendanceData(QuartzProAttendanceData quartzProAttendanceData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改考勤管理
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateProAttendanceData(QuartzProAttendanceData quartzProAttendanceData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除考勤管理
|
|
||||||
*
|
|
||||||
* @param id 考勤管理主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteProAttendanceDataById(Long id);
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.yanzhu.job.mapper;
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceCfg;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目考勤配置Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public interface QuartzProjectAttendanceCfgMapper
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目考勤配置信息
|
||||||
|
* @param cfgId 项目考勤主键
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceCfg selectSurProjectAttendanceCfgByCfgId(Long cfgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目考勤配置列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||||
|
* @return 项目考勤配置集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceCfg> selectSurProjectAttendanceCfgList(QuartzProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
package com.yanzhu.job.mapper;
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceData;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 劳务实名制管理Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public interface QuartzProjectAttendanceDataMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param id 劳务实名制管理主键
|
||||||
|
* @return 劳务实名制管理
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceData selectSurProjectAttendanceDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询劳务实名制管理列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 劳务实名制管理集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceData> selectSurProjectAttendanceDataList(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 劳务实名制管理集合
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceData findCurrentAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceData> selectSurProjectAttendanceDataListEx(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
/**
|
||||||
|
* 新增劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param id 劳务实名制管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceDataByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceDataByParams(List<String> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增劳务实名制考勤管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceDataList 劳务实名制考勤管理列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSurProjectAttendanceData(@Param("list") List<QuartzProjectAttendanceData> quartzProjectAttendanceDataList, @Param("year") String year);
|
||||||
|
|
||||||
|
public Long getLastServerId(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
List<QuartzProjectAttendanceData> groupAllByComany(QuartzProjectAttendanceData where);
|
||||||
|
List<QuartzProjectAttendanceData> groupByComany(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
public Long getHuazhuPage(QuartzProjectAttendanceData 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<QuartzProjectAttendanceData> todayAttendance(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> findGroupAllByDays(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计所有数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> findGroupAllByParams(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计考勤数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> groupDataByParams(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤数据列表
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceData> attendanceDataList(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceData> groupTodayCompanyTypeId(QuartzProjectAttendanceData where);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
package com.yanzhu.job.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceGroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广联达班组信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
public interface QuartzProjectAttendanceGroupMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息
|
||||||
|
*
|
||||||
|
* @param id 广联达班组信息主键
|
||||||
|
* @return 广联达班组信息
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceGroup selectSurProjectAttendanceGroupById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 广联达班组信息集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceGroup> selectSurProjectAttendanceGroupViewList(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 广联达班组信息集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceGroup> selectSurProjectAttendanceGroupList(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectAttendanceGroup(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectAttendanceGroup(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除广联达班组信息
|
||||||
|
*
|
||||||
|
* @param id 广联达班组信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceGroupById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除广联达班组信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceGroupByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除广联达班组信息
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceGroupByParams(List<String> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroupList 广联达班组信息列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSurProjectAttendanceGroup(List<QuartzProjectAttendanceGroup> quartzProjectAttendanceGroupList);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,170 @@
|
||||||
|
package com.yanzhu.job.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceCfg;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceData;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤人员基本属性Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public interface QuartzProjectAttendanceUserMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param id 考勤人员基本属性主键
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceUser selectSurProjectAttendanceUserById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤人员信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceUser findCurrentAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询[研筑]考勤人员信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceUser findYzCurrentAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤人员基本属性列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 考勤人员基本属性集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceUser> selectSurProjectAttendanceUserList(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceUser> querySurProjectAttendanceUserList(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
/**
|
||||||
|
* 新增考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param id 考勤人员基本属性主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceUserById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceUserByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceUserByParams(List<String> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUserList 考勤人员基本属性列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSurProjectAttendanceUser(List<QuartzProjectAttendanceUser> quartzProjectAttendanceUserList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下面三个方法完成考勤记录分页查询
|
||||||
|
* countAttendance 获取总记录条数
|
||||||
|
* queryAttendanceUsers 获取当前页workerIds
|
||||||
|
* queryAttendanceByUserIds 根据workerIds查询一页数据然后组装
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceUser> queryAttendanceByUserIds(QuartzProjectAttendanceUser where);
|
||||||
|
public long countAttendance(QuartzProjectAttendanceCfg where);
|
||||||
|
public List<QuartzProjectAttendanceUser> queryAttendanceUsers(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
public long countTodayAttendance(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceUser> todayAttendance(QuartzProjectAttendanceUser where);
|
||||||
|
public List<QuartzProjectAttendanceUser> todayAttendanceData(List<String> list);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceUser> todayAttendanceOtherData(Map<String,Object> data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<QuartzProjectAttendanceUser> queryWorkerOnDuty(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> groupUserByParams(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceUser> attendanceUserList(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> findUserAllByDays(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按部门汇总在岗人数
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<QuartzProjectAttendanceData> groupByWorkerOnDutyByDept(QuartzProjectAttendanceUser where);
|
||||||
|
/**
|
||||||
|
* 按部门汇总在岗|离岗人数
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<QuartzProjectAttendanceData> groupByWorkerByDept(QuartzProjectAttendanceUser where);
|
||||||
|
/**
|
||||||
|
* 在岗|离岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<QuartzProjectAttendanceUser> queryWorkerByState(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
package com.yanzhu.job.service;
|
|
||||||
|
|
||||||
import com.yanzhu.job.domain.QuartzProAttendanceCfg;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目考勤配置Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-09-24
|
|
||||||
*/
|
|
||||||
public interface IQuartzProAttendanceCfgService
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询项目考勤配置列表
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceCfg 项目考勤配置
|
|
||||||
* @return 项目考勤配置集合
|
|
||||||
*/
|
|
||||||
public List<QuartzProAttendanceCfg> selectProAttendanceCfgList(QuartzProAttendanceCfg quartzProAttendanceCfg);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
package com.yanzhu.job.service;
|
|
||||||
|
|
||||||
import com.yanzhu.job.domain.QuartzProAttendanceData;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 劳务实名制管理Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-09-24
|
|
||||||
*/
|
|
||||||
public interface IQuartzProAttendanceDataService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询考勤管理
|
|
||||||
*
|
|
||||||
* @param id 考勤管理主键
|
|
||||||
* @return 考勤管理
|
|
||||||
*/
|
|
||||||
public QuartzProAttendanceData selectProAttendanceDataById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询考勤管理列表
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 考勤管理集合
|
|
||||||
*/
|
|
||||||
public List<QuartzProAttendanceData> selectProAttendanceDataList(QuartzProAttendanceData quartzProAttendanceData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增考勤管理
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertProAttendanceData(QuartzProAttendanceData quartzProAttendanceData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改考勤管理
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateProAttendanceData(QuartzProAttendanceData quartzProAttendanceData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除考勤管理
|
|
||||||
*
|
|
||||||
* @param id 考勤管理主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteProAttendanceDataById(Long id);
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.yanzhu.job.service;
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceCfg;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目考勤配置Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public interface IQuartzProjectAttendanceCfgService
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目考勤配置列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||||
|
* @return 项目考勤配置集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceCfg> selectSurProjectAttendanceCfgList(QuartzProjectAttendanceCfg quartzProjectAttendanceCfg);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,141 @@
|
||||||
|
package com.yanzhu.job.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 劳务实名制管理Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public interface IQuartzProjectAttendanceDataService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param id 劳务实名制管理主键
|
||||||
|
* @return 劳务实名制管理
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceData selectSurProjectAttendanceDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询劳务实名制管理列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 劳务实名制管理集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceData> selectSurProjectAttendanceDataList(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 劳务实名制管理集合
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceData findCurrentAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceData> selectSurProjectAttendanceDataListEx(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的劳务实名制管理主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceDataByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除劳务实名制管理信息
|
||||||
|
*
|
||||||
|
* @param id 劳务实名制管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceDataByParams(List<String> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增劳务实名制考勤管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceDataList 劳务实名制管理考勤列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSurProjectAttendanceData(List<QuartzProjectAttendanceData> quartzProjectAttendanceDataList);
|
||||||
|
|
||||||
|
public void add(QuartzProjectAttendanceData sdata);
|
||||||
|
|
||||||
|
public String getLastServerId(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceData> groupByComany(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
public Long getHuazhuPage( QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceData> groupAllByComany(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
|
||||||
|
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data);
|
||||||
|
|
||||||
|
List<QuartzProjectAttendanceData> todayAttendance(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计所有数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> groupAllByParams(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> findGroupAllByDays(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤数据列表
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceData> attendanceDataList(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计考勤数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> groupDataByParams(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
List<QuartzProjectAttendanceData> groupTodayCompanyTypeId(QuartzProjectAttendanceData where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指增加
|
||||||
|
* @param addList
|
||||||
|
*/
|
||||||
|
void addList(List<QuartzProjectAttendanceData> addList);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
package com.yanzhu.job.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceGroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广联达班组信息Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
public interface IQuartzProjectAttendanceGroupService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息
|
||||||
|
*
|
||||||
|
* @param id 广联达班组信息主键
|
||||||
|
* @return 广联达班组信息
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceGroup selectSurProjectAttendanceGroupById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 广联达班组信息集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceGroup> selectSurProjectAttendanceGroupViewList(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 广联达班组信息集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceGroup> selectSurProjectAttendanceGroupList(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectAttendanceGroup(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectAttendanceGroup(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除广联达班组信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的广联达班组信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceGroupByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除广联达班组信息信息
|
||||||
|
*
|
||||||
|
* @param id 广联达班组信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceGroupById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除广联达班组信息
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceGroupByParams(List<String> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroupList 广联达班组信息列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSurProjectAttendanceGroup(List<QuartzProjectAttendanceGroup> quartzProjectAttendanceGroupList);
|
||||||
|
|
||||||
|
public void add(QuartzProjectAttendanceGroup group);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新济工网的分组类型
|
||||||
|
* @param group
|
||||||
|
*/
|
||||||
|
public void updateJgw(QuartzProjectAttendanceGroup group);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,163 @@
|
||||||
|
package com.yanzhu.job.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceData;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceUser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤人员基本属性Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
public interface IQuartzProjectAttendanceUserService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param id 考勤人员基本属性主键
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceUser selectSurProjectAttendanceUserById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤人员信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceUser findCurrentAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询[研筑]考勤人员信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceUser findYzCurrentAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤人员基本属性列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 考勤人员基本属性集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceUser> selectSurProjectAttendanceUserList(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSurProjectAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSurProjectAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的考勤人员基本属性主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceUserByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤人员基本属性信息
|
||||||
|
*
|
||||||
|
* @param id 考勤人员基本属性主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceUserById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSurProjectAttendanceUserByParams(List<String> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUserList 考勤人员基本属性列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchSurProjectAttendanceUser(List<QuartzProjectAttendanceUser> quartzProjectAttendanceUserList);
|
||||||
|
|
||||||
|
public void add(QuartzProjectAttendanceUser user);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceUser> queryAttendanceData(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
public long countTodayAttendance(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
public List<QuartzProjectAttendanceUser> todayAttendance(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
public long countAttendance(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 济工网人员查询
|
||||||
|
* @param quartzProjectAttendanceUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceUser> queryWorkerOnDuty(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> groupUserByParams(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceUser> attendanceUserList(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> findUserAllByDays(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按部门汇总在岗人数
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<QuartzProjectAttendanceData> groupByWorkerOnDutyByDept(QuartzProjectAttendanceUser where);
|
||||||
|
|
||||||
|
List<QuartzProjectAttendanceUser> querySurProjectAttendanceUserList(QuartzProjectAttendanceUser quartzProjectAttendanceUser);
|
||||||
|
/**
|
||||||
|
* 按部门汇总在岗|离岗人数
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<QuartzProjectAttendanceData> groupByWorkerByDept(QuartzProjectAttendanceUser where);
|
||||||
|
/**
|
||||||
|
* 在岗|离岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<QuartzProjectAttendanceUser> queryWorkerByState(QuartzProjectAttendanceUser where);
|
||||||
|
}
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
package com.yanzhu.job.service.impl;
|
|
||||||
|
|
||||||
import com.yanzhu.job.domain.QuartzProAttendanceCfg;
|
|
||||||
import com.yanzhu.job.mapper.QuartzProAttendanceCfgMapper;
|
|
||||||
import com.yanzhu.job.service.IQuartzProAttendanceCfgService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目考勤配置Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-09-24
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class QuartzProAttendanceCfgServiceImpl implements IQuartzProAttendanceCfgService
|
|
||||||
{
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private QuartzProAttendanceCfgMapper quartzProjectAttendanceCfgMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询项目考勤配置列表
|
|
||||||
* R
|
|
||||||
* @param quartzProAttendanceCfg 项目考勤配置
|
|
||||||
* @return 项目考勤配置
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<QuartzProAttendanceCfg> selectProAttendanceCfgList(QuartzProAttendanceCfg quartzProAttendanceCfg)
|
|
||||||
{
|
|
||||||
return quartzProjectAttendanceCfgMapper.selectProAttendanceCfgList(quartzProAttendanceCfg);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
package com.yanzhu.job.service.impl;
|
|
||||||
|
|
||||||
import com.yanzhu.job.domain.QuartzProAttendanceData;
|
|
||||||
import com.yanzhu.job.mapper.QuartzProAttendanceDataMapper;
|
|
||||||
import com.yanzhu.job.service.IQuartzProAttendanceDataService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 劳务实名制管理Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-09-24
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class QuartzProAttendanceDataServiceImpl implements IQuartzProAttendanceDataService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private QuartzProAttendanceDataMapper quartzProAttendanceDataMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询考勤管理
|
|
||||||
*
|
|
||||||
* @param id 考勤管理主键
|
|
||||||
* @return 考勤管理
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public QuartzProAttendanceData selectProAttendanceDataById(Long id){
|
|
||||||
return quartzProAttendanceDataMapper.selectProAttendanceDataById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询考勤管理列表
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 考勤管理集合
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<QuartzProAttendanceData> selectProAttendanceDataList(QuartzProAttendanceData quartzProAttendanceData){
|
|
||||||
return quartzProAttendanceDataMapper.selectProAttendanceDataList(quartzProAttendanceData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增考勤管理
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertProAttendanceData(QuartzProAttendanceData quartzProAttendanceData){
|
|
||||||
return quartzProAttendanceDataMapper.insertProAttendanceData(quartzProAttendanceData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改考勤管理
|
|
||||||
*
|
|
||||||
* @param quartzProAttendanceData 考勤管理
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateProAttendanceData(QuartzProAttendanceData quartzProAttendanceData){
|
|
||||||
return quartzProAttendanceDataMapper.updateProAttendanceData(quartzProAttendanceData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除考勤管理
|
|
||||||
*
|
|
||||||
* @param id 考勤管理主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteProAttendanceDataById(Long id){
|
|
||||||
return quartzProAttendanceDataMapper.deleteProAttendanceDataById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -4,6 +4,9 @@ import com.yanzhu.common.core.utils.DateUtils;
|
||||||
import com.yanzhu.job.domain.QuartzProSubdeptsGroup;
|
import com.yanzhu.job.domain.QuartzProSubdeptsGroup;
|
||||||
import com.yanzhu.job.mapper.QuartzProSubdeptsGroupMapper;
|
import com.yanzhu.job.mapper.QuartzProSubdeptsGroupMapper;
|
||||||
import com.yanzhu.job.service.IQuartzProSubdeptsGroupService;
|
import com.yanzhu.job.service.IQuartzProSubdeptsGroupService;
|
||||||
|
import com.yanzhu.system.api.RemoteUserService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -20,9 +23,14 @@ import java.util.List;
|
||||||
public class QuartzProSubdeptsGroupServiceImpl implements IQuartzProSubdeptsGroupService
|
public class QuartzProSubdeptsGroupServiceImpl implements IQuartzProSubdeptsGroupService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RemoteUserService remoteUserService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QuartzProSubdeptsGroupMapper quartzProSubdeptsGroupMapper;
|
private QuartzProSubdeptsGroupMapper quartzProSubdeptsGroupMapper;
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(QuartzProSubdeptsGroupServiceImpl.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分包单位班组
|
* 查询分包单位班组
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.yanzhu.common.core.utils.DateUtils;
|
||||||
import com.yanzhu.job.domain.QuartzProSubdepts;
|
import com.yanzhu.job.domain.QuartzProSubdepts;
|
||||||
import com.yanzhu.job.mapper.QuartzProSubdeptsMapper;
|
import com.yanzhu.job.mapper.QuartzProSubdeptsMapper;
|
||||||
import com.yanzhu.job.service.IQuartzProSubdeptsService;
|
import com.yanzhu.job.service.IQuartzProSubdeptsService;
|
||||||
|
import com.yanzhu.system.api.RemoteUserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -20,6 +21,9 @@ import java.util.List;
|
||||||
public class QuartzProSubdeptsServiceImpl implements IQuartzProSubdeptsService
|
public class QuartzProSubdeptsServiceImpl implements IQuartzProSubdeptsService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RemoteUserService remoteUserService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QuartzProSubdeptsMapper quartzProSubdeptsMapper;
|
private QuartzProSubdeptsMapper quartzProSubdeptsMapper;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,23 @@
|
||||||
package com.yanzhu.job.service.impl;
|
package com.yanzhu.job.service.impl;
|
||||||
|
|
||||||
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
|
import com.yanzhu.common.core.enums.ApproveStatus;
|
||||||
|
import com.yanzhu.common.core.enums.UseStateEnums;
|
||||||
|
import com.yanzhu.common.core.enums.UserTypeEnums;
|
||||||
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
import com.yanzhu.job.domain.QuartzProSubdeptsUsers;
|
import com.yanzhu.job.domain.QuartzProSubdeptsUsers;
|
||||||
import com.yanzhu.job.mapper.QuartzProSubdeptsUsersMapper;
|
import com.yanzhu.job.mapper.QuartzProSubdeptsUsersMapper;
|
||||||
import com.yanzhu.job.service.IQuartzProSubdeptsUsersService;
|
import com.yanzhu.job.service.IQuartzProSubdeptsUsersService;
|
||||||
|
import com.yanzhu.system.api.RemoteUserService;
|
||||||
|
import com.yanzhu.system.api.domain.SysUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分包单位工人Service业务层处理
|
* 分包单位工人Service业务层处理
|
||||||
|
|
@ -17,6 +28,9 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class QuartzProSubdeptsUsersServiceImpl implements IQuartzProSubdeptsUsersService {
|
public class QuartzProSubdeptsUsersServiceImpl implements IQuartzProSubdeptsUsersService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RemoteUserService remoteUserService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QuartzProSubdeptsUsersMapper quartzProSubdeptsUsersMapper;
|
private QuartzProSubdeptsUsersMapper quartzProSubdeptsUsersMapper;
|
||||||
|
|
||||||
|
|
@ -51,7 +65,122 @@ public class QuartzProSubdeptsUsersServiceImpl implements IQuartzProSubdeptsUser
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertQuartzProSubdeptsUsers(QuartzProSubdeptsUsers quartzProSubdeptsUsers) {
|
public int insertQuartzProSubdeptsUsers(QuartzProSubdeptsUsers quartzProSubdeptsUsers) {
|
||||||
return quartzProSubdeptsUsersMapper.insertQuartzProSubdeptsUsers(quartzProSubdeptsUsers);
|
// if (StringUtils.isEmpty(quartzProSubdeptsUsers.getCardType())) {
|
||||||
|
// quartzProSubdeptsUsers.setCardType("1");
|
||||||
|
// }
|
||||||
|
// if (StringUtils.isEmpty(quartzProSubdeptsUsers.getUserSex())) {
|
||||||
|
// quartzProSubdeptsUsers.setUserSex(StringUtils.judgeGender(quartzProSubdeptsUsers.getCardCode()));
|
||||||
|
// }
|
||||||
|
// quartzProSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUseDate(DateUtils.getNowDate());
|
||||||
|
// quartzProSubdeptsUsers.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
// quartzProSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
|
||||||
|
// quartzProSubdeptsUsers.setSubStep(2L);
|
||||||
|
// quartzProSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode());
|
||||||
|
//
|
||||||
|
// // 参建单位信息
|
||||||
|
// ProProjectInfoSubdepts subDepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(quartzProSubdeptsUsers.getSubDeptId());
|
||||||
|
// if (quartzProSubdeptsUsers.getComId() == null) {
|
||||||
|
// quartzProSubdeptsUsers.setComId(subDepts.getComId());
|
||||||
|
// }
|
||||||
|
// quartzProSubdeptsUsers.setSubDeptType(subDepts.getSubDeptType());
|
||||||
|
//
|
||||||
|
// SysUser sysUser = new SysUser();
|
||||||
|
// sysUser.setComId(subDepts.getComId());
|
||||||
|
// sysUser.setDeptId(subDepts.getProjectId());
|
||||||
|
// sysUser.setUserName(quartzProSubdeptsUsers.getUserPhone());
|
||||||
|
// sysUser.setNickName(quartzProSubdeptsUsers.getUserName());
|
||||||
|
// sysUser.setPhonenumber(quartzProSubdeptsUsers.getUserPhone());
|
||||||
|
// sysUser.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
// sysUser.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
// sysUser.setUserInfos(quartzProSubdeptsUsers.getUserInfos());
|
||||||
|
//
|
||||||
|
// String subDeptType = quartzProSubdeptsUsers.getSubDeptType();
|
||||||
|
// // 判断单位类型
|
||||||
|
// if (Objects.nonNull(subDeptType)) {
|
||||||
|
// if (Objects.equals(SubDeptsEnums.JSDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.JSDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.JSDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.JLDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.JLDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.JLDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.SGDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.SGDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.SGDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.ZYFB.getCode(), subDeptType) || Objects.equals(SubDeptsEnums.LWFB.getCode(), subDeptType)) {
|
||||||
|
// //判断工种岗位设置用户岗位...PC需要单独设置
|
||||||
|
// if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.WTDL.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setCraftType(CraftTypeEnums.GLRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.WTDL.getCode());
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.XMJL.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setCraftType(CraftTypeEnums.GLRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.XMJL.getCode());
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.AQZY.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBAQRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setCraftType(CraftTypeEnums.GLRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.AQRY.getCode());
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.CLZY.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setCraftType(CraftTypeEnums.GLRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.CLRY.getCode());
|
||||||
|
// } else {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.LWGR.getCode());
|
||||||
|
// }
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.CLFB.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.CLFBRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.CLFBGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.HQFB.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.HQFBRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.HQFBGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.TSSB.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.TSSBRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.TSSBGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.KTDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.KTDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.KTDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.SJDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.SJDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.SJDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.QTDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.OTHERS.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.QTDWGL.getCode());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// sysUser.setActiveProjectId(quartzProSubdeptsUsers.getProjectId());
|
||||||
|
// Long userId = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER).getData();
|
||||||
|
// quartzProSubdeptsUsers.setUserId(userId);
|
||||||
|
// int res = quartzProSubdeptsUsersMapper.insertQuartzProSubdeptsUsers(quartzProSubdeptsUsers);
|
||||||
|
// String userPost = quartzProSubdeptsUsers.getUserPost();
|
||||||
|
// if (res > 0 && (Objects.equals(UserPostEnums.WTDL.getCode(), userPost) || Objects.equals(UserPostEnums.XMJL.getCode(), userPost) || Objects.equals(UserPostEnums.BZZ.getCode(), userPost))) {
|
||||||
|
// // 生成二维码
|
||||||
|
// try {
|
||||||
|
// String accessToken = wxMaService.getAccessToken();
|
||||||
|
// String filePath = DateUtils.datePath() + "/" + System.currentTimeMillis() + ".png";
|
||||||
|
// String savePath = ProfileConfig.profilePath + "/" + filePath;
|
||||||
|
// String profilePath = ProfileConfig.profile + "/" + filePath;
|
||||||
|
// log.info("accessToken...{}", accessToken);
|
||||||
|
// // 生成二维码
|
||||||
|
// if (Objects.equals(quartzProSubdeptsUsers.getUserPost(), UserPostEnums.WTDL.getCode())) {
|
||||||
|
// File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=2&QRPID=" + quartzProSubdeptsUsers.getProjectId() + "&PARID=" + quartzProSubdeptsUsers.getId(), 280);
|
||||||
|
// FileUtil.copyFile(file, new File(savePath));
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getUserPost(), UserPostEnums.XMJL.getCode())) {
|
||||||
|
// File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=3&QRPID=" + quartzProSubdeptsUsers.getProjectId() + "&PARID=" + quartzProSubdeptsUsers.getId(), 280);
|
||||||
|
// FileUtil.copyFile(file, new File(savePath));
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())) {
|
||||||
|
// File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID=" + quartzProSubdeptsUsers.getProjectId() + "&PARID=" + quartzProSubdeptsUsers.getId(), 280);
|
||||||
|
// FileUtil.copyFile(file, new File(savePath));
|
||||||
|
// }
|
||||||
|
// quartzProSubdeptsUsers.setQrCode(profilePath);
|
||||||
|
// quartzProSubdeptsUsersMapper.updateQuartzProSubdeptsUsers(quartzProSubdeptsUsers);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.error(e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -62,6 +191,120 @@ public class QuartzProSubdeptsUsersServiceImpl implements IQuartzProSubdeptsUser
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateQuartzProSubdeptsUsers(QuartzProSubdeptsUsers quartzProSubdeptsUsers) {
|
public int updateQuartzProSubdeptsUsers(QuartzProSubdeptsUsers quartzProSubdeptsUsers) {
|
||||||
|
// 参建单位信息
|
||||||
|
// ProProjectInfoSubdepts subDepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(quartzProSubdeptsUsers.getSubDeptId());
|
||||||
|
// quartzProSubdeptsUsers.setSubDeptType(subDepts.getSubDeptType());
|
||||||
|
//
|
||||||
|
// SysUser sysUser = new SysUser();
|
||||||
|
// sysUser.setComId(subDepts.getComId());
|
||||||
|
// sysUser.setDeptId(subDepts.getProjectId());
|
||||||
|
// sysUser.setUserName(quartzProSubdeptsUsers.getUserPhone());
|
||||||
|
// sysUser.setNickName(quartzProSubdeptsUsers.getUserName());
|
||||||
|
// sysUser.setPhonenumber(quartzProSubdeptsUsers.getUserPhone());
|
||||||
|
// sysUser.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
// sysUser.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
// sysUser.setUserInfos(quartzProSubdeptsUsers.getUserInfos());
|
||||||
|
//
|
||||||
|
// String subDeptType = quartzProSubdeptsUsers.getSubDeptType();
|
||||||
|
// // 判断单位类型
|
||||||
|
// if (Objects.nonNull(subDeptType)) {
|
||||||
|
// if (Objects.equals(SubDeptsEnums.JSDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.JSDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.JSDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.JLDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.JLDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.JLDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.SGDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.SGDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.SGDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.ZYFB.getCode(), subDeptType) || Objects.equals(SubDeptsEnums.LWFB.getCode(), subDeptType)) {
|
||||||
|
// //判断工种岗位设置用户岗位...PC需要单独设置
|
||||||
|
// if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.WTDL.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.WTDL.getCode());
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.XMJL.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.XMJL.getCode());
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.AQZY.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBAQRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.AQRY.getCode());
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getCraftPost(), CraftPostEnums.CLZY.getCode())) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.CLRY.getCode());
|
||||||
|
// } else {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.LWGR.getCode());
|
||||||
|
// }
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.CLFB.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.CLFBRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.CLFBGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.HQFB.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.HQFBRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.HQFBGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.TSSB.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.TSSBRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.TSSBGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.KTDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.KTDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.KTDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.SJDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.SJDWRY.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.SJDWGL.getCode());
|
||||||
|
// } else if (Objects.equals(SubDeptsEnums.QTDW.getCode(), subDeptType)) {
|
||||||
|
// sysUser.setUserType(UserTypeEnums.OTHERS.getCode());
|
||||||
|
// quartzProSubdeptsUsers.setUserPost(UserPostEnums.QTDWGL.getCode());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// sysUser.setActiveProjectId(quartzProSubdeptsUsers.getProjectId());
|
||||||
|
// remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER).getData();
|
||||||
|
//
|
||||||
|
// QuartzProSubdeptsUsers old = quartzProSubdeptsUsersMapper.selectQuartzProSubdeptsUsersById(quartzProSubdeptsUsers.getId());
|
||||||
|
// quartzProSubdeptsUsers.setUserId(old.getUserId());
|
||||||
|
// quartzProSubdeptsUsers.setQrCode(old.getQrCode());
|
||||||
|
// quartzProSubdeptsUsers.setAdmitGuid(old.getAdmitGuid());
|
||||||
|
// quartzProSubdeptsUsers.setFaceGuid(old.getFaceGuid());
|
||||||
|
// quartzProSubdeptsUsers.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
// quartzProSubdeptsUsers.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 考勤需要信息改变时推送信息...
|
||||||
|
// */
|
||||||
|
// if (!Objects.equals(quartzProSubdeptsUsers.getUserName(), old.getUserName()) || !Objects.equals(quartzProSubdeptsUsers.getCardCode(), old.getCardCode()) ||
|
||||||
|
// !Objects.equals(quartzProSubdeptsUsers.getUserPhone(), old.getUserPhone()) || !Objects.equals(quartzProSubdeptsUsers.getUserPicture(), old.getUserPicture())) {
|
||||||
|
// uniService.syncUniUser(quartzProSubdeptsUsers, false);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (!Objects.equals(old.getUserPost(), quartzProSubdeptsUsers.getUserPost())) {
|
||||||
|
// String userPost = quartzProSubdeptsUsers.getUserPost();
|
||||||
|
// if (Objects.equals(UserPostEnums.WTDL.getCode(), userPost) || Objects.equals(UserPostEnums.XMJL.getCode(), userPost) || Objects.equals(UserPostEnums.BZZ.getCode(), userPost)) {
|
||||||
|
// if (!Objects.equals(quartzProSubdeptsUsers.getUserPost(), old.getUserPost()) || StringUtils.isEmpty(quartzProSubdeptsUsers.getQrCode())) {
|
||||||
|
// // 生成二维码
|
||||||
|
// try {
|
||||||
|
// String accessToken = wxMaService.getAccessToken();
|
||||||
|
// String filePath = DateUtils.datePath() + "/" + System.currentTimeMillis() + ".png";
|
||||||
|
// String savePath = ProfileConfig.profilePath + "/" + filePath;
|
||||||
|
// String profilePath = ProfileConfig.profile + "/" + filePath;
|
||||||
|
// log.info("accessToken...{}", accessToken);
|
||||||
|
// // 生成二维码
|
||||||
|
// if (Objects.equals(quartzProSubdeptsUsers.getUserPost(), UserPostEnums.WTDL.getCode())) {
|
||||||
|
// File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=2&QRPID=" + quartzProSubdeptsUsers.getProjectId() + "&PARID=" + quartzProSubdeptsUsers.getId(), 280);
|
||||||
|
// FileUtil.copyFile(file, new File(savePath));
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getUserPost(), UserPostEnums.XMJL.getCode())) {
|
||||||
|
// File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=3&QRPID=" + quartzProSubdeptsUsers.getProjectId() + "&PARID=" + quartzProSubdeptsUsers.getId(), 280);
|
||||||
|
// FileUtil.copyFile(file, new File(savePath));
|
||||||
|
// } else if (Objects.equals(quartzProSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())) {
|
||||||
|
// File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID=" + quartzProSubdeptsUsers.getProjectId() + "&PARID=" + quartzProSubdeptsUsers.getId(), 280);
|
||||||
|
// FileUtil.copyFile(file, new File(savePath));
|
||||||
|
// }
|
||||||
|
// quartzProSubdeptsUsers.setQrCode(profilePath);
|
||||||
|
// return quartzProSubdeptsUsersMapper.updateQuartzProSubdeptsUsers(quartzProSubdeptsUsers);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.error(e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
return quartzProSubdeptsUsersMapper.updateQuartzProSubdeptsUsers(quartzProSubdeptsUsers);
|
return quartzProSubdeptsUsersMapper.updateQuartzProSubdeptsUsers(quartzProSubdeptsUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.yanzhu.job.service.impl;
|
||||||
|
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceCfg;
|
||||||
|
import com.yanzhu.job.mapper.QuartzProjectAttendanceCfgMapper;
|
||||||
|
import com.yanzhu.job.service.IQuartzProjectAttendanceCfgService;
|
||||||
|
import com.yanzhu.job.service.ISysApplyConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目考勤配置Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QuartzProjectAttendanceCfgServiceImpl implements IQuartzProjectAttendanceCfgService
|
||||||
|
{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysApplyConfigService sysApplyConfigService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuartzProjectAttendanceCfgMapper quartzProjectAttendanceCfgMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目考勤配置列表
|
||||||
|
* R
|
||||||
|
* @param quartzProjectAttendanceCfg 项目考勤配置
|
||||||
|
* @return 项目考勤配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceCfg> selectSurProjectAttendanceCfgList(QuartzProjectAttendanceCfg quartzProjectAttendanceCfg)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceCfgMapper.selectSurProjectAttendanceCfgList(quartzProjectAttendanceCfg);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,489 @@
|
||||||
|
package com.yanzhu.job.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceCfg;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceData;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceGroup;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceUser;
|
||||||
|
import com.yanzhu.job.mapper.QuartzProjectAttendanceCfgMapper;
|
||||||
|
import com.yanzhu.job.mapper.QuartzProjectAttendanceDataMapper;
|
||||||
|
import com.yanzhu.job.mapper.QuartzProjectAttendanceGroupMapper;
|
||||||
|
import com.yanzhu.job.mapper.QuartzProjectAttendanceUserMapper;
|
||||||
|
import com.yanzhu.job.service.IQuartzProjectAttendanceDataService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 劳务实名制管理Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QuartzProjectAttendanceDataServiceImpl implements IQuartzProjectAttendanceDataService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private QuartzProjectAttendanceDataMapper quartzProjectAttendanceDataMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuartzProjectAttendanceUserMapper quartzProjectAttendanceUserMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuartzProjectAttendanceGroupMapper quartzProjectAttendanceGroupMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuartzProjectAttendanceCfgMapper quartzProjectAttendanceCfgMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param id 劳务实名制管理主键
|
||||||
|
* @return 劳务实名制管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QuartzProjectAttendanceData selectSurProjectAttendanceDataById(Long id)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceDataMapper.selectSurProjectAttendanceDataById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询劳务实名制管理列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 劳务实名制管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> selectSurProjectAttendanceDataList(QuartzProjectAttendanceData quartzProjectAttendanceData)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceDataMapper.selectSurProjectAttendanceDataList(quartzProjectAttendanceData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 劳务实名制管理集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QuartzProjectAttendanceData findCurrentAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData){
|
||||||
|
return quartzProjectAttendanceDataMapper.findCurrentAttendanceData(quartzProjectAttendanceData);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> selectSurProjectAttendanceDataListEx(QuartzProjectAttendanceData quartzProjectAttendanceData)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceDataMapper.selectSurProjectAttendanceDataListEx(quartzProjectAttendanceData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSurProjectAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData)
|
||||||
|
{
|
||||||
|
String userName= SecurityUtils.getUsername();
|
||||||
|
quartzProjectAttendanceData.setCreateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||||
|
quartzProjectAttendanceData.setCreateTime(DateUtils.getNowDate());
|
||||||
|
|
||||||
|
return quartzProjectAttendanceDataMapper.insertSurProjectAttendanceData(quartzProjectAttendanceData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceData 劳务实名制管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSurProjectAttendanceData(QuartzProjectAttendanceData quartzProjectAttendanceData)
|
||||||
|
{
|
||||||
|
String userName=SecurityUtils.getUsername();
|
||||||
|
quartzProjectAttendanceData.setUpdateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||||
|
|
||||||
|
quartzProjectAttendanceData.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return quartzProjectAttendanceDataMapper.updateSurProjectAttendanceData(quartzProjectAttendanceData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的劳务实名制管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceDataByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceDataMapper.deleteSurProjectAttendanceDataByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除劳务实名制管理信息
|
||||||
|
*
|
||||||
|
* @param id 劳务实名制管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceDataById(Long id)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceDataMapper.deleteSurProjectAttendanceDataById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除劳务实名制管理
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceDataByParams(List<String> list) {
|
||||||
|
return quartzProjectAttendanceDataMapper.deleteSurProjectAttendanceDataByParams(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增劳务实名制考勤管理
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceDataList 劳务实名制考勤管理列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int batchSurProjectAttendanceData(List<QuartzProjectAttendanceData> quartzProjectAttendanceDataList) {
|
||||||
|
return quartzProjectAttendanceDataMapper.batchSurProjectAttendanceData(quartzProjectAttendanceDataList,DateUtils.dateTimeNow(DateUtils.YYYY));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void add(QuartzProjectAttendanceData sdata) {
|
||||||
|
if(StringUtils.isEmpty(sdata.getWorkerId()) || StringUtils.isEmpty(sdata.getAttendanceTime())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QuartzProjectAttendanceData where=new QuartzProjectAttendanceData();
|
||||||
|
where.setVendorsCode(sdata.getVendorsCode());
|
||||||
|
where.setCfgid(sdata.getCfgid());
|
||||||
|
where.setWorkerId(sdata.getWorkerId());
|
||||||
|
where.setAttendanceTime(sdata.getAttendanceTime());
|
||||||
|
List<QuartzProjectAttendanceData> list=selectSurProjectAttendanceDataListEx(where);
|
||||||
|
if(list.size()==0){
|
||||||
|
//设置考勤其它参数
|
||||||
|
//查询人员信息
|
||||||
|
QuartzProjectAttendanceUser userWhere=new QuartzProjectAttendanceUser();
|
||||||
|
userWhere.setWorkerId(sdata.getWorkerId());
|
||||||
|
List<QuartzProjectAttendanceUser> uList= quartzProjectAttendanceUserMapper.selectSurProjectAttendanceUserList(userWhere);
|
||||||
|
if(uList.size()==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QuartzProjectAttendanceUser 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());
|
||||||
|
}
|
||||||
|
//查询分组信息
|
||||||
|
QuartzProjectAttendanceGroup groupWhere=new QuartzProjectAttendanceGroup();
|
||||||
|
groupWhere.setCfgid(sdata.getCfgid());
|
||||||
|
groupWhere.setCompanyId(sdata.getCompanyId());
|
||||||
|
List<QuartzProjectAttendanceGroup> gList= quartzProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupList(groupWhere);
|
||||||
|
if(gList.size()==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QuartzProjectAttendanceGroup 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());
|
||||||
|
}
|
||||||
|
//查询项目部门信息
|
||||||
|
QuartzProjectAttendanceCfg cfg = quartzProjectAttendanceCfgMapper.selectSurProjectAttendanceCfgByCfgId(sdata.getCfgid());
|
||||||
|
sdata.setProjectId(cfg.getProjectId());
|
||||||
|
sdata.setDeptId(cfg.getDeptId());
|
||||||
|
sdata.setProjectName(cfg.getProjectName());
|
||||||
|
sdata.setDeptName(cfg.getDeptName());
|
||||||
|
if(sdata.getCompanyTypeId()==null){
|
||||||
|
sdata.setCompanyTypeId("0");
|
||||||
|
}
|
||||||
|
insertSurProjectAttendanceData(sdata);
|
||||||
|
}else{
|
||||||
|
sdata.setId(list.get(0).getId());
|
||||||
|
QuartzProjectAttendanceData 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 quartzProjectAttendanceDataMapper.findHuaZhuCompanyType(groupName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLastServerId(QuartzProjectAttendanceData where) {
|
||||||
|
return ""+ quartzProjectAttendanceDataMapper.getLastServerId(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> groupByComany(QuartzProjectAttendanceData where) {
|
||||||
|
return quartzProjectAttendanceDataMapper.groupByComany(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getHuazhuPage( QuartzProjectAttendanceData attWhere) {
|
||||||
|
return quartzProjectAttendanceDataMapper.getHuazhuPage(attWhere);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> groupAllByComany(QuartzProjectAttendanceData where) {
|
||||||
|
return quartzProjectAttendanceDataMapper.groupAllByComany(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String,Object>> initHuaZhuData(Map<String,Object> data) {
|
||||||
|
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||||
|
List<Map<String,Object>> list = quartzProjectAttendanceDataMapper.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<QuartzProjectAttendanceUser> datas= quartzProjectAttendanceUserMapper.todayAttendanceOtherData(data);
|
||||||
|
for (Map<String,Object> map:list) {
|
||||||
|
for(QuartzProjectAttendanceUser 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<QuartzProjectAttendanceData> todayAttendance(QuartzProjectAttendanceData where) {
|
||||||
|
return quartzProjectAttendanceDataMapper.todayAttendance(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计所有数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> groupAllByParams(QuartzProjectAttendanceData where) {
|
||||||
|
return quartzProjectAttendanceDataMapper.findGroupAllByParams(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> findGroupAllByDays(QuartzProjectAttendanceData where){
|
||||||
|
return quartzProjectAttendanceDataMapper.findGroupAllByDays(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计考勤数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> groupDataByParams(QuartzProjectAttendanceData where){
|
||||||
|
return quartzProjectAttendanceDataMapper.groupDataByParams(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤数据列表
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> attendanceDataList(QuartzProjectAttendanceData where) {
|
||||||
|
return quartzProjectAttendanceDataMapper.attendanceDataList(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> groupTodayCompanyTypeId(QuartzProjectAttendanceData where) {
|
||||||
|
return quartzProjectAttendanceDataMapper.groupTodayCompanyTypeId(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量增加
|
||||||
|
* @param addList
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addList(List<QuartzProjectAttendanceData> addList) {
|
||||||
|
if(addList.size()==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QuartzProjectAttendanceData where=new QuartzProjectAttendanceData();
|
||||||
|
where.setVendorsCode(addList.get(0).getVendorsCode());
|
||||||
|
where.setCfgid(addList.get(0).getCfgid());
|
||||||
|
where.setAttendanceTime(addList.get(0).getAttendanceTime());
|
||||||
|
List<QuartzProjectAttendanceData> oldList=selectSurProjectAttendanceDataListEx(where);
|
||||||
|
for(QuartzProjectAttendanceData sdata:addList){
|
||||||
|
List<QuartzProjectAttendanceData> list=oldList.stream().filter(d->d.getWorkerId().equals(sdata.getWorkerId())).collect(Collectors.toList());
|
||||||
|
if(list.size()==0){
|
||||||
|
//设置考勤其它参数
|
||||||
|
//查询人员信息
|
||||||
|
QuartzProjectAttendanceUser userWhere=new QuartzProjectAttendanceUser();
|
||||||
|
userWhere.setWorkerId(sdata.getWorkerId());
|
||||||
|
List<QuartzProjectAttendanceUser> uList= quartzProjectAttendanceUserMapper.selectSurProjectAttendanceUserList(userWhere);
|
||||||
|
if(uList.size()==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QuartzProjectAttendanceUser 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());
|
||||||
|
}
|
||||||
|
//查询分组信息
|
||||||
|
QuartzProjectAttendanceGroup groupWhere=new QuartzProjectAttendanceGroup();
|
||||||
|
groupWhere.setCfgid(sdata.getCfgid());
|
||||||
|
groupWhere.setCompanyId(sdata.getCompanyId());
|
||||||
|
List<QuartzProjectAttendanceGroup> gList= quartzProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupList(groupWhere);
|
||||||
|
if(gList.size()==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QuartzProjectAttendanceGroup 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());
|
||||||
|
}
|
||||||
|
//查询项目部门信息
|
||||||
|
QuartzProjectAttendanceCfg cfg = quartzProjectAttendanceCfgMapper.selectSurProjectAttendanceCfgByCfgId(sdata.getCfgid());
|
||||||
|
sdata.setProjectId(cfg.getProjectId());
|
||||||
|
sdata.setDeptId(cfg.getDeptId());
|
||||||
|
sdata.setProjectName(cfg.getProjectName());
|
||||||
|
sdata.setDeptName(cfg.getDeptName());
|
||||||
|
if(sdata.getCompanyTypeId()==null){
|
||||||
|
sdata.setCompanyTypeId("0");
|
||||||
|
}
|
||||||
|
insertSurProjectAttendanceData(sdata);
|
||||||
|
}else{
|
||||||
|
sdata.setId(list.get(0).getId());
|
||||||
|
QuartzProjectAttendanceData 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,166 @@
|
||||||
|
package com.yanzhu.job.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceGroup;
|
||||||
|
import com.yanzhu.job.mapper.QuartzProjectAttendanceGroupMapper;
|
||||||
|
import com.yanzhu.job.service.IQuartzProjectAttendanceGroupService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广联达班组信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QuartzProjectAttendanceGroupServiceImpl implements IQuartzProjectAttendanceGroupService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private QuartzProjectAttendanceGroupMapper quartzProjectAttendanceGroupMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息
|
||||||
|
*
|
||||||
|
* @param id 广联达班组信息主键
|
||||||
|
* @return 广联达班组信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QuartzProjectAttendanceGroup selectSurProjectAttendanceGroupById(Long id)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 广联达班组信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceGroup> selectSurProjectAttendanceGroupViewList(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupViewList(quartzProjectAttendanceGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询广联达班组信息列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 广联达班组信息集合
|
||||||
|
*/
|
||||||
|
public List<QuartzProjectAttendanceGroup> selectSurProjectAttendanceGroupList(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup) {
|
||||||
|
return quartzProjectAttendanceGroupMapper.selectSurProjectAttendanceGroupList(quartzProjectAttendanceGroup);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 新增广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSurProjectAttendanceGroup(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup)
|
||||||
|
{
|
||||||
|
String userName= SecurityUtils.getUsername();
|
||||||
|
quartzProjectAttendanceGroup.setCreateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||||
|
quartzProjectAttendanceGroup.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return quartzProjectAttendanceGroupMapper.insertSurProjectAttendanceGroup(quartzProjectAttendanceGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroup 广联达班组信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSurProjectAttendanceGroup(QuartzProjectAttendanceGroup quartzProjectAttendanceGroup)
|
||||||
|
{
|
||||||
|
String userName= SecurityUtils.getUsername();
|
||||||
|
quartzProjectAttendanceGroup.setUpdateBy(StrUtil.isEmpty(userName)?"task":userName);
|
||||||
|
|
||||||
|
quartzProjectAttendanceGroup.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return quartzProjectAttendanceGroupMapper.updateSurProjectAttendanceGroup(quartzProjectAttendanceGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除广联达班组信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的广联达班组信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceGroupByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceGroupMapper.deleteSurProjectAttendanceGroupByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除广联达班组信息信息
|
||||||
|
*
|
||||||
|
* @param id 广联达班组信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceGroupById(Long id)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceGroupMapper.deleteSurProjectAttendanceGroupById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除广联达班组信息
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceGroupByParams(List<String> list) {
|
||||||
|
return quartzProjectAttendanceGroupMapper.deleteSurProjectAttendanceGroupByParams(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增广联达班组信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceGroupList 广联达班组信息列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int batchSurProjectAttendanceGroup(List<QuartzProjectAttendanceGroup> quartzProjectAttendanceGroupList) {
|
||||||
|
return quartzProjectAttendanceGroupMapper.batchSurProjectAttendanceGroup(quartzProjectAttendanceGroupList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void add(QuartzProjectAttendanceGroup group) {
|
||||||
|
QuartzProjectAttendanceGroup where=new QuartzProjectAttendanceGroup();
|
||||||
|
where.setServerid(group.getServerid());
|
||||||
|
where.setCfgid(group.getCfgid());
|
||||||
|
List<QuartzProjectAttendanceGroup> list=selectSurProjectAttendanceGroupList(where);
|
||||||
|
if(list.size()==0){
|
||||||
|
insertSurProjectAttendanceGroup(group);
|
||||||
|
}else{
|
||||||
|
group.setId(list.get(0).getId());
|
||||||
|
updateSurProjectAttendanceGroup(group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新济工网的分组类型
|
||||||
|
* @param group
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void updateJgw(QuartzProjectAttendanceGroup group) {
|
||||||
|
QuartzProjectAttendanceGroup where=new QuartzProjectAttendanceGroup();
|
||||||
|
where.setBizLicense(group.getBizLicense());
|
||||||
|
where.setCompanyName(group.getCompanyName());
|
||||||
|
where.setCfgid(group.getCfgid());
|
||||||
|
List<QuartzProjectAttendanceGroup> list=selectSurProjectAttendanceGroupList(where);
|
||||||
|
for(QuartzProjectAttendanceGroup g:list){
|
||||||
|
g.setCompanyTypeId(group.getCompanyTypeId());
|
||||||
|
updateSurProjectAttendanceGroup(g);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,315 @@
|
||||||
|
package com.yanzhu.job.service.impl;
|
||||||
|
|
||||||
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceCfg;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceData;
|
||||||
|
import com.yanzhu.job.domain.QuartzProjectAttendanceUser;
|
||||||
|
import com.yanzhu.job.mapper.QuartzProjectAttendanceUserMapper;
|
||||||
|
import com.yanzhu.job.service.IQuartzProjectAttendanceUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤人员基本属性Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-09-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QuartzProjectAttendanceUserServiceImpl implements IQuartzProjectAttendanceUserService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private QuartzProjectAttendanceUserMapper quartzProjectAttendanceUserMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param id 考勤人员基本属性主键
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QuartzProjectAttendanceUser selectSurProjectAttendanceUserById(Long id)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceUserMapper.selectSurProjectAttendanceUserById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤人员信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QuartzProjectAttendanceUser findCurrentAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser) {
|
||||||
|
return quartzProjectAttendanceUserMapper.findCurrentAttendanceUser(quartzProjectAttendanceUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询[研筑]考勤人员信息
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
public QuartzProjectAttendanceUser findYzCurrentAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser){
|
||||||
|
return quartzProjectAttendanceUserMapper.findYzCurrentAttendanceUser(quartzProjectAttendanceUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤人员基本属性列表
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 考勤人员基本属性
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceUser> selectSurProjectAttendanceUserList(QuartzProjectAttendanceUser quartzProjectAttendanceUser)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceUserMapper.selectSurProjectAttendanceUserList(quartzProjectAttendanceUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSurProjectAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser)
|
||||||
|
{
|
||||||
|
if(StringUtils.isEmpty(quartzProjectAttendanceUser.getCreateBy())){
|
||||||
|
quartzProjectAttendanceUser.setCreateBy("task");
|
||||||
|
quartzProjectAttendanceUser.setCreateTime(DateUtils.getNowDate());
|
||||||
|
}
|
||||||
|
return quartzProjectAttendanceUserMapper.insertSurProjectAttendanceUser(quartzProjectAttendanceUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUser 考勤人员基本属性
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSurProjectAttendanceUser(QuartzProjectAttendanceUser quartzProjectAttendanceUser)
|
||||||
|
{
|
||||||
|
if(StringUtils.isEmpty(quartzProjectAttendanceUser.getCreateBy())){
|
||||||
|
quartzProjectAttendanceUser.setUpdateBy("task");
|
||||||
|
}
|
||||||
|
quartzProjectAttendanceUser.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return quartzProjectAttendanceUserMapper.updateSurProjectAttendanceUser(quartzProjectAttendanceUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的考勤人员基本属性主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceUserByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceUserMapper.deleteSurProjectAttendanceUserByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤人员基本属性信息
|
||||||
|
*
|
||||||
|
* @param id 考勤人员基本属性主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceUserById(Long id)
|
||||||
|
{
|
||||||
|
return quartzProjectAttendanceUserMapper.deleteSurProjectAttendanceUserById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param list 需要删除的数据参数集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSurProjectAttendanceUserByParams(List<String> list) {
|
||||||
|
return quartzProjectAttendanceUserMapper.deleteSurProjectAttendanceUserByParams(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增考勤人员基本属性
|
||||||
|
*
|
||||||
|
* @param quartzProjectAttendanceUserList 考勤人员基本属性列表
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int batchSurProjectAttendanceUser(List<QuartzProjectAttendanceUser> quartzProjectAttendanceUserList) {
|
||||||
|
return quartzProjectAttendanceUserMapper.batchSurProjectAttendanceUser(quartzProjectAttendanceUserList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void add(QuartzProjectAttendanceUser user) {
|
||||||
|
QuartzProjectAttendanceUser where=new QuartzProjectAttendanceUser();
|
||||||
|
where.setWorkerId(user.getWorkerId());
|
||||||
|
where.setCfgid(user.getCfgid());
|
||||||
|
List<QuartzProjectAttendanceUser> list=selectSurProjectAttendanceUserList(where);
|
||||||
|
if(list.size()==0){
|
||||||
|
insertSurProjectAttendanceUser(user);
|
||||||
|
}else{
|
||||||
|
QuartzProjectAttendanceUser 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<QuartzProjectAttendanceUser> queryAttendanceData(QuartzProjectAttendanceUser where) {
|
||||||
|
List<QuartzProjectAttendanceUser> list= quartzProjectAttendanceUserMapper.queryAttendanceUsers(where);
|
||||||
|
List<String> workerIds=new ArrayList<>();
|
||||||
|
for(QuartzProjectAttendanceUser u: list){
|
||||||
|
workerIds.add(u.getWorkerId());
|
||||||
|
}
|
||||||
|
where.setWorkerIds(workerIds);
|
||||||
|
List<QuartzProjectAttendanceUser> datas= quartzProjectAttendanceUserMapper.todayAttendanceData(workerIds);
|
||||||
|
for (QuartzProjectAttendanceUser u:list) {
|
||||||
|
u.setInTime(findDate(datas,u,"E"));
|
||||||
|
u.setOutTime(findDate(datas,u,"L"));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long countTodayAttendance(QuartzProjectAttendanceUser where) {
|
||||||
|
return quartzProjectAttendanceUserMapper.countTodayAttendance(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceUser> todayAttendance(QuartzProjectAttendanceUser where) {
|
||||||
|
if(where.getIndex()<1){
|
||||||
|
where.setIndex(1);
|
||||||
|
}
|
||||||
|
where.setIndex((where.getIndex()-1)* where.getSize());
|
||||||
|
List<QuartzProjectAttendanceUser> list= quartzProjectAttendanceUserMapper.todayAttendance(where);
|
||||||
|
List<String> workerIds=new ArrayList<>();
|
||||||
|
for(QuartzProjectAttendanceUser u: list){
|
||||||
|
workerIds.add(u.getWorkerId());
|
||||||
|
}
|
||||||
|
List<QuartzProjectAttendanceUser> datas= quartzProjectAttendanceUserMapper.todayAttendanceData(workerIds);
|
||||||
|
for (QuartzProjectAttendanceUser u:list) {
|
||||||
|
u.setInTime(findDate(datas,u,"E"));
|
||||||
|
u.setOutTime(findDate(datas,u,"L"));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long countAttendance(QuartzProjectAttendanceUser user) {
|
||||||
|
QuartzProjectAttendanceCfg where=new QuartzProjectAttendanceCfg();
|
||||||
|
where.setCreateBy(user.getCreateBy());
|
||||||
|
where.setDeptId(user.getSubDeptId());
|
||||||
|
where.setProjectId(user.getProjectId());
|
||||||
|
return quartzProjectAttendanceUserMapper.countAttendance(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceUser> selectSurProjectAttendanceUserListJgw(QuartzProjectAttendanceUser quartzProjectAttendanceUser) {
|
||||||
|
return quartzProjectAttendanceUserMapper.selectSurProjectAttendanceUserListJgw(quartzProjectAttendanceUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceUser> queryWorkerOnDuty(QuartzProjectAttendanceUser where) {
|
||||||
|
return quartzProjectAttendanceUserMapper.queryWorkerOnDuty(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> groupUserByParams(QuartzProjectAttendanceUser where){
|
||||||
|
return quartzProjectAttendanceUserMapper.groupUserByParams(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceUser> attendanceUserList(QuartzProjectAttendanceUser where){
|
||||||
|
return quartzProjectAttendanceUserMapper.attendanceUserList(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计人员数据
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> findUserAllByDays(Long projectId){
|
||||||
|
return quartzProjectAttendanceUserMapper.findUserAllByDays(projectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按部门汇总在岗人数
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> groupByWorkerOnDutyByDept(QuartzProjectAttendanceUser where) {
|
||||||
|
return quartzProjectAttendanceUserMapper.groupByWorkerOnDutyByDept(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceUser> querySurProjectAttendanceUserList(QuartzProjectAttendanceUser quartzProjectAttendanceUser) {
|
||||||
|
return quartzProjectAttendanceUserMapper.querySurProjectAttendanceUserList(quartzProjectAttendanceUser);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 按部门汇总在岗|离岗人数
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceData> groupByWorkerByDept(QuartzProjectAttendanceUser where) {
|
||||||
|
return quartzProjectAttendanceUserMapper.groupByWorkerByDept(where);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 在岗|离岗工人查询
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QuartzProjectAttendanceUser> queryWorkerByState(QuartzProjectAttendanceUser where) {
|
||||||
|
return quartzProjectAttendanceUserMapper.queryWorkerByState(where);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Date findDate(List<QuartzProjectAttendanceUser> datas, QuartzProjectAttendanceUser u, String type) {
|
||||||
|
for (QuartzProjectAttendanceUser 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,346 +1,351 @@
|
||||||
//package com.yanzhu.job.task;
|
package com.yanzhu.job.task;
|
||||||
//
|
|
||||||
//import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
//import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
//import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
//import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
//import com.yanzhu.job.domain.QuartzProAttendanceCfg;
|
import com.yanzhu.job.domain.QuartzProjectAttendanceCfg;
|
||||||
//import com.yanzhu.job.service.IQuartzProAttendanceCfgService;
|
import com.yanzhu.job.domain.QuartzProjectAttendanceData;
|
||||||
//import com.yanzhu.job.service.IQuartzProAttendanceDataService;
|
import com.yanzhu.job.domain.QuartzProjectAttendanceGroup;
|
||||||
//import okhttp3.*;
|
import com.yanzhu.job.domain.QuartzProjectAttendanceUser;
|
||||||
//import org.apache.logging.log4j.util.Strings;
|
import com.yanzhu.job.service.IQuartzProjectAttendanceCfgService;
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import com.yanzhu.job.service.IQuartzProjectAttendanceDataService;
|
||||||
//import org.springframework.stereotype.Component;
|
import com.yanzhu.job.service.IQuartzProjectAttendanceGroupService;
|
||||||
//
|
import com.yanzhu.job.service.IQuartzProjectAttendanceUserService;
|
||||||
//import java.util.*;
|
import okhttp3.*;
|
||||||
//
|
import org.apache.logging.log4j.util.Strings;
|
||||||
//@Component("attendanceHuazhuTask")
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
//public class AttendanceHuazhuTask {
|
import org.springframework.stereotype.Component;
|
||||||
//
|
|
||||||
// @Autowired
|
import java.util.*;
|
||||||
// IQuartzProjectAttendanceUserService attendanceUserService;
|
|
||||||
//
|
@Component("attendanceHuazhuTask")
|
||||||
// @Autowired
|
public class AttendanceHuazhuTask {
|
||||||
// IQuartzProAttendanceCfgService attendanceCfgService;
|
|
||||||
//
|
@Autowired
|
||||||
// @Autowired
|
IQuartzProjectAttendanceUserService attendanceUserService;
|
||||||
// IQuartzProAttendanceDataService attendanceDataService;
|
|
||||||
//
|
@Autowired
|
||||||
// @Autowired
|
IQuartzProjectAttendanceCfgService attendanceCfgService;
|
||||||
// IQuartzProjectAttendanceGroupService attendanceGroupService;
|
|
||||||
//
|
@Autowired
|
||||||
// public static void main(String[] args) {
|
IQuartzProjectAttendanceDataService attendanceDataService;
|
||||||
// //String host="http://tapi.huazhukeji.cn:82/hz-labour";
|
|
||||||
// String host="http://api.1357.cn/hz-labour";
|
@Autowired
|
||||||
// //String path="/api/open/labour/findWorkerTypeByPage";
|
IQuartzProjectAttendanceGroupService attendanceGroupService;
|
||||||
// String path="/api/open/labour/findCardRecordByPage";
|
|
||||||
// HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path))
|
public static void main(String[] args) {
|
||||||
// .newBuilder();
|
//String host="http://tapi.huazhukeji.cn:82/hz-labour";
|
||||||
//
|
String host="http://api.1357.cn/hz-labour";
|
||||||
//
|
//String path="/api/open/labour/findWorkerTypeByPage";
|
||||||
// long startTime=DateUtil.date(DateUtil.parse("2024-03-16")).getTime();
|
String path="/api/open/labour/findCardRecordByPage";
|
||||||
// long endTime=startTime+3600l*1000*24*1;
|
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path))
|
||||||
// Map<String, String> headerParams=new HashMap<>();
|
.newBuilder();
|
||||||
// headerParams.put("appId","8024283707153666851");
|
|
||||||
// headerParams.put("appSecret","2070308b49399d94b401d98adeaa5b342aa81627");
|
|
||||||
// headerParams.put("Content-Type","application/json");
|
long startTime=DateUtil.date(DateUtil.parse("2024-03-16")).getTime();
|
||||||
//
|
long endTime=startTime+3600l*1000*24*1;
|
||||||
// Map<String, Object> params = new HashMap<>();
|
Map<String, String> headerParams=new HashMap<>();
|
||||||
// params.put("orgId","1666339529033805825");
|
headerParams.put("appId","8024283707153666851");
|
||||||
// params.put("tenantId","1666337067184893953");
|
headerParams.put("appSecret","2070308b49399d94b401d98adeaa5b342aa81627");
|
||||||
// params.put("workerId","7119618933040091136");
|
headerParams.put("Content-Type","application/json");
|
||||||
// params.put("size","200");
|
|
||||||
// params.put("current","1");
|
Map<String, Object> params = new HashMap<>();
|
||||||
// params.put("startTime",startTime);
|
params.put("orgId","1666339529033805825");
|
||||||
// params.put("endTime",endTime);
|
params.put("tenantId","1666337067184893953");
|
||||||
//
|
params.put("workerId","7119618933040091136");
|
||||||
// Request request = new Request.Builder()
|
params.put("size","200");
|
||||||
// .url(urlBuilder.build())
|
params.put("current","1");
|
||||||
// .post(toFormBody(params)).headers(setHeaderParams(headerParams))
|
params.put("startTime",startTime);
|
||||||
// .build();
|
params.put("endTime",endTime);
|
||||||
// String data=AttendanceTask.getResult(request);
|
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
Request request = new Request.Builder()
|
||||||
// JSONObject joData= jo.getJSONObject("data");
|
.url(urlBuilder.build())
|
||||||
// JSONArray arr=joData.getJSONArray("records");
|
.post(toFormBody(params)).headers(setHeaderParams(headerParams))
|
||||||
// long pages=joData.getLong("pages");
|
.build();
|
||||||
// if(arr!=null && arr.size()>0){
|
String data=AttendanceTask.getResult(request);
|
||||||
// for(int i=0;i<arr.size();i++) {
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// JSONObject json = arr.getJSONObject(i);
|
JSONObject joData= jo.getJSONObject("data");
|
||||||
// System.out.println(DateUtil.format(DateUtil.date(json.getLong("recordTime")),"yyyy-MM-dd HH:mm:ss")+"------------"+json.getString("imagePath"));
|
JSONArray arr=joData.getJSONArray("records");
|
||||||
// //SurProjectAttendanceData sdata = SurProjectAttendanceData.createFromHuazhu(json);
|
long pages=joData.getLong("pages");
|
||||||
// //System.out.println(JSON.toJSONString(sdata));
|
if(arr!=null && arr.size()>0){
|
||||||
// }
|
for(int i=0;i<arr.size();i++) {
|
||||||
// }
|
JSONObject json = arr.getJSONObject(i);
|
||||||
//
|
System.out.println(DateUtil.format(DateUtil.date(json.getLong("recordTime")),"yyyy-MM-dd HH:mm:ss")+"------------"+json.getString("imagePath"));
|
||||||
// }
|
//SurProjectAttendanceData sdata = SurProjectAttendanceData.createFromHuazhu(json);
|
||||||
//
|
//System.out.println(JSON.toJSONString(sdata));
|
||||||
// public static void main3(String[] args) {
|
}
|
||||||
// String path="/api/open/labour/findLabourWorkerByPage";
|
}
|
||||||
// Map<String,String> map=new HashMap<>();
|
|
||||||
//
|
}
|
||||||
// map.put("appId","8024283707153666851");
|
|
||||||
// map.put("secret","2070308b49399d94b401d98adeaa5b342aa81627");
|
public static void main3(String[] args) {
|
||||||
// map.put("projectId","1666339529033805825");
|
String path="/api/open/labour/findLabourWorkerByPage";
|
||||||
// map.put("tenantId","1666337067184893953");
|
Map<String,String> map=new HashMap<>();
|
||||||
// JSONObject jo=JSON.parseObject(JSON.toJSONString(map));
|
|
||||||
// int page=1;
|
map.put("appId","8024283707153666851");
|
||||||
// QuartzProAttendanceCfg it=new QuartzProAttendanceCfg();
|
map.put("secret","2070308b49399d94b401d98adeaa5b342aa81627");
|
||||||
// it.setId(0l);;
|
map.put("projectId","1666339529033805825");
|
||||||
// //new AttendanceHuazhuTask().doSyncWorker(jo,1,it);
|
map.put("tenantId","1666337067184893953");
|
||||||
// //long p=jo.getLongValue("page",1);
|
JSONObject jo=JSON.parseObject(JSON.toJSONString(map));
|
||||||
// //jo.put("page",1);
|
int page=1;
|
||||||
// //System.out.println(p);
|
QuartzProjectAttendanceCfg it=new QuartzProjectAttendanceCfg();
|
||||||
// //System.out.println(jo.toString());
|
it.setId(0l);;
|
||||||
// new AttendanceHuazhuTask().doSyncGroup(jo,1,it);
|
//new AttendanceHuazhuTask().doSyncWorker(jo,1,it);
|
||||||
// //new AttendanceHuazhuTask().doSyncWorker(jo,1,it);
|
//long p=jo.getLongValue("page",1);
|
||||||
// }
|
//jo.put("page",1);
|
||||||
// private static RequestBody toFormBody(Map<String, Object> params ){
|
//System.out.println(p);
|
||||||
// String json=JSON.toJSONString(params);
|
//System.out.println(jo.toString());
|
||||||
// return RequestBody.create(
|
new AttendanceHuazhuTask().doSyncGroup(jo,1,it);
|
||||||
// MediaType.parse("application/json"),json );
|
//new AttendanceHuazhuTask().doSyncWorker(jo,1,it);
|
||||||
// }
|
}
|
||||||
// private static Headers setHeaderParams(Map<String, String> headerParams) {
|
private static RequestBody toFormBody(Map<String, Object> params ){
|
||||||
// Headers headers = null;
|
String json=JSON.toJSONString(params);
|
||||||
// Headers.Builder headersbuilder = new Headers.Builder();
|
return RequestBody.create(
|
||||||
// if (headerParams != null && headerParams.size() > 0) {
|
MediaType.parse("application/json"),json );
|
||||||
// for (String key : headerParams.keySet()) {
|
}
|
||||||
// if (!Strings.isEmpty(key) && !Strings.isEmpty(headerParams.get(key))) {
|
private static Headers setHeaderParams(Map<String, String> headerParams) {
|
||||||
// //如果参数不是null并且不是"",就拼接起来
|
Headers headers = null;
|
||||||
// headersbuilder.add(key, headerParams.get(key));
|
Headers.Builder headersbuilder = new Headers.Builder();
|
||||||
// }
|
if (headerParams != null && headerParams.size() > 0) {
|
||||||
// }
|
for (String key : headerParams.keySet()) {
|
||||||
// }
|
if (!Strings.isEmpty(key) && !Strings.isEmpty(headerParams.get(key))) {
|
||||||
//
|
//如果参数不是null并且不是"",就拼接起来
|
||||||
// headers = headersbuilder.build();
|
headersbuilder.add(key, headerParams.get(key));
|
||||||
// return headers;
|
}
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// /**
|
|
||||||
// * 同步90天之内的数据
|
headers = headersbuilder.build();
|
||||||
// */
|
return headers;
|
||||||
// public void syncLast90DayAttendanceData() {
|
}
|
||||||
// long endTime=DateUtil.current();
|
|
||||||
// long startTime=endTime-3600l*1000*24*90;
|
/**
|
||||||
// syncAttendanceData(startTime);
|
* 同步90天之内的数据
|
||||||
// }
|
*/
|
||||||
//
|
public void syncLast90DayAttendanceData() {
|
||||||
// /**
|
long endTime=DateUtil.current();
|
||||||
// * 同步7天之内的数据
|
long startTime=endTime-3600l*1000*24*90;
|
||||||
// */
|
syncAttendanceData(startTime);
|
||||||
// public void syncLastWeekAttendanceData() {
|
}
|
||||||
// long endTime=DateUtil.current();
|
|
||||||
// long startTime=endTime-3600l*1000*24*7;
|
/**
|
||||||
// syncAttendanceData(startTime);
|
* 同步7天之内的数据
|
||||||
// }
|
*/
|
||||||
//
|
public void syncLastWeekAttendanceData() {
|
||||||
// /**
|
long endTime=DateUtil.current();
|
||||||
// * 同步当天数据
|
long startTime=endTime-3600l*1000*24*7;
|
||||||
// */
|
syncAttendanceData(startTime);
|
||||||
// public void syncAttendanceData(){
|
}
|
||||||
// long startTime=DateUtil.date(DateUtil.parse(DateUtil.format(new Date(),"yyyy-MM-dd"))).getTime();
|
|
||||||
// syncAttendanceData(startTime);
|
/**
|
||||||
// }
|
* 同步当天数据
|
||||||
//
|
*/
|
||||||
// public void syncGroup(){
|
public void syncAttendanceData(){
|
||||||
// QuartzProAttendanceCfg where =new QuartzProAttendanceCfg();
|
long startTime=DateUtil.date(DateUtil.parse(DateUtil.format(new Date(),"yyyy-MM-dd"))).getTime();
|
||||||
// where.setEnabled(1l);
|
syncAttendanceData(startTime);
|
||||||
// where.setIsDel(0l);
|
}
|
||||||
// where.setVendorsCode("huazhu");
|
|
||||||
// List<QuartzProAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
public void syncGroup(){
|
||||||
// for(QuartzProAttendanceCfg it :list){
|
QuartzProjectAttendanceCfg where =new QuartzProjectAttendanceCfg();
|
||||||
// String param= it.getVendorsParameter();
|
where.setEnabled(1l);
|
||||||
// if(Strings.isNotEmpty(param)){
|
where.setIsDel(0l);
|
||||||
// try{
|
where.setVendorsCode("huazhu");
|
||||||
// JSONObject jo=JSON.parseObject(param);
|
List<QuartzProjectAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
||||||
// doSyncGroup(jo,1,it);
|
for(QuartzProjectAttendanceCfg it :list){
|
||||||
// }catch (Exception ex){
|
String param= it.getVendorsParameter();
|
||||||
// ex.printStackTrace();
|
if(Strings.isNotEmpty(param)){
|
||||||
// }
|
try{
|
||||||
// }
|
JSONObject jo=JSON.parseObject(param);
|
||||||
// }
|
doSyncGroup(jo,1,it);
|
||||||
// }
|
}catch (Exception ex){
|
||||||
//
|
ex.printStackTrace();
|
||||||
// private void doSyncGroup(JSONObject jdata, long page, QuartzProAttendanceCfg it) {
|
}
|
||||||
// String path="/api/open/labour/findUnitProjectByPage";
|
}
|
||||||
// Request request=getRequest(path,jdata,page);
|
}
|
||||||
// String data=AttendanceTask.getResult(request);
|
}
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
|
||||||
// JSONObject joData= jo.getJSONObject("data");
|
private void doSyncGroup(JSONObject jdata, long page, QuartzProjectAttendanceCfg it) {
|
||||||
// JSONArray arr=joData.getJSONArray("records");
|
String path="/api/open/labour/findUnitProjectByPage";
|
||||||
// long pages=joData.getLong("pages");
|
Request request=getRequest(path,jdata,page);
|
||||||
// if(arr!=null && arr.size()>0){
|
String data=AttendanceTask.getResult(request);
|
||||||
// for(int i=0;i<arr.size();i++) {
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// JSONObject json = arr.getJSONObject(i);
|
JSONObject joData= jo.getJSONObject("data");
|
||||||
// QuartzProjectAttendanceGroup group= QuartzProjectAttendanceGroup.createHuazhu(json);
|
JSONArray arr=joData.getJSONArray("records");
|
||||||
// group.setCfgid(it.getId());
|
long pages=joData.getLong("pages");
|
||||||
// group.setAppId(jdata.getString("appId"));
|
if(arr!=null && arr.size()>0){
|
||||||
// attendanceGroupService.add(group);
|
for(int i=0;i<arr.size();i++) {
|
||||||
// }
|
JSONObject json = arr.getJSONObject(i);
|
||||||
// }
|
QuartzProjectAttendanceGroup group= QuartzProjectAttendanceGroup.createHuazhu(json);
|
||||||
// if(page<pages){
|
group.setCfgid(it.getId());
|
||||||
// doSyncGroup(jdata,page+1,it);
|
group.setAppId(jdata.getString("appId"));
|
||||||
// }
|
attendanceGroupService.add(group);
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// private void syncAttendanceData(long startTime){
|
if(page<pages){
|
||||||
// QuartzProAttendanceCfg where =new QuartzProAttendanceCfg();
|
doSyncGroup(jdata,page+1,it);
|
||||||
// where.setEnabled(1l);
|
}
|
||||||
// where.setIsDel(0l);
|
}
|
||||||
// where.setVendorsCode("huazhu");
|
|
||||||
// List<QuartzProAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
private void syncAttendanceData(long startTime){
|
||||||
// Map<String,Object> map=new HashMap<>();
|
QuartzProjectAttendanceCfg where =new QuartzProjectAttendanceCfg();
|
||||||
// long endTime=DateUtil.current();
|
where.setEnabled(1l);
|
||||||
//
|
where.setIsDel(0l);
|
||||||
// //map.put("endTime",endTime);
|
where.setVendorsCode("huazhu");
|
||||||
// map.put("startTime",startTime);
|
List<QuartzProjectAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
||||||
// for(QuartzProAttendanceCfg it :list){
|
Map<String,Object> map=new HashMap<>();
|
||||||
// String param= it.getVendorsParameter();
|
long endTime=DateUtil.current();
|
||||||
// if(Strings.isNotEmpty(param)){
|
|
||||||
// try{
|
//map.put("endTime",endTime);
|
||||||
// JSONObject jo=JSON.parseObject(param);
|
map.put("startTime",startTime);
|
||||||
// doSyncAttendanceData(jo,1,it,map);
|
for(QuartzProjectAttendanceCfg it :list){
|
||||||
//
|
String param= it.getVendorsParameter();
|
||||||
// }catch (Exception ex){
|
if(Strings.isNotEmpty(param)){
|
||||||
// ex.printStackTrace();
|
try{
|
||||||
// }
|
JSONObject jo=JSON.parseObject(param);
|
||||||
// }
|
doSyncAttendanceData(jo,1,it,map);
|
||||||
// }
|
|
||||||
// }
|
}catch (Exception ex){
|
||||||
//
|
ex.printStackTrace();
|
||||||
// /**
|
}
|
||||||
// * 同步所有数据
|
}
|
||||||
// */
|
}
|
||||||
// public void syncAllAttendanceData(){
|
}
|
||||||
// QuartzProAttendanceCfg where =new QuartzProAttendanceCfg();
|
|
||||||
// where.setEnabled(1l);
|
/**
|
||||||
// where.setIsDel(0l);
|
* 同步所有数据
|
||||||
// where.setVendorsCode("huazhu");
|
*/
|
||||||
// List<QuartzProAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
public void syncAllAttendanceData(){
|
||||||
// for(QuartzProAttendanceCfg it :list){
|
QuartzProjectAttendanceCfg where =new QuartzProjectAttendanceCfg();
|
||||||
// String param= it.getVendorsParameter();
|
where.setEnabled(1l);
|
||||||
// if(Strings.isNotEmpty(param)){
|
where.setIsDel(0l);
|
||||||
// try{
|
where.setVendorsCode("huazhu");
|
||||||
// JSONObject jo=JSON.parseObject(param);
|
List<QuartzProjectAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
||||||
// QuartzProjectAttendanceData attWhere=new QuartzProjectAttendanceData();
|
for(QuartzProjectAttendanceCfg it :list){
|
||||||
// attWhere.setId(it.getId());
|
String param= it.getVendorsParameter();
|
||||||
// Long page=attendanceDataService.getHuazhuPage(attWhere);
|
if(Strings.isNotEmpty(param)){
|
||||||
// if(null==page){
|
try{
|
||||||
// doSyncAttendanceData(jo,1,it,null);
|
JSONObject jo=JSON.parseObject(param);
|
||||||
// }else{
|
QuartzProjectAttendanceData attWhere=new QuartzProjectAttendanceData();
|
||||||
// doSyncAttendanceData(jo,page,it,null);
|
attWhere.setId(it.getId());
|
||||||
// }
|
Long page=attendanceDataService.getHuazhuPage(attWhere);
|
||||||
//
|
if(null==page){
|
||||||
// }catch (Exception ex){
|
doSyncAttendanceData(jo,1,it,null);
|
||||||
// ex.printStackTrace();
|
}else{
|
||||||
// }
|
doSyncAttendanceData(jo,page,it,null);
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
// }
|
}catch (Exception ex){
|
||||||
//
|
ex.printStackTrace();
|
||||||
// private void doSyncAttendanceData(JSONObject jdata, long page, QuartzProAttendanceCfg it, Map<String,Object> ps){
|
}
|
||||||
// String path="/api/open/labour/findCardRecordByPage";
|
}
|
||||||
// Request request=getRequest(path,jdata,page,ps);
|
}
|
||||||
// String data=AttendanceTask.getResult(request);
|
}
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
|
||||||
// JSONObject joData= jo.getJSONObject("data");
|
private void doSyncAttendanceData(JSONObject jdata, long page, QuartzProjectAttendanceCfg it, Map<String,Object> ps){
|
||||||
// JSONArray arr=joData.getJSONArray("records");
|
String path="/api/open/labour/findCardRecordByPage";
|
||||||
// long pages=joData.getLong("pages");
|
Request request=getRequest(path,jdata,page,ps);
|
||||||
// if(arr!=null && arr.size()>0){
|
String data=AttendanceTask.getResult(request);
|
||||||
// for(int i=0;i<arr.size();i++) {
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// JSONObject json = arr.getJSONObject(i);
|
JSONObject joData= jo.getJSONObject("data");
|
||||||
// QuartzProjectAttendanceData sdata = QuartzProjectAttendanceData.createFromHuazhu(json);
|
JSONArray arr=joData.getJSONArray("records");
|
||||||
// sdata.setVendorId(page); //VendorId保存华筑的页
|
long pages=joData.getLong("pages");
|
||||||
// sdata.setCfgid(it.getId());
|
if(arr!=null && arr.size()>0){
|
||||||
// sdata.setAppId(jdata.getString("appId"));
|
for(int i=0;i<arr.size();i++) {
|
||||||
// sdata.setVendorsCode(it.getVendorsCode());
|
JSONObject json = arr.getJSONObject(i);
|
||||||
// attendanceDataService.add(sdata);
|
QuartzProjectAttendanceData sdata = QuartzProjectAttendanceData.createFromHuazhu(json);
|
||||||
// }
|
sdata.setVendorId(page); //VendorId保存华筑的页
|
||||||
// }
|
sdata.setCfgid(it.getId());
|
||||||
// if(page<pages){
|
sdata.setAppId(jdata.getString("appId"));
|
||||||
// doSyncAttendanceData(jdata,page+1,it,ps);
|
sdata.setVendorsCode(it.getVendorsCode());
|
||||||
// }
|
attendanceDataService.add(sdata);
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// /**
|
if(page<pages){
|
||||||
// * 同步人员信息
|
doSyncAttendanceData(jdata,page+1,it,ps);
|
||||||
// */
|
}
|
||||||
// public void syncWorker(){
|
}
|
||||||
// QuartzProAttendanceCfg where =new QuartzProAttendanceCfg();
|
|
||||||
// where.setEnabled(1l);
|
/**
|
||||||
// where.setIsDel(0l);
|
* 同步人员信息
|
||||||
// where.setVendorsCode("huazhu");
|
*/
|
||||||
// List<QuartzProAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
public void syncWorker(){
|
||||||
// for(QuartzProAttendanceCfg it :list){
|
QuartzProjectAttendanceCfg where =new QuartzProjectAttendanceCfg();
|
||||||
// String param= it.getVendorsParameter();
|
where.setEnabled(1l);
|
||||||
// if(Strings.isNotEmpty(param)){
|
where.setIsDel(0l);
|
||||||
// try{
|
where.setVendorsCode("huazhu");
|
||||||
// JSONObject jo=JSON.parseObject(param);
|
List<QuartzProjectAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
||||||
//
|
for(QuartzProjectAttendanceCfg it :list){
|
||||||
// doSyncWorker(jo,1,it);
|
String param= it.getVendorsParameter();
|
||||||
// }catch (Exception ex){
|
if(Strings.isNotEmpty(param)){
|
||||||
// ex.printStackTrace();
|
try{
|
||||||
// }
|
JSONObject jo=JSON.parseObject(param);
|
||||||
// }
|
|
||||||
// }
|
doSyncWorker(jo,1,it);
|
||||||
// }
|
}catch (Exception ex){
|
||||||
//
|
ex.printStackTrace();
|
||||||
// public static Request getRequest(String path,JSONObject jo,long page) {
|
}
|
||||||
// return getRequest(path,jo,page,null);
|
}
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// public static Request getRequest(String path,JSONObject jo,long page,Map<String,Object> ps){
|
|
||||||
// String appId=jo.getString("appId");
|
public static Request getRequest(String path,JSONObject jo,long page) {
|
||||||
// String secret=jo.getString("secret");
|
return getRequest(path,jo,page,null);
|
||||||
// String projectId=jo.getString("projectId");
|
}
|
||||||
// String tenantId=jo.getString("tenantId");
|
|
||||||
// String host="http://api.1357.cn/hz-labour";
|
public static Request getRequest(String path,JSONObject jo,long page,Map<String,Object> ps){
|
||||||
// HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path))
|
String appId=jo.getString("appId");
|
||||||
// .newBuilder();
|
String secret=jo.getString("secret");
|
||||||
//
|
String projectId=jo.getString("projectId");
|
||||||
// Map<String, String> headerParams=new HashMap<>();
|
String tenantId=jo.getString("tenantId");
|
||||||
// headerParams.put("appId",appId);
|
String host="http://api.1357.cn/hz-labour";
|
||||||
// headerParams.put("appSecret",secret);
|
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path))
|
||||||
// headerParams.put("Content-Type","application/json");
|
.newBuilder();
|
||||||
//
|
|
||||||
// Map<String, Object> params = new HashMap<>();
|
Map<String, String> headerParams=new HashMap<>();
|
||||||
// params.put("orgId",projectId);
|
headerParams.put("appId",appId);
|
||||||
// params.put("tenantId",tenantId);
|
headerParams.put("appSecret",secret);
|
||||||
// params.put("size",500);
|
headerParams.put("Content-Type","application/json");
|
||||||
// params.put("current",page);
|
|
||||||
// if(ps!=null){
|
Map<String, Object> params = new HashMap<>();
|
||||||
// for(String k :ps.keySet()){
|
params.put("orgId",projectId);
|
||||||
// params.put(k,ps.get(k));
|
params.put("tenantId",tenantId);
|
||||||
// }
|
params.put("size",500);
|
||||||
// }
|
params.put("current",page);
|
||||||
//
|
if(ps!=null){
|
||||||
// Request request = new Request.Builder()
|
for(String k :ps.keySet()){
|
||||||
// .url(urlBuilder.build())
|
params.put(k,ps.get(k));
|
||||||
// .post(toFormBody(params)).headers(setHeaderParams(headerParams))
|
}
|
||||||
// .build();
|
}
|
||||||
// return request;
|
|
||||||
// }
|
Request request = new Request.Builder()
|
||||||
//
|
.url(urlBuilder.build())
|
||||||
// private void doSyncWorker(JSONObject jdata, long page, QuartzProAttendanceCfg it){
|
.post(toFormBody(params)).headers(setHeaderParams(headerParams))
|
||||||
// String path="/api/open/labour/findLabourWorkerByPage";
|
.build();
|
||||||
// Request request=getRequest(path,jdata,page);
|
return request;
|
||||||
// String data=AttendanceTask.getResult(request);
|
}
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
|
||||||
// JSONObject joData= jo.getJSONObject("data");
|
private void doSyncWorker(JSONObject jdata, long page, QuartzProjectAttendanceCfg it){
|
||||||
// JSONArray arr=joData.getJSONArray("records");
|
String path="/api/open/labour/findLabourWorkerByPage";
|
||||||
// long pages=joData.getLong("pages");
|
Request request=getRequest(path,jdata,page);
|
||||||
// if(arr!=null && arr.size()>0){
|
String data=AttendanceTask.getResult(request);
|
||||||
// for(int i=0;i<arr.size();i++){
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// JSONObject json=arr.getJSONObject(i);
|
JSONObject joData= jo.getJSONObject("data");
|
||||||
// QuartzProjectAttendanceUser user= QuartzProjectAttendanceUser.createFromHuazhu(json);
|
JSONArray arr=joData.getJSONArray("records");
|
||||||
// user.setVendorsCode(it.getVendorsCode());
|
long pages=joData.getLong("pages");
|
||||||
// user.setCfgid(it.getId());
|
if(arr!=null && arr.size()>0){
|
||||||
// user.setAppId(jdata.getString("appId"));
|
for(int i=0;i<arr.size();i++){
|
||||||
// attendanceUserService.add(user);
|
JSONObject json=arr.getJSONObject(i);
|
||||||
//
|
QuartzProjectAttendanceUser user= QuartzProjectAttendanceUser.createFromHuazhu(json);
|
||||||
// }
|
user.setVendorsCode(it.getVendorsCode());
|
||||||
// }
|
user.setCfgid(it.getId());
|
||||||
// if(page<pages){
|
user.setAppId(jdata.getString("appId"));
|
||||||
// doSyncWorker(jdata,page+1,it);
|
attendanceUserService.add(user);
|
||||||
// }
|
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
if(page<pages){
|
||||||
|
doSyncWorker(jdata,page+1,it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,327 +1,327 @@
|
||||||
//package com.yanzhu.job.task;
|
package com.yanzhu.job.task;
|
||||||
//
|
|
||||||
//import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
//import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
//import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
//import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
//import com.yanzhu.common.redis.service.RedisService;
|
import com.yanzhu.common.redis.service.RedisService;
|
||||||
//import com.yanzhu.job.domain.*;
|
import com.yanzhu.job.domain.*;
|
||||||
//import com.yanzhu.job.service.*;
|
import com.yanzhu.job.service.*;
|
||||||
//import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
//import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
//import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
//import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
//import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
//import org.apache.logging.log4j.util.Strings;
|
import org.apache.logging.log4j.util.Strings;
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
//import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
//
|
|
||||||
//import java.io.IOException;
|
import java.io.IOException;
|
||||||
//import java.util.*;
|
import java.util.*;
|
||||||
//import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
//import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
//
|
|
||||||
//@Component("attendanceTask")
|
@Component("attendanceTask")
|
||||||
//public class AttendanceTask {
|
public class AttendanceTask {
|
||||||
//
|
|
||||||
// @Autowired
|
@Autowired
|
||||||
// private RedisService redisCache;
|
private RedisService redisCache;
|
||||||
//
|
|
||||||
// @Autowired
|
@Autowired
|
||||||
// private ISysNativeService sysNativeService;
|
private ISysNativeService sysNativeService;
|
||||||
//
|
|
||||||
// @Autowired
|
@Autowired
|
||||||
// IQuartzProjectAttendanceUserService attendanceUserService;
|
IQuartzProjectAttendanceUserService attendanceUserService;
|
||||||
//
|
|
||||||
// @Autowired
|
@Autowired
|
||||||
// IQuartzProAttendanceCfgService attendanceCfgService;
|
IQuartzProjectAttendanceCfgService attendanceCfgService;
|
||||||
//
|
|
||||||
// @Autowired
|
@Autowired
|
||||||
// IQuartzProAttendanceDataService attendanceDataService;
|
IQuartzProjectAttendanceDataService attendanceDataService;
|
||||||
//
|
|
||||||
// @Autowired
|
@Autowired
|
||||||
// IQuartzProjectAttendanceGroupService attendanceGroupService;
|
IQuartzProjectAttendanceGroupService attendanceGroupService;
|
||||||
//
|
|
||||||
// private String getNative(long id){
|
private String getNative(long id){
|
||||||
// String ckey="attendance_jgw_native_"+id;
|
String ckey="attendance_jgw_native_"+id;
|
||||||
// Object obj=redisCache.getCacheObject(ckey);
|
Object obj=redisCache.getCacheObject(ckey);
|
||||||
// String tmp="";
|
String tmp="";
|
||||||
// if(obj!=null){
|
if(obj!=null){
|
||||||
// tmp=obj.toString();
|
tmp=obj.toString();
|
||||||
// if(StrUtil.isNotEmpty(tmp)){
|
if(StrUtil.isNotEmpty(tmp)){
|
||||||
// return tmp;
|
return tmp;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// List<SysNative> list=sysNativeService.selectSysNativeListById(id);
|
List<SysNative> list=sysNativeService.selectSysNativeListById(id);
|
||||||
// if(list.size()==0){
|
if(list.size()==0){
|
||||||
// id=id/100*100;
|
id=id/100*100;
|
||||||
// list=sysNativeService.selectSysNativeListById(id);
|
list=sysNativeService.selectSysNativeListById(id);
|
||||||
// if(list.size()==0){
|
if(list.size()==0){
|
||||||
// id=id/10000*10000;
|
id=id/10000*10000;
|
||||||
// list=sysNativeService.selectSysNativeListById(id);
|
list=sysNativeService.selectSysNativeListById(id);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if(list.size()==0){
|
if(list.size()==0){
|
||||||
// tmp="";
|
tmp="";
|
||||||
// }else{
|
}else{
|
||||||
// tmp= list.get(0).getAddress();
|
tmp= list.get(0).getAddress();
|
||||||
// }
|
}
|
||||||
// redisCache.setCacheObject(ckey, tmp, 1L, TimeUnit.DAYS);
|
redisCache.setCacheObject(ckey, tmp, 1L, TimeUnit.DAYS);
|
||||||
// return tmp;
|
return tmp;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void syncWorker(){
|
public void syncWorker(){
|
||||||
// QuartzProAttendanceCfg where =new QuartzProAttendanceCfg();
|
QuartzProjectAttendanceCfg where =new QuartzProjectAttendanceCfg();
|
||||||
// where.setEnabled(1l);
|
where.setEnabled(1l);
|
||||||
// where.setIsDel(0l);
|
where.setIsDel(0l);
|
||||||
// where.setVendorsCode("gld");
|
where.setVendorsCode("gld");
|
||||||
// List<QuartzProAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
List<QuartzProjectAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
||||||
// for(QuartzProAttendanceCfg it :list){
|
for(QuartzProjectAttendanceCfg it :list){
|
||||||
// String param= it.getVendorsParameter();
|
String param= it.getVendorsParameter();
|
||||||
// if(Strings.isNotEmpty(param)){
|
if(Strings.isNotEmpty(param)){
|
||||||
// try{
|
try{
|
||||||
// JSONObject jo=JSON.parseObject(param);
|
JSONObject jo=JSON.parseObject(param);
|
||||||
// String appId=jo.getString("appId");
|
String appId=jo.getString("appId");
|
||||||
// String secret=jo.getString("secret");
|
String secret=jo.getString("secret");
|
||||||
// String projectId=jo.getString("projectId");
|
String projectId=jo.getString("projectId");
|
||||||
// doSyncWorker(appId,secret,projectId,1,it);
|
doSyncWorker(appId,secret,projectId,1,it);
|
||||||
// }catch (Exception ex){
|
}catch (Exception ex){
|
||||||
// ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void syncGroup(){
|
public void syncGroup(){
|
||||||
// QuartzProAttendanceCfg where =new QuartzProAttendanceCfg();
|
QuartzProjectAttendanceCfg where =new QuartzProjectAttendanceCfg();
|
||||||
// where.setEnabled(1l);
|
where.setEnabled(1l);
|
||||||
// where.setIsDel(0l);
|
where.setIsDel(0l);
|
||||||
// where.setVendorsCode("gld");
|
where.setVendorsCode("gld");
|
||||||
// List<QuartzProAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
List<QuartzProjectAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
||||||
// for(QuartzProAttendanceCfg it :list){
|
for(QuartzProjectAttendanceCfg it :list){
|
||||||
// String param= it.getVendorsParameter();
|
String param= it.getVendorsParameter();
|
||||||
// if(Strings.isNotEmpty(param)){
|
if(Strings.isNotEmpty(param)){
|
||||||
// try{
|
try{
|
||||||
// JSONObject jo=JSON.parseObject(param);
|
JSONObject jo=JSON.parseObject(param);
|
||||||
// String appId=jo.getString("appId");
|
String appId=jo.getString("appId");
|
||||||
// String secret=jo.getString("secret");
|
String secret=jo.getString("secret");
|
||||||
// String projectId=jo.getString("projectId");
|
String projectId=jo.getString("projectId");
|
||||||
// doSyncGroup(appId,secret,projectId,it);
|
doSyncGroup(appId,secret,projectId,it);
|
||||||
// }catch (Exception ex){
|
}catch (Exception ex){
|
||||||
// ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// private void doSyncGroup(String appId, String secret, String projectId, QuartzProAttendanceCfg it) {
|
private void doSyncGroup(String appId, String secret, String projectId, QuartzProjectAttendanceCfg it) {
|
||||||
// Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
// params.put("projectId", projectId);
|
params.put("projectId", projectId);
|
||||||
// params.put("appid",appId);
|
params.put("appid",appId);
|
||||||
// String sign = getSign(params,secret);
|
String sign = getSign(params,secret);
|
||||||
// String host="https://glm.glodon.com/api/open";
|
String host="https://glm.glodon.com/api/open";
|
||||||
// params.put("sign",sign);
|
params.put("sign",sign);
|
||||||
// String path="/worker/allGroup";
|
String path="/worker/allGroup";
|
||||||
// HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
||||||
// params.forEach((s, o) -> {
|
params.forEach((s, o) -> {
|
||||||
// urlBuilder.addQueryParameter(s, (String) o);
|
urlBuilder.addQueryParameter(s, (String) o);
|
||||||
// });
|
});
|
||||||
// Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
// .url(urlBuilder.build())
|
.url(urlBuilder.build())
|
||||||
// .build();
|
.build();
|
||||||
// String data = getResult(request);
|
String data = getResult(request);
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// JSONArray arr=jo.getJSONArray("data");
|
JSONArray arr=jo.getJSONArray("data");
|
||||||
// if(arr!=null && arr.size()>0) {
|
if(arr!=null && arr.size()>0) {
|
||||||
// for (int i = 0; i < arr.size(); i++) {
|
for (int i = 0; i < arr.size(); i++) {
|
||||||
// JSONObject json=arr.getJSONObject(i);
|
JSONObject json=arr.getJSONObject(i);
|
||||||
// QuartzProjectAttendanceGroup group= QuartzProjectAttendanceGroup.create(json);
|
QuartzProjectAttendanceGroup group= QuartzProjectAttendanceGroup.create(json);
|
||||||
// group.setAppId(appId);
|
group.setAppId(appId);
|
||||||
// group.setCfgid(it.getId());
|
group.setCfgid(it.getId());
|
||||||
// attendanceGroupService.add(group);
|
attendanceGroupService.add(group);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// private void doSyncWorker(String appid, String secret, String projectld, int page, QuartzProAttendanceCfg it){
|
private void doSyncWorker(String appid, String secret, String projectld, int page, QuartzProjectAttendanceCfg it){
|
||||||
// Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
// params.put("projectId", projectld);
|
params.put("projectId", projectld);
|
||||||
// params.put("start", "2000-01-01 00:00:00");
|
params.put("start", "2000-01-01 00:00:00");
|
||||||
// params.put("end", "2099-01-01 00:00:00");
|
params.put("end", "2099-01-01 00:00:00");
|
||||||
// params.put("pageNo",""+page);
|
params.put("pageNo",""+page);
|
||||||
// params.put("pageSize", "1000");
|
params.put("pageSize", "1000");
|
||||||
// params.put("appid",appid);
|
params.put("appid",appid);
|
||||||
// String sign = getSign(params,secret);
|
String sign = getSign(params,secret);
|
||||||
// String host="https://glm.glodon.com/api/open";
|
String host="https://glm.glodon.com/api/open";
|
||||||
// params.put("sign",sign);
|
params.put("sign",sign);
|
||||||
// String path="/worker/new/allWorkerInfo";
|
String path="/worker/new/allWorkerInfo";
|
||||||
// HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
||||||
// params.forEach((s, o) -> {
|
params.forEach((s, o) -> {
|
||||||
// urlBuilder.addQueryParameter(s, (String) o);
|
urlBuilder.addQueryParameter(s, (String) o);
|
||||||
// });
|
});
|
||||||
// Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
// .url(urlBuilder.build())
|
.url(urlBuilder.build())
|
||||||
// .build();
|
.build();
|
||||||
// String data = getResult(request);
|
String data = getResult(request);
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// JSONArray arr=jo.getJSONArray("data");
|
JSONArray arr=jo.getJSONArray("data");
|
||||||
// if(arr!=null && arr.size()>0){
|
if(arr!=null && arr.size()>0){
|
||||||
// for(int i=0;i<arr.size();i++){
|
for(int i=0;i<arr.size();i++){
|
||||||
// JSONObject json=arr.getJSONObject(i);
|
JSONObject json=arr.getJSONObject(i);
|
||||||
// QuartzProjectAttendanceUser user= QuartzProjectAttendanceUser.create(json);
|
QuartzProjectAttendanceUser user= QuartzProjectAttendanceUser.create(json);
|
||||||
// String idNumber=json.getString("identification");//身份证
|
String idNumber=json.getString("identification");//身份证
|
||||||
// if(StrUtil.isNotEmpty(idNumber) && idNumber.length()>6){
|
if(StrUtil.isNotEmpty(idNumber) && idNumber.length()>6){
|
||||||
// try {
|
try {
|
||||||
// long idStr = Long.parseLong(idNumber.substring(0, 6));
|
long idStr = Long.parseLong(idNumber.substring(0, 6));
|
||||||
// String natstr=getNative(idStr);
|
String natstr=getNative(idStr);
|
||||||
// if(StrUtil.isNotEmpty(natstr)){
|
if(StrUtil.isNotEmpty(natstr)){
|
||||||
// user.setNativePlace(natstr);
|
user.setNativePlace(natstr);
|
||||||
// }
|
}
|
||||||
// }catch (Exception ex){
|
}catch (Exception ex){
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// user.setVendorsCode(it.getVendorsCode());
|
user.setVendorsCode(it.getVendorsCode());
|
||||||
// user.setCfgid(it.getId());
|
user.setCfgid(it.getId());
|
||||||
// user.setAppId(appid);
|
user.setAppId(appid);
|
||||||
// attendanceUserService.add(user);
|
attendanceUserService.add(user);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if(arr.size()==1000){
|
if(arr.size()==1000){
|
||||||
// doSyncWorker(appid,secret,projectld,page+1,it);
|
doSyncWorker(appid,secret,projectld,page+1,it);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void syncAttendanceData(){
|
public void syncAttendanceData(){
|
||||||
// QuartzProAttendanceCfg where =new QuartzProAttendanceCfg();
|
QuartzProjectAttendanceCfg where =new QuartzProjectAttendanceCfg();
|
||||||
// where.setEnabled(1l);
|
where.setEnabled(1l);
|
||||||
// where.setIsDel(0l);
|
where.setIsDel(0l);
|
||||||
// where.setVendorsCode("gld");
|
where.setVendorsCode("gld");
|
||||||
// List<QuartzProAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
List<QuartzProjectAttendanceCfg> list=attendanceCfgService.selectSurProjectAttendanceCfgList(where);
|
||||||
// for(QuartzProAttendanceCfg it :list){
|
for(QuartzProjectAttendanceCfg it :list){
|
||||||
// String param= it.getVendorsParameter();
|
String param= it.getVendorsParameter();
|
||||||
// if(Strings.isNotEmpty(param)){
|
if(Strings.isNotEmpty(param)){
|
||||||
// try{
|
try{
|
||||||
// JSONObject jo=JSON.parseObject(param);
|
JSONObject jo=JSON.parseObject(param);
|
||||||
// String appId=jo.getString("appId");
|
String appId=jo.getString("appId");
|
||||||
// String secret=jo.getString("secret");
|
String secret=jo.getString("secret");
|
||||||
// String projectId=jo.getString("projectId");
|
String projectId=jo.getString("projectId");
|
||||||
// QuartzProjectAttendanceData dwhere=new QuartzProjectAttendanceData();
|
QuartzProjectAttendanceData dwhere=new QuartzProjectAttendanceData();
|
||||||
// dwhere.setCfgid(it.getId());
|
dwhere.setCfgid(it.getId());
|
||||||
// String startId=attendanceDataService.getLastServerId(dwhere);
|
String startId=attendanceDataService.getLastServerId(dwhere);
|
||||||
// doSyncAttendanceData(appId,secret,projectId,startId,it);
|
doSyncAttendanceData(appId,secret,projectId,startId,it);
|
||||||
// }catch (Exception ex){
|
}catch (Exception ex){
|
||||||
// ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// private void doSyncAttendanceData(String appid, String secret, String projectId, String id, QuartzProAttendanceCfg it){
|
private void doSyncAttendanceData(String appid, String secret, String projectId, String id, QuartzProjectAttendanceCfg it){
|
||||||
// Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
// params.put("projectId", projectId);
|
params.put("projectId", projectId);
|
||||||
// params.put("startId",""+id);
|
params.put("startId",""+id);
|
||||||
// params.put("pageSize", "500");
|
params.put("pageSize", "500");
|
||||||
// params.put("appid",appid);
|
params.put("appid",appid);
|
||||||
// String sign = getSign(params,secret);
|
String sign = getSign(params,secret);
|
||||||
// String host="https://glm.glodon.com/api/open";
|
String host="https://glm.glodon.com/api/open";
|
||||||
// params.put("sign",sign);
|
params.put("sign",sign);
|
||||||
// String path="/attendance/card";
|
String path="/attendance/card";
|
||||||
// HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
||||||
// params.forEach((s, o) -> {
|
params.forEach((s, o) -> {
|
||||||
// urlBuilder.addQueryParameter(s, (String) o);
|
urlBuilder.addQueryParameter(s, (String) o);
|
||||||
// });
|
});
|
||||||
// Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
// .url(urlBuilder.build())
|
.url(urlBuilder.build())
|
||||||
// .build();
|
.build();
|
||||||
// String data = getResult(request);
|
String data = getResult(request);
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// JSONArray arr=jo.getJSONArray("data");
|
JSONArray arr=jo.getJSONArray("data");
|
||||||
// String lastId= "0";
|
String lastId= "0";
|
||||||
// if(arr!=null && arr.size()>0){
|
if(arr!=null && arr.size()>0){
|
||||||
// for(int i=0;i<arr.size();i++){
|
for(int i=0;i<arr.size();i++){
|
||||||
// JSONObject json=arr.getJSONObject(i);
|
JSONObject json=arr.getJSONObject(i);
|
||||||
// QuartzProjectAttendanceData sdata= QuartzProjectAttendanceData.create(json);
|
QuartzProjectAttendanceData sdata= QuartzProjectAttendanceData.create(json);
|
||||||
// lastId=sdata.getServerid();
|
lastId=sdata.getServerid();
|
||||||
// sdata.setCfgid(it.getId());
|
sdata.setCfgid(it.getId());
|
||||||
// sdata.setAppId(appid);
|
sdata.setAppId(appid);
|
||||||
// sdata.setVendorsCode(it.getVendorsCode());
|
sdata.setVendorsCode(it.getVendorsCode());
|
||||||
// attendanceDataService.add(sdata);
|
attendanceDataService.add(sdata);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// //System.out.println("-------->"+id+","+lastId);
|
//System.out.println("-------->"+id+","+lastId);
|
||||||
// if(arr.size()==500){
|
if(arr.size()==500){
|
||||||
// doSyncAttendanceData(appid,secret,projectId,lastId,it);
|
doSyncAttendanceData(appid,secret,projectId,lastId,it);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// public static void main(String[] args){
|
public static void main(String[] args){
|
||||||
//
|
|
||||||
// System.out.println("-------1--------->AttendanceUserTask.syncWorker");
|
System.out.println("-------1--------->AttendanceUserTask.syncWorker");
|
||||||
// Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
// params.put("projectId", "709599705953792");
|
params.put("projectId", "709599705953792");
|
||||||
// params.put("start", "2000-01-01 00:00:00");
|
params.put("start", "2000-01-01 00:00:00");
|
||||||
// params.put("end", "2099-01-01 00:00:00");
|
params.put("end", "2099-01-01 00:00:00");
|
||||||
|
params.put("pageNo","1");
|
||||||
|
params.put("pageSize", "1000");
|
||||||
//params.put("pageNo", "1");
|
//params.put("pageNo", "1");
|
||||||
// params.put("pageSize", "1000");
|
params.put("startId", "0");
|
||||||
// //params.put("pageNo", "1");
|
params.put("appid","f24454233c5346fe82df6b8dd35e9d6d");
|
||||||
// params.put("startId", "0");
|
String sign = getSign(params,"754619e2a33491b84a4d47838d2ffc0a");
|
||||||
// params.put("appid","f24454233c5346fe82df6b8dd35e9d6d");
|
System.out.println("--->"+sign);
|
||||||
// String sign = getSign(params,"754619e2a33491b84a4d47838d2ffc0a");
|
params.put("sign",sign);
|
||||||
// System.out.println("--->"+sign);
|
String host="https://glm.glodon.com/api/open";
|
||||||
// params.put("sign",sign);
|
String path="/worker/new/allWorkerInfo";
|
||||||
// String host="https://glm.glodon.com/api/open";
|
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
||||||
// String path="/worker/new/allWorkerInfo";
|
params.forEach((s, o) -> {
|
||||||
// HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path)).newBuilder();
|
urlBuilder.addQueryParameter(s, (String) o);
|
||||||
// params.forEach((s, o) -> {
|
});
|
||||||
// urlBuilder.addQueryParameter(s, (String) o);
|
Request request = new Request.Builder()
|
||||||
// });
|
.url(urlBuilder.build())
|
||||||
// Request request = new Request.Builder()
|
.build();
|
||||||
// .url(urlBuilder.build())
|
String data = getResult(request);
|
||||||
// .build();
|
//System.out.println("data:"+data);
|
||||||
// String data = getResult(request);
|
JSONObject jo= JSON.parseObject(data);
|
||||||
// //System.out.println("data:"+data);
|
JSONArray jsonArray=jo.getJSONArray("data");
|
||||||
// JSONObject jo= JSON.parseObject(data);
|
for(int i=0;i<jsonArray.size();i++){
|
||||||
// JSONArray jsonArray=jo.getJSONArray("data");
|
JSONObject o=jsonArray.getJSONObject(i);
|
||||||
// for(int i=0;i<jsonArray.size();i++){
|
//if(o.getLong("workerId")==7813018){
|
||||||
// JSONObject o=jsonArray.getJSONObject(i);
|
System.out.println(o.getString("status"));
|
||||||
// //if(o.getLong("workerId")==7813018){
|
|
||||||
// System.out.println(o.getString("status"));
|
|
||||||
// //}
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static String getResult(Request request) {
|
|
||||||
// OkHttpClient client = new OkHttpClient.Builder()
|
|
||||||
// .sslSocketFactory(SSLSocketClient.getSSLSocketFactory(), SSLSocketClient.getX509TrustManager())
|
|
||||||
// .hostnameVerifier(SSLSocketClient.getHostnameVerifier())
|
|
||||||
// .build();
|
|
||||||
// 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();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private static String getSign(Map<String,Object> paramsMap,String appSecret){
|
|
||||||
// List<String> paramsList = new ArrayList<>();
|
|
||||||
// paramsMap.forEach((s, o) -> {
|
|
||||||
// String stringBuilder = s + o;
|
|
||||||
// paramsList.add(stringBuilder);
|
|
||||||
// });
|
|
||||||
// StringBuilder beforeMd5 = new StringBuilder();
|
|
||||||
// beforeMd5.append(appSecret);
|
|
||||||
// paramsList.stream()
|
|
||||||
// .sorted(String::compareTo)
|
|
||||||
// .collect(Collectors.toList())
|
|
||||||
// .forEach(beforeMd5::append);
|
|
||||||
// beforeMd5.append(appSecret);
|
|
||||||
// return DigestUtils.md5Hex(beforeMd5.toString()).toUpperCase();
|
|
||||||
// }
|
|
||||||
//}
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getResult(Request request) {
|
||||||
|
OkHttpClient client = new OkHttpClient.Builder()
|
||||||
|
.sslSocketFactory(SSLSocketClient.getSSLSocketFactory(), SSLSocketClient.getX509TrustManager())
|
||||||
|
.hostnameVerifier(SSLSocketClient.getHostnameVerifier())
|
||||||
|
.build();
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String getSign(Map<String,Object> paramsMap,String appSecret){
|
||||||
|
List<String> paramsList = new ArrayList<>();
|
||||||
|
paramsMap.forEach((s, o) -> {
|
||||||
|
String stringBuilder = s + o;
|
||||||
|
paramsList.add(stringBuilder);
|
||||||
|
});
|
||||||
|
StringBuilder beforeMd5 = new StringBuilder();
|
||||||
|
beforeMd5.append(appSecret);
|
||||||
|
paramsList.stream()
|
||||||
|
.sorted(String::compareTo)
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
.forEach(beforeMd5::append);
|
||||||
|
beforeMd5.append(appSecret);
|
||||||
|
return DigestUtils.md5Hex(beforeMd5.toString()).toUpperCase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.QuartzDevIotMapper">
|
<mapper namespace="com.yanzhu.job.mapper.QuartzDevIotMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.QuartzDevIotConfigPoint" id="DevIotConfigPointResult">
|
<resultMap type="QuartzDevIotConfigPoint" id="DevIotConfigPointResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="cfgId" column="cfg_id" />
|
<result property="cfgId" column="cfg_id" />
|
||||||
<result property="comId" column="com_id" />
|
<result property="comId" column="com_id" />
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
select id, cfg_id, com_id, project_id, device_sn, device_name, factory_name, contact_person, contact_person_phone, levels, leakage_current, rated_temperature, short_circuit_current, rated_current, rated_voltage, online_status, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config_point
|
select id, cfg_id, com_id, project_id, device_sn, device_name, factory_name, contact_person, contact_person_phone, levels, leakage_current, rated_temperature, short_circuit_current, rated_current, rated_voltage, online_status, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config_point
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDevIotConfigPointList" parameterType="com.yanzhu.job.domain.QuartzDevIotConfigPoint" resultMap="DevIotConfigPointResult">
|
<select id="selectDevIotConfigPointList" parameterType="QuartzDevIotConfigPoint" resultMap="DevIotConfigPointResult">
|
||||||
<include refid="selectDevIotConfigPointVo"/>
|
<include refid="selectDevIotConfigPointVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDevIotConfigPoint" parameterType="com.yanzhu.job.domain.QuartzDevIotConfigPoint" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertDevIotConfigPoint" parameterType="QuartzDevIotConfigPoint" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into dev_iot_config_point
|
insert into dev_iot_config_point
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="cfgId != null">cfg_id,</if>
|
<if test="cfgId != null">cfg_id,</if>
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateDevIotConfigPoint" parameterType="com.yanzhu.job.domain.QuartzDevIotConfigPoint">
|
<update id="updateDevIotConfigPoint" parameterType="QuartzDevIotConfigPoint">
|
||||||
update dev_iot_config_point
|
update dev_iot_config_point
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
where dic.is_del = '0'
|
where dic.is_del = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDevIotDatas" parameterType="com.yanzhu.job.domain.QuartzDevIotDatas" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertDevIotDatas" parameterType="QuartzDevIotDatas" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into dev_iot_datas
|
insert into dev_iot_datas
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="cfgId != null">cfg_id,</if>
|
<if test="cfgId != null">cfg_id,</if>
|
||||||
|
|
@ -202,7 +202,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertDevIotWarning" parameterType="com.yanzhu.job.domain.QuartzDevIotWarning" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertDevIotWarning" parameterType="QuartzDevIotWarning" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into dev_iot_warning
|
insert into dev_iot_warning
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="cfgId != null">cfg_id,</if>
|
<if test="cfgId != null">cfg_id,</if>
|
||||||
|
|
|
||||||
|
|
@ -1,168 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.yanzhu.job.mapper.QuartzProAttendanceDataMapper">
|
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.QuartzProAttendanceData" id="QuartzProAttendanceDataResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="comId" column="comId" />
|
|
||||||
<result property="comName" column="comName"/>
|
|
||||||
<result property="projectName" column="projectName"/>
|
|
||||||
<result property="projectId" column="projectId" />
|
|
||||||
<result property="subDeptId" column="sub_dept_id" />
|
|
||||||
<result property="subDeptName" column="sub_dept_name" />
|
|
||||||
<result property="userId" column="userId" />
|
|
||||||
<result property="admitGuid" column="admitGuid" />
|
|
||||||
<result property="eventGuid" column="eventGuid"/>
|
|
||||||
<result property="userName" column="userName" />
|
|
||||||
<result property="subDeptGroup" column="sub_dept_group" />
|
|
||||||
<result property="subDeptGroupName" column="sub_dept_group_name" />
|
|
||||||
<result property="craftType" column="craft_type" />
|
|
||||||
<result property="craftPost" column="craft_post" />
|
|
||||||
<result property="inTime" column="inTime" />
|
|
||||||
<result property="inPhoto" column="inPhoto"/>
|
|
||||||
<result property="outTime" column="outTime" />
|
|
||||||
<result property="outPhoto" column="outPhoto"/>
|
|
||||||
<result property="deviceNo" column="deviceNo" />
|
|
||||||
<result property="isDel" column="is_del" />
|
|
||||||
<result property="state" column="state" />
|
|
||||||
<result property="remark" column="remark" />
|
|
||||||
<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="source" column="source" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectProAttendanceDataVo">
|
|
||||||
select id, comId, projectId, userId, userName, sub_dept_group, sub_dept_group_name, craft_type, craft_post,admitGuid,
|
|
||||||
eventGuid, inPhoto ,outPhoto, comName, projectName, sub_dept_id, sub_dept_name,
|
|
||||||
inTime, outTime, deviceNo, is_del, state, remark, create_by, create_time, update_by, update_time, source from attendance_ubi_data
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectProAttendanceDataList" parameterType="com.yanzhu.job.domain.QuartzProAttendanceData" resultMap="QuartzProAttendanceDataResult">
|
|
||||||
<include refid="selectProAttendanceDataVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="comId != null "> and comId = #{comId}</if>
|
|
||||||
<if test="projectId != null "> and projectId = #{projectId}</if>
|
|
||||||
<if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if>
|
|
||||||
<if test="userId != null "> and userId = #{userId}</if>
|
|
||||||
<if test="subDeptGroup != null "> and sub_dept_group = #{subDeptGroup}</if>
|
|
||||||
<if test="searchValue != null and searchValue != ''"> and date(create_time) = #{searchValue}</if>
|
|
||||||
</where>
|
|
||||||
order by id desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectProAttendanceDataById" parameterType="Long" resultMap="QuartzProAttendanceDataResult">
|
|
||||||
<include refid="selectProAttendanceDataVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertProAttendanceData" parameterType="com.yanzhu.job.domain.QuartzProAttendanceData" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into attendance_ubi_data
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="comId != null">comId,</if>
|
|
||||||
<if test="projectId != null">projectId,</if>
|
|
||||||
<if test="userId != null">userId,</if>
|
|
||||||
<if test="userName != null">userName,</if>
|
|
||||||
<if test="subDeptGroup != null">sub_dept_group,</if>
|
|
||||||
<if test="subDeptGroupName != null">sub_dept_group_name,</if>
|
|
||||||
<if test="craftType != null">craft_type,</if>
|
|
||||||
<if test="craftPost != null">craft_post,</if>
|
|
||||||
<if test="inTime != null">inTime,</if>
|
|
||||||
<if test="inData != null">inData,</if>
|
|
||||||
<if test="outTime != null">outTime,</if>
|
|
||||||
<if test="outData != null">outData,</if>
|
|
||||||
<if test="deviceNo != null">deviceNo,</if>
|
|
||||||
<if test="isDel != null">is_del,</if>
|
|
||||||
<if test="subDeptId != null">sub_dept_id,</if>
|
|
||||||
<if test="subDeptName != null">sub_dept_name,</if>
|
|
||||||
<if test="comName != null">comName,</if>
|
|
||||||
<if test="projectName != null">projectName,</if>
|
|
||||||
<if test="admitGuid != null">admitGuid,</if>
|
|
||||||
<if test="eventGuid != null">eventGuid,</if>
|
|
||||||
<if test="inPhoto != null">inPhoto,</if>
|
|
||||||
<if test="outPhoto != null">outPhoto,</if>
|
|
||||||
<if test="state != null">state,</if>
|
|
||||||
<if test="remark != null">remark,</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>
|
|
||||||
<if test="source != null">source,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="comId != null">#{comId},</if>
|
|
||||||
<if test="projectId != null">#{projectId},</if>
|
|
||||||
<if test="userId != null">#{userId},</if>
|
|
||||||
<if test="userName != null">#{userName},</if>
|
|
||||||
<if test="subDeptGroup != null">#{subDeptGroup},</if>
|
|
||||||
<if test="subDeptGroupName != null">#{subDeptGroupName},</if>
|
|
||||||
<if test="craftType != null">#{craftType},</if>
|
|
||||||
<if test="craftPost != null">#{craftPost},</if>
|
|
||||||
<if test="inTime != null">#{inTime},</if>
|
|
||||||
<if test="inData != null">#{inData},</if>
|
|
||||||
<if test="outTime != null">#{outTime},</if>
|
|
||||||
<if test="outData != null">#{outData},</if>
|
|
||||||
<if test="deviceNo != null">#{deviceNo},</if>
|
|
||||||
<if test="isDel != null">#{isDel},</if>
|
|
||||||
<if test="subDeptId != null">#{subDeptId},</if>
|
|
||||||
<if test="subDeptName != null">#{subDeptName},</if>
|
|
||||||
<if test="comName != null">#{comName},</if>
|
|
||||||
<if test="projectName != null">#{projectName},</if>
|
|
||||||
<if test="admitGuid != null">#{admitGuid},</if>
|
|
||||||
<if test="eventGuid != null">#{eventGuid},</if>
|
|
||||||
<if test="inPhoto != null">#{inPhoto},</if>
|
|
||||||
<if test="outPhoto != null">#{outPhoto},</if>
|
|
||||||
<if test="state != null">#{state},</if>
|
|
||||||
<if test="remark != null">#{remark},</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>
|
|
||||||
<if test="source != null">#{source},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateProAttendanceData" parameterType="com.yanzhu.job.domain.QuartzProAttendanceData">
|
|
||||||
update attendance_ubi_data
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="comId != null">comId = #{comId},</if>
|
|
||||||
<if test="projectId != null">projectId = #{projectId},</if>
|
|
||||||
<if test="userId != null">userId = #{userId},</if>
|
|
||||||
<if test="userName != null">userName = #{userName},</if>
|
|
||||||
<if test="subDeptGroup != null">sub_dept_group = #{subDeptGroup},</if>
|
|
||||||
<if test="subDeptGroupName != null">sub_dept_group_name = #{subDeptGroupName},</if>
|
|
||||||
<if test="craftType != null">craft_type = #{craftType},</if>
|
|
||||||
<if test="craftPost != null">craft_post = #{craftPost},</if>
|
|
||||||
<if test="inTime != null">inTime = #{inTime},</if>
|
|
||||||
<if test="inData != null">inData = #{inData},</if>
|
|
||||||
<if test="outTime != null">outTime = #{outTime},</if>
|
|
||||||
<if test="outData != null">outData = #{outData},</if>
|
|
||||||
<if test="deviceNo != null">deviceNo = #{deviceNo},</if>
|
|
||||||
<if test="isDel != null">is_del = #{isDel},</if>
|
|
||||||
<if test="subDeptId != null">sub_dept_id = #{subDeptId},</if>
|
|
||||||
<if test="subDeptName != null">sub_dept_name = #{subDeptName},</if>
|
|
||||||
<if test="comName != null">comName = #{comName},</if>
|
|
||||||
<if test="projectName != null">projectName = #{projectName},</if>
|
|
||||||
<if test="admitGuid != null">admitGuid = #{admitGuid},</if>
|
|
||||||
<if test="eventGuid != null">eventGuid = #{eventGuid},</if>
|
|
||||||
<if test="inPhoto != null">inPhoto = #{inPhoto},</if>
|
|
||||||
<if test="outPhoto != null">outPhoto = #{outPhoto},</if>
|
|
||||||
<if test="state != null">state = #{state},</if>
|
|
||||||
<if test="remark != null">remark = #{remark},</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="source != null">source = #{source},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteProAttendanceDataById" parameterType="Long">
|
|
||||||
delete from attendance_ubi_data where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.QuartzProSubdeptsGroupMapper">
|
<mapper namespace="com.yanzhu.job.mapper.QuartzProSubdeptsGroupMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.QuartzProSubdeptsGroup" id="QuartzProSubdeptsGroupResult">
|
<resultMap type="QuartzProSubdeptsGroup" id="QuartzProSubdeptsGroupResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="comId" column="com_id" />
|
<result property="comId" column="com_id" />
|
||||||
<result property="comName" column="com_name" />
|
<result property="comName" column="com_name" />
|
||||||
|
|
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dept sd on sd.dept_id = psg.com_id
|
left join sys_dept sd on sd.dept_id = psg.com_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectQuartzProSubdeptsGroupList" parameterType="com.yanzhu.job.domain.QuartzProSubdeptsGroup" resultMap="QuartzProSubdeptsGroupResult">
|
<select id="selectQuartzProSubdeptsGroupList" parameterType="QuartzProSubdeptsGroup" resultMap="QuartzProSubdeptsGroupResult">
|
||||||
<include refid="selectQuartzProSubdeptsGroupVo"/>
|
<include refid="selectQuartzProSubdeptsGroupVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="comId != null "> and psg.com_id = #{comId}</if>
|
<if test="comId != null "> and psg.com_id = #{comId}</if>
|
||||||
|
|
@ -51,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectName != null and projectName != ''"> and pi.project_name = #{projectName}</if>
|
<if test="projectName != null and projectName != ''"> and pi.project_name = #{projectName}</if>
|
||||||
<if test="subDeptId != null "> and psg.sub_dept_id = #{subDeptId}</if>
|
<if test="subDeptId != null "> and psg.sub_dept_id = #{subDeptId}</if>
|
||||||
<if test="subDeptType != null and subDeptType != ''"> and psg.sub_dept_type = #{subDeptType}</if>
|
<if test="subDeptType != null and subDeptType != ''"> and psg.sub_dept_type = #{subDeptType}</if>
|
||||||
<if test="source != null and source != ''"> and psg.source = #{source}</if>
|
|
||||||
and psg.is_del != 2
|
and psg.is_del != 2
|
||||||
</where>
|
</where>
|
||||||
order by psg.id desc
|
order by psg.id desc
|
||||||
|
|
@ -62,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where psg.id = #{id}
|
where psg.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertQuartzProSubdeptsGroup" parameterType="com.yanzhu.job.domain.QuartzProSubdeptsGroup" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertQuartzProSubdeptsGroup" parameterType="QuartzProSubdeptsGroup" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into pro_project_info_subdepts_group
|
insert into pro_project_info_subdepts_group
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="comId != null">com_id,</if>
|
<if test="comId != null">com_id,</if>
|
||||||
|
|
@ -116,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateQuartzProSubdeptsGroup" parameterType="com.yanzhu.job.domain.QuartzProSubdeptsGroup">
|
<update id="updateQuartzProSubdeptsGroup" parameterType="QuartzProSubdeptsGroup">
|
||||||
update pro_project_info_subdepts_group
|
update pro_project_info_subdepts_group
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="comId != null">com_id = #{comId},</if>
|
<if test="comId != null">com_id = #{comId},</if>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.QuartzProSubdeptsMapper">
|
<mapper namespace="com.yanzhu.job.mapper.QuartzProSubdeptsMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.QuartzProSubdepts" id="QuartzProSubdeptsResult">
|
<resultMap type="QuartzProSubdepts" id="QuartzProSubdeptsResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="comId" column="com_id" />
|
<result property="comId" column="com_id" />
|
||||||
<result property="comName" column="com_name" />
|
<result property="comName" column="com_name" />
|
||||||
|
|
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dict_data sdd on sdd.dict_value = ps.sub_dept_type and sdd.dict_type = 'sub_dept_type'
|
left join sys_dict_data sdd on sdd.dict_value = ps.sub_dept_type and sdd.dict_type = 'sub_dept_type'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectQuartzProSubdeptsList" parameterType="com.yanzhu.job.domain.QuartzProSubdepts" resultMap="QuartzProSubdeptsResult">
|
<select id="selectQuartzProSubdeptsList" parameterType="QuartzProSubdepts" resultMap="QuartzProSubdeptsResult">
|
||||||
<include refid="selectQuartzProSubdeptsVo"/>
|
<include refid="selectQuartzProSubdeptsVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="comId != null "> and ps.com_id = #{comId}</if>
|
<if test="comId != null "> and ps.com_id = #{comId}</if>
|
||||||
|
|
@ -53,7 +53,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="subDeptType != null and subDeptType != ''"> and ps.sub_dept_type = #{subDeptType}</if>
|
<if test="subDeptType != null and subDeptType != ''"> and ps.sub_dept_type = #{subDeptType}</if>
|
||||||
<if test="subDeptName != null and subDeptName != ''"> and ps.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
<if test="subDeptName != null and subDeptName != ''"> and ps.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
||||||
<if test="subDeptCode != null and subDeptCode != ''"> and ps.sub_dept_code = #{subDeptCode}</if>
|
<if test="subDeptCode != null and subDeptCode != ''"> and ps.sub_dept_code = #{subDeptCode}</if>
|
||||||
<if test="source != null and source != ''"> and ps.source = #{source}</if>
|
|
||||||
and ps.is_del = 0
|
and ps.is_del = 0
|
||||||
</where>
|
</where>
|
||||||
order by ps.id desc
|
order by ps.id desc
|
||||||
|
|
@ -64,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where ps.id = #{id}
|
where ps.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertQuartzProSubdepts" parameterType="com.yanzhu.job.domain.QuartzProSubdepts" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertQuartzProSubdepts" parameterType="QuartzProSubdepts" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into pro_project_info_subdepts
|
insert into pro_project_info_subdepts
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="comId != null">com_id,</if>
|
<if test="comId != null">com_id,</if>
|
||||||
|
|
@ -122,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateQuartzProSubdepts" parameterType="com.yanzhu.job.domain.QuartzProSubdepts">
|
<update id="updateQuartzProSubdepts" parameterType="QuartzProSubdepts">
|
||||||
update pro_project_info_subdepts
|
update pro_project_info_subdepts
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="comId != null">com_id = #{comId},</if>
|
<if test="comId != null">com_id = #{comId},</if>
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.QuartzProAttendanceCfgMapper">
|
<mapper namespace="com.yanzhu.job.mapper.QuartzProjectAttendanceCfgMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.QuartzProAttendanceCfg" id="QuartzProAttendanceCfgResult">
|
<resultMap type="QuartzProjectAttendanceCfg" id="AttendanceCfgResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="comId" column="com_id" />
|
<result property="comId" column="com_id" />
|
||||||
<result property="projectId" column="project_id" />
|
<result property="projectId" column="project_id" />
|
||||||
|
|
@ -20,15 +20,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="compName" column="comp_name"/>
|
<result property="compName" column="comp_name"/>
|
||||||
<result property="projectName" column="project_name"/>
|
|
||||||
<result property="projectPackage" column="project_package"/>
|
|
||||||
<result property="deptName" column="dept_name"/>
|
<result property="deptName" column="dept_name"/>
|
||||||
|
<result property="projectName" column="project_name"/>
|
||||||
<result property="vendorsName" column="vendors_name"/>
|
<result property="vendorsName" column="vendors_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectProAttendanceCfgVo">
|
<sql id="selectAttendanceCfgVo">
|
||||||
select pac.id, pac.com_id, pac.project_id, pac.vendors_code, pac.vendors_parameter, pac.enabled, pac.state, pac.remark, pac.is_del, pac.create_by, pac.create_time, pac.update_by
|
select pac.id, pac.com_id, pac.project_id, pac.vendors_code, pac.vendors_parameter, pac.enabled, pac.state, pac.remark, pac.is_del, pac.create_by, pac.create_time, pac.update_by
|
||||||
, pac.update_time, dp.`dept_name` as comp_name, pp.`project_name`, pp.project_package as dic.`dict_label` as vendors_name, sd.sub_dept_name as dept_name, pac.dept_id
|
, pac.update_time,dp.`dept_name` comp_name,pp.`project_name`,dic.`dict_label` vendors_name,sd.sub_dept_name dept_name,pac.dept_id
|
||||||
from attendance_cfg pac
|
from attendance_cfg pac
|
||||||
left join sys_dept dp on pac.`com_id` = dp.`dept_id`
|
left join sys_dept dp on pac.`com_id` = dp.`dept_id`
|
||||||
left join pro_project_info pp on pac.`project_id` = pp.`id`
|
left join pro_project_info pp on pac.`project_id` = pp.`id`
|
||||||
|
|
@ -36,10 +35,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dict_data dic on pac.`vendors_code` = dic.`dict_value` and dic.`dict_type`='attendance_vendors'
|
left join sys_dict_data dic on pac.`vendors_code` = dic.`dict_value` and dic.`dict_type`='attendance_vendors'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectProAttendanceCfgList" parameterType="com.yanzhu.job.domain.QuartzProAttendanceCfg" resultMap="QuartzProAttendanceCfgResult">
|
<select id="selectSurProjectAttendanceCfgList" parameterType="QuartzProjectAttendanceCfg" resultMap="AttendanceCfgResult">
|
||||||
<include refid="selectProAttendanceCfgVo"/>
|
<include refid="selectAttendanceCfgVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null "> and pac.id = #{id}</if>
|
|
||||||
<if test="comId != null "> and pac.com_id = #{comId}</if>
|
<if test="comId != null "> and pac.com_id = #{comId}</if>
|
||||||
<if test="projectId != null "> and pac.project_id = #{projectId}</if>
|
<if test="projectId != null "> and pac.project_id = #{projectId}</if>
|
||||||
<if test="vendorsCode != null and vendorsCode != ''"> and pac.vendors_code = #{vendorsCode}</if>
|
<if test="vendorsCode != null and vendorsCode != ''"> and pac.vendors_code = #{vendorsCode}</if>
|
||||||
|
|
@ -49,8 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectProAttendanceCfgByCfgId" parameterType="Long" resultMap="QuartzProAttendanceCfgResult">
|
<select id="selectSurProjectAttendanceCfgListForAllInfo" parameterType="Long" resultMap="AttendanceCfgResult">
|
||||||
<include refid="selectProAttendanceCfgVo"/>
|
<include refid="selectAttendanceCfgVo"/>
|
||||||
where pac.id = #{id}
|
where pac.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,573 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.yanzhu.job.mapper.QuartzProjectAttendanceDataMapper">
|
||||||
|
|
||||||
|
<resultMap type="QuartzProjectAttendanceData" id="SurProjectAttendanceDataResult">
|
||||||
|
<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="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="deviceCode" column="device_code" />
|
||||||
|
<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,
|
||||||
|
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="findCurrentAttendanceData" parameterType="QuartzProjectAttendanceData" 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="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="QuartzProjectAttendanceData" 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 = #{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 = #{companyId}</if>
|
||||||
|
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||||
|
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</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="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="QuartzProjectAttendanceData" 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 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="QuartzProjectAttendanceData" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
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="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="deviceCode != null">device_code,</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>
|
||||||
|
<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="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="deviceCode != null">#{deviceCode},</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>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSurProjectAttendanceData" parameterType="QuartzProjectAttendanceData">
|
||||||
|
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="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="deviceCode != null">device_code = #{deviceCode},</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_${year} where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectAttendanceDataByIds" parameterType="String">
|
||||||
|
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="QuartzProjectAttendanceData" 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="QuartzProjectAttendanceData" 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 projectId in (
|
||||||
|
SELECT id FROM pro_project_info WHERE is_del=0 AND dis_dept_id = #{subDeptId}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and projectId in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="projectId!=null and projectId>0"> and projectId=#{projectId}</if>
|
||||||
|
group by workerId )
|
||||||
|
and companyTypeId in (1,2,3,4,5,6,8) group by companyTypeId
|
||||||
|
</select>
|
||||||
|
<select id="groupByComany" parameterType="QuartzProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
select g.companyTypeId,count(1) id from sur_project_attendance_user u, 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 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 pro_project_info WHERE dis_dept_id=#{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 pro_project_info WHERE dis_dept_id=#{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="QuartzProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
select g.companyTypeId,count(1) id
|
||||||
|
from sur_project_attendance_user u, attendance_cfg c,view_sur_project_attendance_group g,
|
||||||
|
pro_project_info sp
|
||||||
|
where u.cfgid=c.id and u.companyId=g.companyId and u.state=#{id} and c.project_id = sp.id
|
||||||
|
and sp.is_Del=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.dis_dept_id=#{subDeptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and sp.project_Type = #{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="QuartzProjectAttendanceData" 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.dept_type = 2 THEN '1' WHEN sd.dept_type = 3 THEN '2' WHEN sd.dept_type = 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="QuartzProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
select ady.* from sur_project_attendance_data_${year} ady
|
||||||
|
left join pro_project_info sp on sp.id = ady.projectId
|
||||||
|
where sp.is_Del=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.dis_dept_id=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and sp.project_Type = #{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="QuartzProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
select ady.* from sur_project_attendance_data_${year} ady
|
||||||
|
where ady.cfgid in (select cfg.id from 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="QuartzProjectAttendanceData" resultMap="SurProjectAttendanceDataResult">
|
||||||
|
select ady.companyTypeId,count(1) id from sur_project_attendance_data_${year} ady
|
||||||
|
where ady.cfgid in (select id from attendance_cfg where
|
||||||
|
is_del=0
|
||||||
|
<if test="projectId!=null and projectId>0">
|
||||||
|
and projectId=#{projectId}
|
||||||
|
</if>
|
||||||
|
and projectId in (select id from pro_project_info sp where sp.is_Del=0
|
||||||
|
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and sp.dis_dept_id=#{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.project_type = #{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="QuartzProjectAttendanceData" 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 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 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 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="QuartzProjectAttendanceData" resultType="Map">
|
||||||
|
select d.companyTypeId,count(1) as total from sur_project_attendance_data_${year} d
|
||||||
|
where d.cfgid in (select cfg.id from 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="QuartzProjectAttendanceData" 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 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>
|
||||||
|
|
@ -0,0 +1,233 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.yanzhu.job.mapper.QuartzProjectAttendanceGroupMapper">
|
||||||
|
|
||||||
|
<resultMap type="QuartzProjectAttendanceGroup" id="SurProjectAttendanceGroupResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="cfgid" column="cfgid" />
|
||||||
|
<result property="appId" column="app_id" />
|
||||||
|
<result property="serverid" column="serverid" />
|
||||||
|
<result property="bizLicense" column="bizLicense" />
|
||||||
|
<result property="companyCode" column="companyCode" />
|
||||||
|
<result property="companyId" column="companyId" />
|
||||||
|
<result property="companyName" column="companyName" />
|
||||||
|
<result property="companyTypeId" column="companyTypeId" />
|
||||||
|
<result property="vendorId" column="vendorId" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="leaderName" column="leaderName" />
|
||||||
|
<result property="leaderPhone" column="leaderPhone" />
|
||||||
|
<result property="teamId" column="teamId" />
|
||||||
|
<result property="teamName" column="teamName" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="leaderId" column="leaderId" />
|
||||||
|
<result property="deleted" column="deleted" />
|
||||||
|
<result property="createTimestamp" column="createTimestamp" />
|
||||||
|
<result property="platformGroupId" column="platformGroupId" />
|
||||||
|
<result property="platformTeamId" column="platformTeamId" />
|
||||||
|
<result property="enterDate" column="enterDate" />
|
||||||
|
<result property="exitDate" column="exitDate" />
|
||||||
|
<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" />
|
||||||
|
</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 view_sur_project_attendance_group
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSurProjectAttendanceGroupViewList" parameterType="QuartzProjectAttendanceGroup" resultMap="SurProjectAttendanceGroupResult">
|
||||||
|
<include refid="selectSurProjectAttendanceGroupVo"/>
|
||||||
|
<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 create_Time = #{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="selectSurProjectAttendanceGroupList" parameterType="QuartzProjectAttendanceGroup" 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 create_Time = #{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="QuartzProjectAttendanceGroup" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sur_project_attendance_group
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cfgid != null">cfgid,</if>
|
||||||
|
<if test="appId != null">app_id,</if>
|
||||||
|
<if test="serverid != null">serverid,</if>
|
||||||
|
<if test="bizLicense != null">bizLicense,</if>
|
||||||
|
<if test="companyCode != null">companyCode,</if>
|
||||||
|
<if test="companyId != null">companyId,</if>
|
||||||
|
<if test="companyName != null">companyName,</if>
|
||||||
|
<if test="companyTypeId != null">companyTypeId,</if>
|
||||||
|
<if test="vendorId != null">vendorId,</if>
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="leaderName != null">leaderName,</if>
|
||||||
|
<if test="leaderPhone != null">leaderPhone,</if>
|
||||||
|
<if test="teamId != null">teamId,</if>
|
||||||
|
<if test="teamName != null">teamName,</if>
|
||||||
|
<if test="type != null">type,</if>
|
||||||
|
<if test="leaderId != null">leaderId,</if>
|
||||||
|
<if test="deleted != null">deleted,</if>
|
||||||
|
<if test="createTimestamp != null">createTimestamp,</if>
|
||||||
|
<if test="platformGroupId != null">platformGroupId,</if>
|
||||||
|
<if test="platformTeamId != null">platformTeamId,</if>
|
||||||
|
<if test="enterDate != null">enterDate,</if>
|
||||||
|
<if test="exitDate != null">exitDate,</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 prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cfgid != null">#{cfgid},</if>
|
||||||
|
<if test="appId != null">#{appId},</if>
|
||||||
|
<if test="serverid != null">#{serverid},</if>
|
||||||
|
<if test="bizLicense != null">#{bizLicense},</if>
|
||||||
|
<if test="companyCode != null">#{companyCode},</if>
|
||||||
|
<if test="companyId != null">#{companyId},</if>
|
||||||
|
<if test="companyName != null">#{companyName},</if>
|
||||||
|
<if test="companyTypeId != null">#{companyTypeId},</if>
|
||||||
|
<if test="vendorId != null">#{vendorId},</if>
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="leaderName != null">#{leaderName},</if>
|
||||||
|
<if test="leaderPhone != null">#{leaderPhone},</if>
|
||||||
|
<if test="teamId != null">#{teamId},</if>
|
||||||
|
<if test="teamName != null">#{teamName},</if>
|
||||||
|
<if test="type != null">#{type},</if>
|
||||||
|
<if test="leaderId != null">#{leaderId},</if>
|
||||||
|
<if test="deleted != null">#{deleted},</if>
|
||||||
|
<if test="createTimestamp != null">#{createTimestamp},</if>
|
||||||
|
<if test="platformGroupId != null">#{platformGroupId},</if>
|
||||||
|
<if test="platformTeamId != null">#{platformTeamId},</if>
|
||||||
|
<if test="enterDate != null">#{enterDate},</if>
|
||||||
|
<if test="exitDate != null">#{exitDate},</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>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSurProjectAttendanceGroup" parameterType="QuartzProjectAttendanceGroup">
|
||||||
|
update sur_project_attendance_group
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="cfgid != null">cfgid = #{cfgid},</if>
|
||||||
|
<if test="appId != null">app_id = #{appId},</if>
|
||||||
|
<if test="serverid != null">serverid = #{serverid},</if>
|
||||||
|
<if test="bizLicense != null">bizLicense = #{bizLicense},</if>
|
||||||
|
<if test="companyCode != null">companyCode = #{companyCode},</if>
|
||||||
|
<if test="companyId != null">companyId = #{companyId},</if>
|
||||||
|
<if test="companyName != null">companyName = #{companyName},</if>
|
||||||
|
<if test="companyTypeId != null">companyTypeId = #{companyTypeId},</if>
|
||||||
|
<if test="vendorId != null">vendorId = #{vendorId},</if>
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="leaderName != null">leaderName = #{leaderName},</if>
|
||||||
|
<if test="leaderPhone != null">leaderPhone = #{leaderPhone},</if>
|
||||||
|
<if test="teamId != null">teamId = #{teamId},</if>
|
||||||
|
<if test="teamName != null">teamName = #{teamName},</if>
|
||||||
|
<if test="type != null">type = #{type},</if>
|
||||||
|
<if test="leaderId != null">leaderId = #{leaderId},</if>
|
||||||
|
<if test="deleted != null">deleted = #{deleted},</if>
|
||||||
|
<if test="createTimestamp != null">createTimestamp = #{createTimestamp},</if>
|
||||||
|
<if test="platformGroupId != null">platformGroupId = #{platformGroupId},</if>
|
||||||
|
<if test="platformTeamId != null">platformTeamId = #{platformTeamId},</if>
|
||||||
|
<if test="enterDate != null">enterDate = #{enterDate},</if>
|
||||||
|
<if test="exitDate != null">exitDate = #{exitDate},</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>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectAttendanceGroupById" parameterType="Long">
|
||||||
|
delete from sur_project_attendance_group where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectAttendanceGroupByIds" parameterType="String">
|
||||||
|
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>
|
||||||
|
|
@ -0,0 +1,740 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.yanzhu.job.mapper.QuartzProjectAttendanceUserMapper">
|
||||||
|
|
||||||
|
<resultMap type="QuartzProjectAttendanceUser" id="SurProjectAttendanceUserResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="cfgid" column="cfgid" />
|
||||||
|
<result property="appId" column="app_id" />
|
||||||
|
<result property="vendorsCode" column="vendors_code" />
|
||||||
|
<result property="workerId" column="workerId" />
|
||||||
|
<result property="laborWorkerId" column="laborWorkerId" />
|
||||||
|
<result property="workerCategory" column="workerCategory" />
|
||||||
|
<result property="qrCode" column="qrCode" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="ethnic" column="ethnic" />
|
||||||
|
<result property="nativePlace" column="nativePlace" />
|
||||||
|
<result property="gender" column="gender" />
|
||||||
|
<result property="birthDate" column="birthDate" />
|
||||||
|
<result property="phone" column="phone" />
|
||||||
|
<result property="degreeName" column="degreeName" />
|
||||||
|
<result property="photo" column="photo" />
|
||||||
|
<result property="recentPhoto" column="recentPhoto" />
|
||||||
|
<result property="groupId" column="groupId" />
|
||||||
|
<result property="groupName" column="groupName" />
|
||||||
|
<result property="leader" column="leader" />
|
||||||
|
<result property="workTypeCode" column="workTypeCode" />
|
||||||
|
<result property="workTypeName" column="workTypeName" />
|
||||||
|
<result property="specWorkType" column="specWorkType" />
|
||||||
|
<result property="hatCode" column="hatCode" />
|
||||||
|
<result property="state" column="state" />
|
||||||
|
<result property="enterDate" column="enterDate" />
|
||||||
|
<result property="exitDate" column="exitDate" />
|
||||||
|
<result property="companyId" column="companyId" />
|
||||||
|
<result property="companyName" column="companyName" />
|
||||||
|
<result property="vendorId" column="vendorId" />
|
||||||
|
<result property="teamId" column="teamId" />
|
||||||
|
<result property="teamName" column="teamName" />
|
||||||
|
<result property="enterType" column="enterType" />
|
||||||
|
<result property="other" column="other" />
|
||||||
|
<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="projectId" column="project_id"/>
|
||||||
|
<result property="subDeptId" column="sub_dept_id"/>
|
||||||
|
<result property="companyTypeId" column="companyTypeId"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSurProjectAttendanceUserVo">
|
||||||
|
SELECT * FROM (
|
||||||
|
SELECT a.*,b.project_id,b.dept_id
|
||||||
|
FROM sur_project_attendance_user a,attendance_cfg b
|
||||||
|
WHERE a.cfgid=b.id )
|
||||||
|
sur_project_attendance_user
|
||||||
|
</sql>
|
||||||
|
<select id="selectSurProjectAttendanceUserListJgw" parameterType="QuartzProjectAttendanceUser" 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.dept_id,u.companyName,u.workTypeName,g.teamname groupName,g.companyName remark
|
||||||
|
FROM sur_project_attendance_user u,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.dept_id = #{subDeptId}</if>
|
||||||
|
<if test="isDel != null "> and u.is_del = #{isDel}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="querySurProjectAttendanceUserList" parameterType="QuartzProjectAttendanceUser" 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.dept_id,g.companyTypeId,g.companyName as remark
|
||||||
|
FROM sur_project_attendance_user a,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 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 dept_id = #{subDeptId}</if>
|
||||||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectSurProjectAttendanceUserList" parameterType="QuartzProjectAttendanceUser" 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 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="QuartzProjectAttendanceUser" 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="QuartzProjectAttendanceUser" 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="QuartzProjectAttendanceUser" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sur_project_attendance_user
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cfgid != null">cfgid,</if>
|
||||||
|
<if test="appId != null">app_id,</if>
|
||||||
|
<if test="vendorsCode != null">vendors_code,</if>
|
||||||
|
<if test="workerId != null">workerId,</if>
|
||||||
|
<if test="laborWorkerId != null">laborWorkerId,</if>
|
||||||
|
<if test="workerCategory != null">workerCategory,</if>
|
||||||
|
<if test="qrCode != null">qrCode,</if>
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="ethnic != null">ethnic,</if>
|
||||||
|
<if test="nativePlace != null">nativePlace,</if>
|
||||||
|
<if test="gender != null">gender,</if>
|
||||||
|
<if test="birthDate != null">birthDate,</if>
|
||||||
|
<if test="phone != null and phone != ''">phone,</if>
|
||||||
|
<if test="degreeName != null">degreeName,</if>
|
||||||
|
<if test="photo != null">photo,</if>
|
||||||
|
<if test="recentPhoto != null">recentPhoto,</if>
|
||||||
|
<if test="groupId != null">groupId,</if>
|
||||||
|
<if test="groupName != null">groupName,</if>
|
||||||
|
<if test="leader != null">leader,</if>
|
||||||
|
<if test="workTypeCode != null">workTypeCode,</if>
|
||||||
|
<if test="workTypeName != null">workTypeName,</if>
|
||||||
|
<if test="specWorkType != null">specWorkType,</if>
|
||||||
|
<if test="hatCode != null">hatCode,</if>
|
||||||
|
<if test="state != null">state,</if>
|
||||||
|
<if test="enterDate != null">enterDate,</if>
|
||||||
|
<if test="exitDate != null">exitDate,</if>
|
||||||
|
<if test="companyId != null">companyId,</if>
|
||||||
|
<if test="companyName != null">companyName,</if>
|
||||||
|
<if test="vendorId != null">vendorId,</if>
|
||||||
|
<if test="teamId != null">teamId,</if>
|
||||||
|
<if test="teamName != null">teamName,</if>
|
||||||
|
<if test="enterType != null">enterType,</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 prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cfgid != null">#{cfgid},</if>
|
||||||
|
<if test="appId != null">#{appId},</if>
|
||||||
|
<if test="vendorsCode != null">#{vendorsCode},</if>
|
||||||
|
<if test="workerId != null">#{workerId},</if>
|
||||||
|
<if test="laborWorkerId != null">#{laborWorkerId},</if>
|
||||||
|
<if test="workerCategory != null">#{workerCategory},</if>
|
||||||
|
<if test="qrCode != null">#{qrCode},</if>
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="ethnic != null">#{ethnic},</if>
|
||||||
|
<if test="nativePlace != null">#{nativePlace},</if>
|
||||||
|
<if test="gender != null">#{gender},</if>
|
||||||
|
<if test="birthDate != null">#{birthDate},</if>
|
||||||
|
<if test="phone != null and phone != ''">#{phone},</if>
|
||||||
|
<if test="degreeName != null">#{degreeName},</if>
|
||||||
|
<if test="photo != null">#{photo},</if>
|
||||||
|
<if test="recentPhoto != null">#{recentPhoto},</if>
|
||||||
|
<if test="groupId != null">#{groupId},</if>
|
||||||
|
<if test="groupName != null">#{groupName},</if>
|
||||||
|
<if test="leader != null">#{leader},</if>
|
||||||
|
<if test="workTypeCode != null">#{workTypeCode},</if>
|
||||||
|
<if test="workTypeName != null">#{workTypeName},</if>
|
||||||
|
<if test="specWorkType != null">#{specWorkType},</if>
|
||||||
|
<if test="hatCode != null">#{hatCode},</if>
|
||||||
|
<if test="state != null">#{state},</if>
|
||||||
|
<if test="enterDate != null">#{enterDate},</if>
|
||||||
|
<if test="exitDate != null">#{exitDate},</if>
|
||||||
|
<if test="companyId != null">#{companyId},</if>
|
||||||
|
<if test="companyName != null">#{companyName},</if>
|
||||||
|
<if test="vendorId != null">#{vendorId},</if>
|
||||||
|
<if test="teamId != null">#{teamId},</if>
|
||||||
|
<if test="teamName != null">#{teamName},</if>
|
||||||
|
<if test="enterType != null">#{enterType},</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>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSurProjectAttendanceUser" parameterType="QuartzProjectAttendanceUser">
|
||||||
|
update sur_project_attendance_user
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="cfgid != null">cfgid = #{cfgid},</if>
|
||||||
|
<if test="appId != null">app_id = #{appId},</if>
|
||||||
|
<if test="vendorsCode != null">vendors_code = #{vendorsCode},</if>
|
||||||
|
<if test="workerId != null">workerId = #{workerId},</if>
|
||||||
|
<if test="laborWorkerId != null">laborWorkerId = #{laborWorkerId},</if>
|
||||||
|
<if test="workerCategory != null">workerCategory = #{workerCategory},</if>
|
||||||
|
<if test="qrCode != null">qrCode = #{qrCode},</if>
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="ethnic != null">ethnic = #{ethnic},</if>
|
||||||
|
<if test="nativePlace != null">nativePlace = #{nativePlace},</if>
|
||||||
|
<if test="gender != null">gender = #{gender},</if>
|
||||||
|
<if test="birthDate != null">birthDate = #{birthDate},</if>
|
||||||
|
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||||
|
<if test="degreeName != null">degreeName = #{degreeName},</if>
|
||||||
|
<if test="photo != null">photo = #{photo},</if>
|
||||||
|
<if test="recentPhoto != null">recentPhoto = #{recentPhoto},</if>
|
||||||
|
<if test="groupId != null">groupId = #{groupId},</if>
|
||||||
|
<if test="groupName != null">groupName = #{groupName},</if>
|
||||||
|
<if test="leader != null">leader = #{leader},</if>
|
||||||
|
<if test="workTypeCode != null">workTypeCode = #{workTypeCode},</if>
|
||||||
|
<if test="workTypeName != null">workTypeName = #{workTypeName},</if>
|
||||||
|
<if test="specWorkType != null">specWorkType = #{specWorkType},</if>
|
||||||
|
<if test="hatCode != null">hatCode = #{hatCode},</if>
|
||||||
|
<if test="state != null">state = #{state},</if>
|
||||||
|
<if test="enterDate != null">enterDate = #{enterDate},</if>
|
||||||
|
<if test="exitDate != null">exitDate = #{exitDate},</if>
|
||||||
|
<if test="companyId != null">companyId = #{companyId},</if>
|
||||||
|
<if test="companyName != null">companyName = #{companyName},</if>
|
||||||
|
<if test="vendorId != null">vendorId = #{vendorId},</if>
|
||||||
|
<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 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>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectAttendanceUserById" parameterType="Long">
|
||||||
|
delete from sur_project_attendance_user where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSurProjectAttendanceUserByIds" parameterType="String">
|
||||||
|
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>
|
||||||
|
|
||||||
|
<select id="countAttendance" resultType="Long" parameterType="QuartzProjectAttendanceCfg">
|
||||||
|
select count(1) cnt from sur_project_attendance_user u, 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 attendance_cfg WHERE project_id=#{projectId} AND dept_id=#{deptId}
|
||||||
|
) group by workerid
|
||||||
|
)
|
||||||
|
</select>
|
||||||
|
<select id="queryAttendanceByUserIds" parameterType="QuartzProjectAttendanceUser" 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="QuartzProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||||
|
|
||||||
|
select u.* from sur_project_attendance_user u, 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 attendance_cfg WHERE project_id=#{projectId} AND dept_id=#{subDeptId}
|
||||||
|
) group by workerid
|
||||||
|
)
|
||||||
|
order by u.id limit #{index},#{size}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="countTodayAttendance" resultType="Long" parameterType="QuartzProjectAttendanceUser">
|
||||||
|
select count(1) cnt from sur_project_attendance_user u, 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 pro_project_info WHERE dis_dept_id=#{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="todayAttendance" parameterType="QuartzProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||||
|
|
||||||
|
select u.* from sur_project_attendance_user u, 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 pro_project_info WHERE dis_dept_id=#{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="QuartzProjectAttendanceUser" 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,
|
||||||
|
u.companyName,u.workTypeName,u.groupName,
|
||||||
|
b.project_id,b.dept_id, g.teamname remark,g.companyName degreeName
|
||||||
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
||||||
|
WHERE u.cfgid=b.id and u.state=0 and u.companyId=g.companyId and sp.is_Del=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.dis_dept_id=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and sp.project_Type = #{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="QuartzProjectAttendanceUser" 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,
|
||||||
|
u.companyName,u.workTypeName,u.groupName,
|
||||||
|
b.project_id,b.dept_id, g.teamname remark,g.companyName degreeName,g.companyTypeId
|
||||||
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
||||||
|
WHERE u.cfgid=b.id and u.companyId=g.companyId and sp.is_Del=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="QuartzProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||||
|
SELECT p.id, p.project_name NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
||||||
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info 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.dept_id
|
||||||
|
and p.is_Del=0
|
||||||
|
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and p.dis_dept_id=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and p.project_Type = #{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.project_Name,c.dept_name,g.companyTypeId,p.id
|
||||||
|
order by p.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="groupUserByParams" parameterType="QuartzProjectAttendanceUser" 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 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 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 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="QuartzProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||||
|
SELECT p.id, p.project_Name NAME,c.dept_name groupName,g.companyTypeId companyId,COUNT(1) cfgid
|
||||||
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info 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.dept_id
|
||||||
|
and p.is_Del=0
|
||||||
|
and g.companyTypeId in (1,6,0,2,3,4,5,8)
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and p.dis_dept_id=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and p.project_Type = #{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.project_Name,c.dept_name,g.companyTypeId,p.id
|
||||||
|
order by p.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryWorkerByState" parameterType="QuartzProjectAttendanceUser" 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,
|
||||||
|
u.companyName,u.workTypeName,u.groupName,
|
||||||
|
b.project_id,b.dept_id, g.teamname remark,g.companyName degreeName
|
||||||
|
FROM sur_project_attendance_user u,attendance_cfg b,view_sur_project_attendance_group g,pro_project_info sp
|
||||||
|
WHERE u.cfgid=b.id and u.state=#{state} and u.companyId=g.companyId and sp.is_Del=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.dis_dept_id=#{deptId}
|
||||||
|
</if>
|
||||||
|
<if test='proType != null and proType != "" and proType != "0"'> and sp.project_Type = #{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>
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.QuartzProSubdeptsUsersMapper">
|
<mapper namespace="com.yanzhu.job.mapper.QuartzProSubdeptsUsersMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.QuartzProSubdeptsUsers" id="QuartzProSubdeptsUsersResult">
|
<resultMap type="QuartzProSubdeptsUsers" id="QuartzProSubdeptsUsersResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="parId" column="par_id" />
|
<result property="parId" column="par_id" />
|
||||||
<result property="comId" column="com_id" />
|
<result property="comId" column="com_id" />
|
||||||
|
|
@ -56,10 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectQuartzProSubdeptsUsersVo">
|
<sql id="selectQuartzProSubdeptsUsersVo">
|
||||||
select psu.id, psu.par_id, psu.com_id, sd.dept_name as com_name, psu.project_id, pi.project_name, psu.sub_dept_id, psu.sub_dept_type, dic3.dict_label as sub_dept_type_name, pdept.sub_dept_name, psu.sub_dept_power_path, psu.user_id, psu.user_post, psu.sub_dept_group,
|
select psu.id, psu.par_id, psu.com_id, psu.project_id, pi.project_name, psu.sub_dept_id, psu.sub_dept_type, dic3.dict_label as sub_dept_type_name, pdept.sub_dept_name, psu.sub_dept_power_path, psu.user_id, psu.user_post, psu.sub_dept_group,
|
||||||
psu.sub_dept_group_name, psu.user_name, psu.card_type, psu.card_code, psu.user_sex, psu.user_picture, psu.user_phone, psu.degree_grade, dic4.dict_label as degree_grade_name, psu.user_infos, psu.craft_type, dic1.dict_label as craft_type_name, psu.craft_post, dic2.dict_label as craft_post_name, psu.edu_status, psu.edu_file_path, psu.edu_date, psu.approve_status,
|
psu.sub_dept_group_name, psu.user_name, psu.card_type, psu.card_code, psu.user_sex, psu.user_picture, psu.user_phone, psu.degree_grade, dic4.dict_label as degree_grade_name, psu.user_infos, psu.craft_type, dic1.dict_label as craft_type_name, psu.craft_post, dic2.dict_label as craft_post_name, psu.edu_status, psu.edu_file_path, psu.edu_date, psu.approve_status,
|
||||||
psu.use_date, psu.use_status, psu.admit_guid, psu.qr_code, psu.sub_step, psu.illness_status, psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time,
|
psu.use_date, psu.use_status, psu.admit_guid, psu.qr_code, psu.sub_step, psu.illness_status, psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time,
|
||||||
psu.remark, psu.face_guid, psu.source, psu.work_type
|
psu.remark, psu.face_guid, psu.source, sd.dept_name com_name,psu.work_type
|
||||||
from pro_project_info_subdepts_users psu
|
from pro_project_info_subdepts_users psu
|
||||||
left join pro_project_info pi on pi.id = psu.project_id
|
left join pro_project_info pi on pi.id = psu.project_id
|
||||||
left join pro_project_info_subdepts pdept on psu.sub_dept_id=pdept.id
|
left join pro_project_info_subdepts pdept on psu.sub_dept_id=pdept.id
|
||||||
|
|
@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dict_data dic4 on psu.`degree_grade`=dic4.`dict_value` and dic4.`dict_type`='educational_type'
|
left join sys_dict_data dic4 on psu.`degree_grade`=dic4.`dict_value` and dic4.`dict_type`='educational_type'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectQuartzProSubdeptsUsersList" parameterType="com.yanzhu.job.domain.QuartzProSubdeptsUsers" resultMap="QuartzProSubdeptsUsersResult">
|
<select id="selectQuartzProSubdeptsUsersList" parameterType="QuartzProSubdeptsUsers" resultMap="QuartzProSubdeptsUsersResult">
|
||||||
<include refid="selectQuartzProSubdeptsUsersVo"/>
|
<include refid="selectQuartzProSubdeptsUsersVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="comId != null "> and psu.com_id = #{comId}</if>
|
<if test="comId != null "> and psu.com_id = #{comId}</if>
|
||||||
|
|
@ -97,7 +97,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="userPhone != null and userPhone != ''"> and psu.user_phone = #{userPhone}</if>
|
<if test="userPhone != null and userPhone != ''"> and psu.user_phone = #{userPhone}</if>
|
||||||
<if test='activeTags == "finished"'> and psu.approve_status <![CDATA[ >= ]]> 100 </if>
|
<if test='activeTags == "finished"'> and psu.approve_status <![CDATA[ >= ]]> 100 </if>
|
||||||
<if test="isDel != null "> and psu.is_del = #{isDel}</if>
|
<if test="isDel != null "> and psu.is_del = #{isDel}</if>
|
||||||
<if test="source != null and source != ''"> and psu.source = #{source}</if>
|
|
||||||
and psu.is_del != 2
|
and psu.is_del != 2
|
||||||
</where>
|
</where>
|
||||||
order by psu.id desc
|
order by psu.id desc
|
||||||
|
|
@ -113,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where psu.project_id = #{proId} and psu.user_id = #{userId}
|
where psu.project_id = #{proId} and psu.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertQuartzProSubdeptsUsers" parameterType="com.yanzhu.job.domain.QuartzProSubdeptsUsers" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertQuartzProSubdeptsUsers" parameterType="QuartzProSubdeptsUsers" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into pro_project_info_subdepts_users
|
insert into pro_project_info_subdepts_users
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="parId != null">par_id,</if>
|
<if test="parId != null">par_id,</if>
|
||||||
|
|
@ -203,7 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateQuartzProSubdeptsUsers" parameterType="com.yanzhu.job.domain.QuartzProSubdeptsUsers">
|
<update id="updateQuartzProSubdeptsUsers" parameterType="QuartzProSubdeptsUsers">
|
||||||
update pro_project_info_subdepts_users
|
update pro_project_info_subdepts_users
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="parId != null">par_id = #{parId},</if>
|
<if test="parId != null">par_id = #{parId},</if>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.SysApplyConfigMapper">
|
<mapper namespace="com.yanzhu.job.mapper.SysApplyConfigMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.SysApplyConfig" id="SysApplyConfigResult">
|
<resultMap type="SysApplyConfig" id="SysApplyConfigResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="cfgType" column="cfg_type" />
|
<result property="cfgType" column="cfg_type" />
|
||||||
<result property="cfgId" column="cfg_id" />
|
<result property="cfgId" column="cfg_id" />
|
||||||
|
|
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dept sd on sac.dept_id = sd.dept_id
|
left join sys_dept sd on sac.dept_id = sd.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSysApplyConfigList" parameterType="com.yanzhu.job.domain.SysApplyConfig" resultMap="SysApplyConfigResult">
|
<select id="selectSysApplyConfigList" parameterType="SysApplyConfig" resultMap="SysApplyConfigResult">
|
||||||
<include refid="selectSysApplyConfigVo"/>
|
<include refid="selectSysApplyConfigVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="cfgId != null "> and sac.cfg_id = #{cfgId}</if>
|
<if test="cfgId != null "> and sac.cfg_id = #{cfgId}</if>
|
||||||
|
|
@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where sac.id = #{id}
|
where sac.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSysApplyConfig" parameterType="com.yanzhu.job.domain.SysApplyConfig">
|
<insert id="insertSysApplyConfig" parameterType="SysApplyConfig">
|
||||||
insert into sys_apply_config
|
insert into sys_apply_config
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">id,</if>
|
<if test="id != null">id,</if>
|
||||||
|
|
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSysApplyConfig" parameterType="com.yanzhu.job.domain.SysApplyConfig">
|
<update id="updateSysApplyConfig" parameterType="SysApplyConfig">
|
||||||
update sys_apply_config
|
update sys_apply_config
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="cfgType != null">cfg_type = #{cfgType},</if>
|
<if test="cfgType != null">cfg_type = #{cfgType},</if>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.SysJobLogMapper">
|
<mapper namespace="com.yanzhu.job.mapper.SysJobLogMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.SysJobLog" id="SysJobLogResult">
|
<resultMap type="SysJobLog" id="SysJobLogResult">
|
||||||
<id property="jobLogId" column="job_log_id" />
|
<id property="jobLogId" column="job_log_id" />
|
||||||
<result property="jobName" column="job_name" />
|
<result property="jobName" column="job_name" />
|
||||||
<result property="jobGroup" column="job_group" />
|
<result property="jobGroup" column="job_group" />
|
||||||
|
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_job_log
|
from sys_job_log
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectJobLogList" parameterType="com.yanzhu.job.domain.SysJobLog" resultMap="SysJobLogResult">
|
<select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult">
|
||||||
<include refid="selectJobLogVo"/>
|
<include refid="selectJobLogVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="jobName != null and jobName != ''">
|
<if test="jobName != null and jobName != ''">
|
||||||
|
|
@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
truncate table sys_job_log
|
truncate table sys_job_log
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertJobLog" parameterType="com.yanzhu.job.domain.SysJobLog">
|
<insert id="insertJobLog" parameterType="SysJobLog">
|
||||||
insert into sys_job_log(
|
insert into sys_job_log(
|
||||||
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
|
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
|
||||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.SysJobMapper">
|
<mapper namespace="com.yanzhu.job.mapper.SysJobMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.SysJob" id="SysJobResult">
|
<resultMap type="SysJob" id="SysJobResult">
|
||||||
<id property="jobId" column="job_id" />
|
<id property="jobId" column="job_id" />
|
||||||
<result property="jobName" column="job_name" />
|
<result property="jobName" column="job_name" />
|
||||||
<result property="jobGroup" column="job_group" />
|
<result property="jobGroup" column="job_group" />
|
||||||
|
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_job
|
from sys_job
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectJobList" parameterType="com.yanzhu.job.domain.SysJob" resultMap="SysJobResult">
|
<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
|
||||||
<include refid="selectJobVo"/>
|
<include refid="selectJobVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="jobName != null and jobName != ''">
|
<if test="jobName != null and jobName != ''">
|
||||||
|
|
@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<update id="updateJob" parameterType="com.yanzhu.job.domain.SysJob">
|
<update id="updateJob" parameterType="SysJob">
|
||||||
update sys_job
|
update sys_job
|
||||||
<set>
|
<set>
|
||||||
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
|
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
|
||||||
|
|
@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where job_id = #{jobId}
|
where job_id = #{jobId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertJob" parameterType="com.yanzhu.job.domain.SysJob" useGeneratedKeys="true" keyProperty="jobId">
|
<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
|
||||||
insert into sys_job(
|
insert into sys_job(
|
||||||
<if test="jobId != null and jobId != 0">job_id,</if>
|
<if test="jobId != null and jobId != 0">job_id,</if>
|
||||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.yanzhu.job.mapper.SysNativeMapper">
|
<mapper namespace="com.yanzhu.job.mapper.SysNativeMapper">
|
||||||
|
|
||||||
<resultMap type="com.yanzhu.job.domain.SysNative" id="SysNativeResult">
|
<resultMap type="SysNative" id="SysNativeResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address" />
|
||||||
<result property="provinces" column="provinces" />
|
<result property="provinces" column="provinces" />
|
||||||
|
|
@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectSysNativeListById" parameterType="Long" resultMap="SysNativeResult">
|
<select id="selectSysNativeListById" parameterType="Long" resultMap="SysNativeResult">
|
||||||
select * from sys_native where id = #{id}
|
SELECT * FROM sys_native WHERE id=#{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -17,8 +17,8 @@ import com.yanzhu.common.security.annotation.InnerAuth;
|
||||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||||
import com.yanzhu.common.core.enums.SubDeptsEnums;
|
import com.yanzhu.manage.enums.SubDeptsEnums;
|
||||||
import com.yanzhu.common.core.enums.UserPostEnums;
|
import com.yanzhu.manage.enums.UserPostEnums;
|
||||||
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
|
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
|
||||||
import com.yanzhu.manage.service.IUniService;
|
import com.yanzhu.manage.service.IUniService;
|
||||||
import com.yanzhu.security.utils.DictUtils;
|
import com.yanzhu.security.utils.DictUtils;
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,10 @@ import com.yanzhu.common.core.web.page.TableDataInfo;
|
||||||
import com.yanzhu.common.log.annotation.Log;
|
import com.yanzhu.common.log.annotation.Log;
|
||||||
import com.yanzhu.common.log.enums.BusinessType;
|
import com.yanzhu.common.log.enums.BusinessType;
|
||||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
import com.yanzhu.device.domain.DevTowerProjectConfig;
|
import com.yanzhu.device.domain.DevTowerProjectConfig;
|
||||||
import com.yanzhu.manage.service.IDevTowerProjectConfigService;
|
import com.yanzhu.manage.service.IDevTowerProjectConfigService;
|
||||||
|
import com.yanzhu.system.api.domain.SysUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
@ -36,6 +38,12 @@ public class DevTowerProjectConfigController extends BaseController
|
||||||
public TableDataInfo list(DevTowerProjectConfig where)
|
public TableDataInfo list(DevTowerProjectConfig where)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
|
SysUser sysUser=SecurityUtils.getLoginUser().getSysUser();
|
||||||
|
where.setComId(sysUser.getActiveComId());
|
||||||
|
where.setProjectId(sysUser.getActiveProjectId());
|
||||||
|
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
||||||
|
where.setProjectId(null);
|
||||||
|
}
|
||||||
List<DevTowerProjectConfig> list = devTowerProjectConfigService.selectDevTowerProjectConfigList(where);
|
List<DevTowerProjectConfig> list = devTowerProjectConfigService.selectDevTowerProjectConfigList(where);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,11 @@ import com.yanzhu.common.core.web.controller.BaseController;
|
||||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
import com.yanzhu.manage.domain.*;
|
import com.yanzhu.manage.domain.*;
|
||||||
import com.yanzhu.common.core.enums.SubDeptsEnums;
|
import com.yanzhu.manage.enums.SubDeptsEnums;
|
||||||
import com.yanzhu.common.core.enums.UserPostEnums;
|
import com.yanzhu.manage.enums.UserPostEnums;
|
||||||
import com.yanzhu.manage.service.*;
|
import com.yanzhu.manage.service.*;
|
||||||
import com.yanzhu.security.utils.DictUtils;
|
import com.yanzhu.security.utils.DictUtils;
|
||||||
|
import com.yanzhu.system.api.domain.SysUser;
|
||||||
import com.yanzhu.system.api.model.LoginUser;
|
import com.yanzhu.system.api.model.LoginUser;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.yanzhu.common.core.enums;
|
package com.yanzhu.manage.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工种岗位枚举
|
* 工种岗位枚举
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.yanzhu.common.core.enums;
|
package com.yanzhu.manage.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工种类型
|
* 工种类型
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.yanzhu.common.core.enums;
|
package com.yanzhu.manage.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单位班组枚举
|
* 单位班组枚举
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.yanzhu.common.core.enums;
|
package com.yanzhu.manage.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单位类型枚举
|
* 单位类型枚举
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.yanzhu.common.core.enums;
|
package com.yanzhu.manage.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户岗位
|
* 用户岗位
|
||||||
|
|
@ -8,17 +8,20 @@ import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.yanzhu.common.core.context.SecurityContextHolder;
|
import com.yanzhu.common.core.context.SecurityContextHolder;
|
||||||
import com.yanzhu.common.core.enums.ShiFouEnums;
|
import com.yanzhu.common.core.enums.ShiFouEnums;
|
||||||
|
import com.yanzhu.common.core.enums.UserTypeEnums;
|
||||||
import com.yanzhu.common.core.utils.DateUtils;
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
import com.yanzhu.common.core.utils.StringUtils;
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
import com.yanzhu.manage.domain.AttendanceUbiData;
|
import com.yanzhu.manage.domain.AttendanceUbiData;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||||
import com.yanzhu.common.core.enums.SubDeptsEnums;
|
import com.yanzhu.manage.domain.SurProjectAttendanceData;
|
||||||
import com.yanzhu.common.core.enums.UserPostEnums;
|
import com.yanzhu.manage.enums.SubDeptsEnums;
|
||||||
|
import com.yanzhu.manage.enums.UserPostEnums;
|
||||||
import com.yanzhu.manage.mapper.AttendanceUbiDataMapper;
|
import com.yanzhu.manage.mapper.AttendanceUbiDataMapper;
|
||||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
||||||
import com.yanzhu.manage.service.IAttendanceUbiDataService;
|
import com.yanzhu.manage.service.IAttendanceUbiDataService;
|
||||||
import com.yanzhu.system.api.domain.SysDictData;
|
import com.yanzhu.system.api.domain.SysDictData;
|
||||||
|
import com.yanzhu.system.api.domain.SysUser;
|
||||||
import com.yanzhu.system.mapper.SysDictDataMapper;
|
import com.yanzhu.system.mapper.SysDictDataMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import com.yanzhu.common.core.utils.DateUtils;
|
||||||
import com.yanzhu.common.core.utils.StringUtils;
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
import com.yanzhu.manage.domain.*;
|
import com.yanzhu.manage.domain.*;
|
||||||
import com.yanzhu.common.core.enums.CraftTypeEnums;
|
import com.yanzhu.manage.enums.CraftTypeEnums;
|
||||||
import com.yanzhu.manage.mapper.BusExamInfoMapper;
|
import com.yanzhu.manage.mapper.BusExamInfoMapper;
|
||||||
import com.yanzhu.manage.mapper.BusExamQuestionMapper;
|
import com.yanzhu.manage.mapper.BusExamQuestionMapper;
|
||||||
import com.yanzhu.manage.mapper.BusExamUserMapper;
|
import com.yanzhu.manage.mapper.BusExamUserMapper;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ import com.yanzhu.system.api.domain.SysRole;
|
||||||
import com.yanzhu.system.api.domain.SysRoleDept;
|
import com.yanzhu.system.api.domain.SysRoleDept;
|
||||||
import com.yanzhu.system.api.domain.SysUser;
|
import com.yanzhu.system.api.domain.SysUser;
|
||||||
import net.sourceforge.pinyin4j.PinyinHelper;
|
import net.sourceforge.pinyin4j.PinyinHelper;
|
||||||
|
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
|
||||||
|
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -368,23 +370,24 @@ public class ProProjectInfoServiceImpl implements IProProjectInfoService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String projectPackage(String name,Long deptId){
|
private String projectPackage(String name,Long deptId){
|
||||||
StringBuilder firstLetters = new StringBuilder();
|
// 设置不带声调的输出选项
|
||||||
for (int i = 0; i < name.length(); i++) {
|
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
|
||||||
char ch = name.charAt(i);
|
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
|
||||||
if (Character.isWhitespace(ch)) {
|
|
||||||
continue; // 跳过空格
|
StringBuilder output = new StringBuilder();
|
||||||
}
|
for (char c : name.toCharArray()) {
|
||||||
// 获取拼音首字母
|
try {
|
||||||
String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(ch);
|
String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(c, format);
|
||||||
if (pinyinArray != null) {
|
if (pinyinArray != null && pinyinArray.length > 0) {
|
||||||
// 取拼音的首字母并转为大写
|
output.append(pinyinArray[0]);
|
||||||
firstLetters.append(pinyinArray[0].charAt(0));
|
|
||||||
} else {
|
} else {
|
||||||
// 如果是非汉字字符,直接添加
|
output.append(c);
|
||||||
firstLetters.append(ch);
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
output.append(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
firstLetters.append("_"+deptId);
|
output.append("_"+deptId);
|
||||||
return firstLetters.toString();
|
return output.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.yanzhu.manage.service.impl;
|
package com.yanzhu.manage.service.impl;
|
||||||
|
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
|
import com.yanzhu.common.core.annotation.Excel;
|
||||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
import com.yanzhu.common.core.enums.*;
|
import com.yanzhu.common.core.enums.*;
|
||||||
import com.yanzhu.common.core.exception.ServiceException;
|
import com.yanzhu.common.core.exception.ServiceException;
|
||||||
|
|
@ -11,7 +12,7 @@ import com.yanzhu.manage.config.ProfileConfig;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||||
import com.yanzhu.common.core.enums.UserPostEnums;
|
import com.yanzhu.manage.enums.UserPostEnums;
|
||||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
|
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
|
||||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
|
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
|
||||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package com.yanzhu.manage.service.impl;
|
package com.yanzhu.manage.service.impl;
|
||||||
|
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.yanzhu.common.core.constant.CacheConstants;
|
import com.yanzhu.common.core.constant.CacheConstants;
|
||||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
import com.yanzhu.common.core.domain.R;
|
import com.yanzhu.common.core.domain.R;
|
||||||
import com.yanzhu.common.core.enums.*;
|
import com.yanzhu.common.core.enums.*;
|
||||||
import com.yanzhu.common.core.exception.ServiceException;
|
import com.yanzhu.common.core.exception.ServiceException;
|
||||||
|
import com.yanzhu.common.core.text.Convert;
|
||||||
import com.yanzhu.common.core.utils.DateUtils;
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
import com.yanzhu.common.core.utils.StringUtils;
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
import com.yanzhu.common.redis.service.RedisService;
|
import com.yanzhu.common.redis.service.RedisService;
|
||||||
|
|
@ -15,6 +17,7 @@ import com.yanzhu.manage.domain.ProProjectInfo;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||||
|
import com.yanzhu.manage.enums.*;
|
||||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
|
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
|
||||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
|
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
|
||||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.yanzhu.manage.service.impl;
|
||||||
|
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
|
|
@ -618,7 +619,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
sysUser.setUserType(UserTypeEnums.FBAQRY.getCode());
|
sysUser.setUserType(UserTypeEnums.FBAQRY.getCode());
|
||||||
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.AQRY.getCode());
|
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.AQRY.getCode());
|
||||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getCraftPost(), CraftPostEnums.CLZY.getCode())){
|
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getCraftPost(), CraftPostEnums.CLZY.getCode())){
|
||||||
sysUser.setUserType(UserTypeEnums.FBCLRY.getCode());
|
sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||||
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.CLRY.getCode());
|
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.CLRY.getCode());
|
||||||
}else{
|
}else{
|
||||||
sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
|
sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue