|
@@ -1,31 +1,11 @@
|
|
package com.kingdee.eas.custom.synctask.handler;
|
|
package com.kingdee.eas.custom.synctask.handler;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
-import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.kingdee.bos.BOSException;
|
|
import com.kingdee.bos.BOSException;
|
|
import com.kingdee.bos.Context;
|
|
import com.kingdee.bos.Context;
|
|
-import com.kingdee.bos.dao.IObjectPK;
|
|
|
|
-import com.kingdee.bos.metadata.entity.EntityViewInfo;
|
|
|
|
-import com.kingdee.bos.metadata.entity.FilterInfo;
|
|
|
|
-import com.kingdee.bos.metadata.entity.FilterItemInfo;
|
|
|
|
-import com.kingdee.bos.metadata.entity.SelectorItemInfo;
|
|
|
|
-import com.kingdee.bos.metadata.query.util.CompareType;
|
|
|
|
-import com.kingdee.eas.base.permission.UserInfo;
|
|
|
|
-import com.kingdee.eas.basedata.person.IPerson;
|
|
|
|
-import com.kingdee.eas.basedata.person.PersonCollection;
|
|
|
|
-import com.kingdee.eas.basedata.person.PersonFactory;
|
|
|
|
-import com.kingdee.eas.basedata.person.PersonInfo;
|
|
|
|
import com.kingdee.eas.custom.synctask.SyncTranForMJFacadeFactory;
|
|
import com.kingdee.eas.custom.synctask.SyncTranForMJFacadeFactory;
|
|
-import com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils;
|
|
|
|
-import com.kingdee.eas.framework.CoreBaseCollection;
|
|
|
|
-import com.kingdee.eas.hr.ats.*;
|
|
|
|
-import com.kingdee.eas.utils.ExpiringMapCache;
|
|
|
|
import com.kingdee.shr.ats.web.handler.PunchCardRecordListHandler;
|
|
import com.kingdee.shr.ats.web.handler.PunchCardRecordListHandler;
|
|
import com.kingdee.shr.base.syssetting.context.SHRContext;
|
|
import com.kingdee.shr.base.syssetting.context.SHRContext;
|
|
import com.kingdee.shr.base.syssetting.exception.ShrWebBizException;
|
|
import com.kingdee.shr.base.syssetting.exception.ShrWebBizException;
|
|
-import com.kingdee.util.StringUtils;
|
|
|
|
-import okhttp3.*;
|
|
|
|
import org.apache.log4j.Logger;
|
|
import org.apache.log4j.Logger;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
|
@@ -33,22 +13,17 @@ import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.FileInputStream;
|
|
import java.io.FileInputStream;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
-import java.sql.Timestamp;
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Description TODO
|
|
* @Description TODO
|
|
* @Date 2024/10/29 17:51
|
|
* @Date 2024/10/29 17:51
|
|
* @Created by 30489
|
|
* @Created by 30489
|
|
*/
|
|
*/
|
|
public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
|
|
public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
|
|
- Logger logger = Logger.getLogger(PunchCardRecordListHandlerEx.class);
|
|
|
|
private Context ctx = SHRContext.getInstance().getContext();
|
|
private Context ctx = SHRContext.getInstance().getContext();
|
|
private Properties propt = new Properties();
|
|
private Properties propt = new Properties();
|
|
- //
|
|
|
|
- //private static ExpiringMapCache<String, String> cache = new ExpiringMapCache();
|
|
|
|
- //private long durationInMillis = 84600000;
|
|
|
|
|
|
|
|
public PunchCardRecordListHandlerEx() throws BOSException {
|
|
public PunchCardRecordListHandlerEx() throws BOSException {
|
|
String syncOAConfigPath = System.getProperty("EAS_HOME") + "/server/properties/scy/syncMJConfig.properties";
|
|
String syncOAConfigPath = System.getProperty("EAS_HOME") + "/server/properties/scy/syncMJConfig.properties";
|
|
@@ -88,96 +63,59 @@ public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
|
|
//_syncAccessRecord(ctx, null, null);
|
|
//_syncAccessRecord(ctx, null, null);
|
|
}
|
|
}
|
|
|
|
|
|
- ///**
|
|
|
|
- // * 同步门禁打卡记录
|
|
|
|
- // *
|
|
|
|
- // * @param ctx
|
|
|
|
- // * @param startDate
|
|
|
|
- // * @param endDate
|
|
|
|
- // * @throws BOSException
|
|
|
|
- // */
|
|
|
|
- //protected void _syncAccessRecord(Context ctx, String startDate, String endDate) throws ShrWebBizException {
|
|
|
|
- // logger.error("_syncAccessRecord------");
|
|
|
|
- // Properties properties = new Properties();
|
|
|
|
- // properties.put("version", propt.getProperty("version"));
|
|
|
|
- // properties.put("tenantCode", propt.getProperty("tenantCode"));//租户编号,平台提供
|
|
|
|
- // properties.put("language", propt.getProperty("language"));//语言
|
|
|
|
- // properties.put("tenantSecret", propt.getProperty("tenantSecret"));//密钥
|
|
|
|
- // properties.put("account", propt.getProperty("account"));//接口账号
|
|
|
|
- // properties.put("password", propt.getProperty("password"));//接口账号密码
|
|
|
|
- // properties.put("getTokenPath", propt.getProperty("getTokenPath"));//获取token接口地址
|
|
|
|
- //
|
|
|
|
- //
|
|
|
|
|
|
+
|
|
|
|
+ //public void syncZKPunchCardData(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) {
|
|
|
|
+ // //String url = "jdbc:sqlserver://10.0.3.23:1433;databaseName=kaoqin";
|
|
|
|
+ // String url = "jdbc:sqlserver://10.0.3.23:1433;databaseName=kaoqin;encrypt=true;trustServerCertificate=true;";
|
|
|
|
+ // String username = "zhongkong";
|
|
|
|
+ // String password = "6554+oijhh@";
|
|
// try {
|
|
// try {
|
|
- // JSONObject params = new JSONObject();
|
|
|
|
- // params.put("count", "100");
|
|
|
|
- // //获取前三天数据
|
|
|
|
|
|
+ // // 加载SQL Server JDBC驱动程序
|
|
|
|
+ // //Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
|
|
|
+ // // 建立连接
|
|
|
|
+ // Connection connection = DriverManager.getConnection(url, username, password);
|
|
|
|
+ // // 创建Statement对象
|
|
|
|
+ // Statement statement = connection.createStatement();
|
|
|
|
+ // //获取当前时间以及一个月前的时间
|
|
|
|
+ // // 获取当前日期
|
|
|
|
+ // Date now = new Date();
|
|
// Calendar calendar = Calendar.getInstance();
|
|
// Calendar calendar = Calendar.getInstance();
|
|
- // calendar.add(Calendar.DAY_OF_YEAR, -3);
|
|
|
|
- // Date threeDaysAgoDate = calendar.getTime();
|
|
|
|
- // //Date parse = sdf.parse("2022-01-01");
|
|
|
|
- // params.put("rowTimeStamp", threeDaysAgoDate.getTime());
|
|
|
|
- // String payload = params.toJSONString();
|
|
|
|
- // Map<String, String> headers = getHeader(payload, false);
|
|
|
|
- //
|
|
|
|
- // OkHttpClient client = new OkHttpClient.Builder().build();
|
|
|
|
- // MediaType mediaType = MediaType.parse("application/json");
|
|
|
|
- // RequestBody body = RequestBody.create(mediaType, payload);
|
|
|
|
- // Request.Builder requestBuilder = new Request.Builder()
|
|
|
|
- // .url(propt.getProperty("getMJPath"))
|
|
|
|
- // .method("POST", body)
|
|
|
|
- // .addHeader("Content-Type", "application/json");
|
|
|
|
- // // 批量添加请求头
|
|
|
|
- // for (Map.Entry<String, String> header : headers.entrySet()) {
|
|
|
|
- // requestBuilder.header(header.getKey(), header.getValue());
|
|
|
|
- // }
|
|
|
|
- // Response response = client.newCall(requestBuilder.build()).execute();
|
|
|
|
- // logger.error("response----" + response.isSuccessful());
|
|
|
|
- // if (response.isSuccessful()) {
|
|
|
|
- // //重置token,每次调用接口后刷新token
|
|
|
|
- // resetToken();
|
|
|
|
- // ObjectMapper mapper = new ObjectMapper();
|
|
|
|
- // String resultBody = response.body().string();
|
|
|
|
- // logger.error("resultBody----" + resultBody);
|
|
|
|
- // JSONObject result = JSONObject.parseObject(resultBody);
|
|
|
|
- // logger.error("respMap----" + result);
|
|
|
|
- // if (result.get("code").equals("0") || Integer.parseInt(result.get("code").toString()) == 0) {
|
|
|
|
- // String data = result.get("data").toString();
|
|
|
|
- // JSONArray jsonArray = JSONArray.parseArray(result.get("data").toString());
|
|
|
|
- // logger.error("jsonArray---" + jsonArray.toString());
|
|
|
|
- // logger.error("jsonArray---" + jsonArray.size());
|
|
|
|
- // IPerson iPerson = PersonFactory.getLocalInstance(ctx);
|
|
|
|
- // PersonCollection personCollection = iPerson.getPersonCollection("select number ");
|
|
|
|
- // Set set = new HashSet();
|
|
|
|
- // for (int i = 0; i < personCollection.size(); i++) {
|
|
|
|
- // PersonInfo personInfo = personCollection.get(i);
|
|
|
|
- // set.add(personInfo.getNumber().toString());
|
|
|
|
- // }
|
|
|
|
- // for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
|
- // JSONObject resultData = jsonArray.getJSONObject(i);
|
|
|
|
- // //保存门禁打卡记录
|
|
|
|
- // saveMJPunchCardData(ctx, resultData, set);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // } catch (Exception e) {
|
|
|
|
- // e.printStackTrace();
|
|
|
|
- // throw new ShrWebBizException(e.getMessage());
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
- //
|
|
|
|
- ///**
|
|
|
|
- // * 保存门禁打卡记录
|
|
|
|
- // *
|
|
|
|
- // * @param ctx
|
|
|
|
- // * @param resultData
|
|
|
|
- // */
|
|
|
|
- //public void saveMJPunchCardData(Context ctx, JSONObject resultData, Set set) {
|
|
|
|
- // logger.error("saveMJPunchCardData----");
|
|
|
|
- // try {
|
|
|
|
- //
|
|
|
|
|
|
+ // calendar.setTime(now);
|
|
|
|
+ // // 将月份减1(这里只是简单的月份减1,没有考虑日期边界等复杂情况)
|
|
|
|
+ // calendar.add(Calendar.MONTH, -1);
|
|
|
|
+ // Date one_month_ago = calendar.getTime();
|
|
|
|
+ // // 获取当前日期
|
|
|
|
+ // Date currentDate = new Date();
|
|
|
|
+ // // 使用Calendar类来操作日期
|
|
|
|
+ // Calendar calendarNewDate = Calendar.getInstance();
|
|
|
|
+ // calendarNewDate.setTime(currentDate);
|
|
|
|
+ // // 在当前日期基础上加1天
|
|
|
|
+ // calendarNewDate.add(Calendar.DAY_OF_MONTH, 1);
|
|
|
|
+ // Date newDate = calendarNewDate.getTime();
|
|
|
|
+ // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ // String oneMOnthDate = sdf.format(one_month_ago);
|
|
|
|
+ // String nowDate = sdf.format(newDate);
|
|
|
|
+ // logger.error("PunchCardRecordEx----oneMOnthDate--" + oneMOnthDate);
|
|
|
|
+ // logger.error("PunchCardRecordEx----nowDate--" + nowDate);
|
|
// int success = 0;
|
|
// int success = 0;
|
|
// int error = 0;
|
|
// int error = 0;
|
|
|
|
+ // // 执行查询语句
|
|
|
|
+ // //String query = "select \n" +
|
|
|
|
+ // // "userinfo.SSN as personNumber ,\n" +
|
|
|
|
+ // // "checkin.CHECKTIME as checkTime\n" +
|
|
|
|
+ // // "from checkinout as checkin\n" +
|
|
|
|
+ // // "left join USERINFO as userinfo on userinfo.USERID = checkin.USERID\n" +
|
|
|
|
+ // // "where checkin.CHECKTIME >='" + oneMOnthDate + "' and checkin.CHECKTIME <='" + nowDate + "'\n";
|
|
|
|
+ // String query = "\n" +
|
|
|
|
+ // " \n" +
|
|
|
|
+ // "select \n" +
|
|
|
|
+ // "userinfo.SSN as personNumber ,\n" +
|
|
|
|
+ // "checkin.CHECKTIME as checkTime\n" +
|
|
|
|
+ // "from checkinout as checkin\n" +
|
|
|
|
+ // "left join USERINFO as userinfo on userinfo.USERID = checkin.USERID\n" +
|
|
|
|
+ // "where checkin.CHECKTIME >='2024-10-30' and checkin.CHECKTIME <='2024-10-31'\n" +
|
|
|
|
+ // " ";
|
|
|
|
+ // ResultSet resultSet = statement.executeQuery(query);
|
|
// Set<String> setCardId = new HashSet();
|
|
// Set<String> setCardId = new HashSet();
|
|
// Set<String> EquNoSet = new HashSet();
|
|
// Set<String> EquNoSet = new HashSet();
|
|
// Timestamp minDateTime = null;
|
|
// Timestamp minDateTime = null;
|
|
@@ -189,77 +127,68 @@ public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
|
|
// JSONArray duplicateRecords = new JSONArray();
|
|
// JSONArray duplicateRecords = new JSONArray();
|
|
// //存储考勤日期为空的数据
|
|
// //存储考勤日期为空的数据
|
|
// JSONArray notExistRecords = new JSONArray();
|
|
// JSONArray notExistRecords = new JSONArray();
|
|
|
|
+ //
|
|
// JSONArray seccussArray = new JSONArray();
|
|
// JSONArray seccussArray = new JSONArray();
|
|
- // ++success;
|
|
|
|
- // String personNumber = resultData.getString("empCode");//员工编码
|
|
|
|
- // String punchCardDate = resultData.getString("checkTime"); //打卡时间
|
|
|
|
- // String RecDate = punchCardDate.substring(0, 10);// 考勤日期
|
|
|
|
- // String RecTime = punchCardDate.substring(11, 19);// 考勤时间
|
|
|
|
- // //String locationDetail = resultSet.getString("name"); //打卡地点
|
|
|
|
- // //String EquNo = resultSet.getString("EquNo"); //考勤机编码
|
|
|
|
- // //String exceptionType = resultSet.getString("EquNo"); // 打卡/异常类型
|
|
|
|
- // //Date punchDate = HRTimeWebUtils.stringToShortDate(RecDate, true);
|
|
|
|
- // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
|
|
|
|
- // SimpleDateFormat sdfymd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
- // Date date = sdf.parse(punchCardDate);
|
|
|
|
- // String format = sdfymd.format(date);
|
|
|
|
- // Date punchDate = com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.stringToShortDate(RecDate, true);
|
|
|
|
- // Timestamp punchCardTime = com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.stringToTimestamp(format ,true);
|
|
|
|
- // // 处理数据
|
|
|
|
- // if (punchCardDate != null && punchCardTime != null) {
|
|
|
|
- // PunchCardRecordInfo cardInfo = new PunchCardRecordInfo();
|
|
|
|
- // //考勤机编码
|
|
|
|
- // cardInfo.setEquipmentNum("001");
|
|
|
|
- // //考勤编码
|
|
|
|
- // cardInfo.setAttendanceNum(personNumber);
|
|
|
|
- // //打卡日期
|
|
|
|
- // cardInfo.setPunchCardDate(punchDate);
|
|
|
|
- // //打卡时间
|
|
|
|
- // cardInfo.setPunchCardTime(punchCardTime);
|
|
|
|
- // // 打卡来源
|
|
|
|
- // cardInfo.setPunchCardSource(PunchCardSourceEnum.attenceMachine);
|
|
|
|
- // // 打卡位置
|
|
|
|
- // cardInfo.setPunchCardPlace((String) resultData.get("checkLocation"));
|
|
|
|
- // // 有效
|
|
|
|
- // PunchCardStateEnum punchCardStateEnum;
|
|
|
|
- // if ((boolean) resultData.get("isActive")) {
|
|
|
|
- // punchCardStateEnum = PunchCardStateEnum.normal;
|
|
|
|
- // } else {
|
|
|
|
- // punchCardStateEnum = PunchCardStateEnum.cancelled;
|
|
|
|
- // }
|
|
|
|
- // cardInfo.setPunchCardState(punchCardStateEnum);
|
|
|
|
- // ////简称
|
|
|
|
- // //cardInfo.setSimpleName(exceptionType);
|
|
|
|
- // //描述
|
|
|
|
- // cardInfo.setDescription("门禁打卡机");
|
|
|
|
//
|
|
//
|
|
- // EquNoSet.add("001");
|
|
|
|
- // if (!StringUtils.isEmpty(personNumber)) {
|
|
|
|
- // if (!set.contains(personNumber)) {
|
|
|
|
- // return;
|
|
|
|
|
|
+ // // 处理查询结果
|
|
|
|
+ // while (resultSet.next()) {
|
|
|
|
+ // ++success;
|
|
|
|
+ // String personNumber = resultSet.getString("personNumber");//员工编码
|
|
|
|
+ // String punchCardDate = resultSet.getString("checkTime"); //打卡时间
|
|
|
|
+ // String RecDate = punchCardDate.substring(0, 10);// 考勤日期
|
|
|
|
+ // String RecTime = punchCardDate.substring(11, 19);// 考勤时间
|
|
|
|
+ // //String locationDetail = resultSet.getString("name"); //打卡地点
|
|
|
|
+ // //String EquNo = resultSet.getString("EquNo"); //考勤机编码
|
|
|
|
+ // //String exceptionType = resultSet.getString("EquNo"); // 打卡/异常类型
|
|
|
|
+ // //Date punchDate = HRTimeWebUtils.stringToShortDate(RecDate, true);
|
|
|
|
+ // Date punchDate = com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.stringToShortDate(RecDate, true);
|
|
|
|
+ // Timestamp punchCardTime = com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.stringToTimestamp(punchCardDate, true);
|
|
|
|
+ // // 处理数据
|
|
|
|
+ // if (punchCardDate != null && punchCardTime != null) {
|
|
|
|
+ // PunchCardRecordInfo cardInfo = new PunchCardRecordInfo();
|
|
|
|
+ // //考勤机编码
|
|
|
|
+ // cardInfo.setEquipmentNum("001");
|
|
|
|
+ // //考勤编码
|
|
|
|
+ // cardInfo.setAttendanceNum(personNumber);
|
|
|
|
+ // //打卡日期
|
|
|
|
+ // cardInfo.setPunchCardDate(punchDate);
|
|
|
|
+ // //打卡时间
|
|
|
|
+ // cardInfo.setPunchCardTime(punchCardTime);
|
|
|
|
+ // // 打卡来源
|
|
|
|
+ // cardInfo.setPunchCardSource(PunchCardSourceEnum.mobileRegistration);
|
|
|
|
+ // // 打卡位置
|
|
|
|
+ // cardInfo.setPunchCardPlace("考勤机打卡");
|
|
|
|
+ // // 有效
|
|
|
|
+ // cardInfo.setPunchCardState(PunchCardStateEnum.normal);
|
|
|
|
+ // ////简称
|
|
|
|
+ // //cardInfo.setSimpleName(exceptionType);
|
|
|
|
+ // //描述
|
|
|
|
+ // //cardInfo.setDescription(exceptionType);
|
|
|
|
+ //
|
|
|
|
+ // EquNoSet.add("001");
|
|
|
|
+ // if (!StringUtils.isEmpty(personNumber)) {
|
|
|
|
+ // setCardId.add(personNumber);
|
|
|
|
+ // cardColl.add(cardInfo);
|
|
// }
|
|
// }
|
|
- // setCardId.add(personNumber);
|
|
|
|
- // cardColl.add(cardInfo);
|
|
|
|
- // }
|
|
|
|
//
|
|
//
|
|
- // if (minDateTime != null && maxDateTime != null) {
|
|
|
|
- // if (punchCardTime.getTime() < minDateTime.getTime()) {
|
|
|
|
|
|
+ // if (minDateTime != null && maxDateTime != null) {
|
|
|
|
+ // if (punchCardTime.getTime() < minDateTime.getTime()) {
|
|
|
|
+ // minDateTime = punchCardTime;
|
|
|
|
+ // } else if (punchCardTime.getTime() > maxDateTime.getTime()) {
|
|
|
|
+ // maxDateTime = punchCardTime;
|
|
|
|
+ // }
|
|
|
|
+ // } else {
|
|
// minDateTime = punchCardTime;
|
|
// minDateTime = punchCardTime;
|
|
- // } else if (punchCardTime.getTime() > maxDateTime.getTime()) {
|
|
|
|
// maxDateTime = punchCardTime;
|
|
// maxDateTime = punchCardTime;
|
|
// }
|
|
// }
|
|
|
|
+ //
|
|
// } else {
|
|
// } else {
|
|
- // minDateTime = punchCardTime;
|
|
|
|
- // maxDateTime = punchCardTime;
|
|
|
|
|
|
+ // formatErrorRecords.add(resultSet);
|
|
// }
|
|
// }
|
|
- //
|
|
|
|
- // } else {
|
|
|
|
- // formatErrorRecords.add(resultData);
|
|
|
|
// }
|
|
// }
|
|
// // 考勤档案
|
|
// // 考勤档案
|
|
// Map<String, AttendanceFileInfo> attendanceFileMap = AttendanceFileFactory.getLocalInstance(ctx).getPersonByAttendanceNum(setCardId);
|
|
// Map<String, AttendanceFileInfo> attendanceFileMap = AttendanceFileFactory.getLocalInstance(ctx).getPersonByAttendanceNum(setCardId);
|
|
// logger.error("attendanceFileMap-----" + attendanceFileMap);
|
|
// logger.error("attendanceFileMap-----" + attendanceFileMap);
|
|
- // logger.error("setCardId-----" + setCardId);
|
|
|
|
// //相同的数据
|
|
// //相同的数据
|
|
// PunchCardRecordCollection existColl = this.getExistedPunchCardRecordCollection(ctx, minDateTime, maxDateTime, setCardId);
|
|
// PunchCardRecordCollection existColl = this.getExistedPunchCardRecordCollection(ctx, minDateTime, maxDateTime, setCardId);
|
|
// logger.error("existColl-----" + existColl.size());
|
|
// logger.error("existColl-----" + existColl.size());
|
|
@@ -283,7 +212,7 @@ public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
|
|
// // 打卡位置 ,考勤机 的地址
|
|
// // 打卡位置 ,考勤机 的地址
|
|
// cardInfo.setPunchCardPlace(cardInfo.getPunchCardPlace());
|
|
// cardInfo.setPunchCardPlace(cardInfo.getPunchCardPlace());
|
|
// //打卡来源
|
|
// //打卡来源
|
|
- // cardInfo.setPunchCardSource(PunchCardSourceEnum.attenceMachine);
|
|
|
|
|
|
+ // cardInfo.setPunchCardSource(PunchCardSourceEnum.mobileRegistration);
|
|
// // 考勤实体
|
|
// // 考勤实体
|
|
// AttendanceFileInfo attendanceFileInfo = (AttendanceFileInfo) attendanceFileMap.get(cardInfo.getAttendanceNum());
|
|
// AttendanceFileInfo attendanceFileInfo = (AttendanceFileInfo) attendanceFileMap.get(cardInfo.getAttendanceNum());
|
|
// // 姓名
|
|
// // 姓名
|
|
@@ -313,142 +242,15 @@ public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
|
|
// logger.error("seccussArray-----" + seccussArray);
|
|
// logger.error("seccussArray-----" + seccussArray);
|
|
// IObjectPK[] iObjectPKS = PunchCardRecordFactory.getLocalInstance(ctx).saveBatchData(cardCollFinally);
|
|
// IObjectPK[] iObjectPKS = PunchCardRecordFactory.getLocalInstance(ctx).saveBatchData(cardCollFinally);
|
|
// logger.error("iObjectPKS----" + iObjectPKS.length);
|
|
// logger.error("iObjectPKS----" + iObjectPKS.length);
|
|
- // } catch (
|
|
|
|
- // Exception e) {
|
|
|
|
- // e.printStackTrace();
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
|
|
+ // JSONUtils.SUCCESS(iObjectPKS);
|
|
|
|
+ // // 关闭连接
|
|
|
|
+ // resultSet.close();
|
|
|
|
+ // statement.close();
|
|
|
|
+ // connection.close();
|
|
//
|
|
//
|
|
- ///**
|
|
|
|
- // * 重置token,每次调用接口后刷新token
|
|
|
|
- // */
|
|
|
|
- //private void resetToken() {
|
|
|
|
- // String token = cache.get("token");
|
|
|
|
- // if (org.apache.commons.lang3.StringUtils.isBlank(token)) {
|
|
|
|
- // getTokenByRemote();
|
|
|
|
- // } else {
|
|
|
|
- // cache.put("token", token, durationInMillis);//23.5小时
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
- //
|
|
|
|
- ///**
|
|
|
|
- // * 获取请求头
|
|
|
|
- // *
|
|
|
|
- // * @param payload body的json字符串
|
|
|
|
- // * @param isGetToken 是否获取token请求
|
|
|
|
- // * @return
|
|
|
|
- // */
|
|
|
|
- //private Map<String, String> getHeader(String payload, boolean isGetToken) {
|
|
|
|
- // Map<String, String> signParams = new HashMap<>();
|
|
|
|
- // signParams.put("version", propt.getProperty("version"));
|
|
|
|
- // signParams.put("transId", UUID.randomUUID().toString());
|
|
|
|
- // signParams.put("timestamp", String.valueOf(System.currentTimeMillis() / 1000));
|
|
|
|
- // signParams.put("tenantCode", propt.getProperty("tenantCode"));//租户编号,平台提供
|
|
|
|
- // signParams.put("language", propt.getProperty("language"));//语言支持
|
|
|
|
- // if (!isGetToken) {
|
|
|
|
- // signParams.put("token", getToken());
|
|
|
|
- // }
|
|
|
|
- // signParams.put("payload", payload);//发起请求时 body 的 json 字符串
|
|
|
|
- // //密钥必须放在生成签名代码之前
|
|
|
|
- // signParams.put("tenantSecret", propt.getProperty("tenantSecret"));
|
|
|
|
- // signParams.put("sign", createSign(signParams));
|
|
|
|
- // return signParams;
|
|
|
|
- //}
|
|
|
|
- //
|
|
|
|
- ///**
|
|
|
|
- // * 获取token
|
|
|
|
- // *
|
|
|
|
- // * @return
|
|
|
|
- // */
|
|
|
|
- //private String getToken() {
|
|
|
|
- // String token = cache.get("token");
|
|
|
|
- // if (org.apache.commons.lang3.StringUtils.isBlank(token)) {
|
|
|
|
- // token = getTokenByRemote();
|
|
|
|
- // }
|
|
|
|
- // return token;
|
|
|
|
- //}
|
|
|
|
- //
|
|
|
|
- ///**
|
|
|
|
- // * 远程获取token
|
|
|
|
- // *
|
|
|
|
- // * @return
|
|
|
|
- // */
|
|
|
|
- //private String getTokenByRemote() {
|
|
|
|
- // try {
|
|
|
|
- // com.alibaba.fastjson.JSONObject params = new com.alibaba.fastjson.JSONObject();
|
|
|
|
- // params.put("account", propt.getProperty("account"));
|
|
|
|
- // String password = propt.getProperty("password");
|
|
|
|
- // params.put("password", EncryptUtils.sha256(password, false));
|
|
|
|
- // String payload = params.toJSONString();
|
|
|
|
- // String getTokenPath = propt.getProperty("getTokenPath");
|
|
|
|
- //
|
|
|
|
- // Map<String, String> headers = getHeader(payload, true);
|
|
|
|
- // OkHttpClient client = new OkHttpClient.Builder().build();
|
|
|
|
- // MediaType mediaType = MediaType.parse("application/json");
|
|
|
|
- // RequestBody body = RequestBody.create(mediaType, payload);
|
|
|
|
- // Request.Builder requestBuilder = new Request.Builder()
|
|
|
|
- // .url(getTokenPath)
|
|
|
|
- // .method("POST", body)
|
|
|
|
- // .addHeader("Content-Type", "application/json");
|
|
|
|
- // // 批量添加请求头
|
|
|
|
- // for (Map.Entry<String, String> header : headers.entrySet()) {
|
|
|
|
- // requestBuilder.header(header.getKey(), header.getValue());
|
|
|
|
- // }
|
|
|
|
- // Response response = client.newCall(requestBuilder.build()).execute();
|
|
|
|
- // ObjectMapper mapper = new ObjectMapper();
|
|
|
|
- // if (response.isSuccessful()) {
|
|
|
|
- // Map<String, Object> result = mapper.readValue(response.body().string(), Map.class);
|
|
|
|
- // if ("success".equals(result.get("msg"))) {
|
|
|
|
- // String token = (String) result.get("data");
|
|
|
|
- // cache.put("token", token, 84600000);//23.5小时
|
|
|
|
- // return token;
|
|
|
|
- // } else {
|
|
|
|
- // throw new RuntimeException("远程获取token报错: ");
|
|
|
|
- // }
|
|
|
|
- // } else {
|
|
|
|
- // throw new RuntimeException("远程获取token报错: ");
|
|
|
|
- // }
|
|
|
|
- // } catch (IOException e) {
|
|
|
|
|
|
+ // } catch (Exception e) {
|
|
// e.printStackTrace();
|
|
// e.printStackTrace();
|
|
- // throw new RuntimeException("远程获取token报错: " + e.getMessage());
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
- //
|
|
|
|
- ///**
|
|
|
|
- // * 生成签名
|
|
|
|
- // *
|
|
|
|
- // * @param signParams 参与签名的参数
|
|
|
|
- // * @return
|
|
|
|
- // */
|
|
|
|
- //private String createSign(Map<String, String> signParams) {
|
|
|
|
- // String tenantSecret = signParams.get("tenantSecret");
|
|
|
|
- // signParams.remove("tenantSecret");
|
|
|
|
- // String linkStr = createLinkStr(signParams, "&");
|
|
|
|
- // linkStr = linkStr + "&tenantSecret=" + tenantSecret;
|
|
|
|
- // return EncryptUtils.sha256(linkStr, true);
|
|
|
|
- //}
|
|
|
|
- //
|
|
|
|
- ///**
|
|
|
|
- // * 创建链接字符串
|
|
|
|
- // *
|
|
|
|
- // * @param params 参数
|
|
|
|
- // * @param linkStr 连接字符
|
|
|
|
- // * @return
|
|
|
|
- // */
|
|
|
|
- //private static String createLinkStr(Map<String, String> params, String linkStr) {
|
|
|
|
- // List<String> keys = new ArrayList<String>(params.keySet());
|
|
|
|
- // Collections.sort(keys);
|
|
|
|
- // StringBuilder content = new StringBuilder();
|
|
|
|
- // for (int i = 0; i < keys.size(); i++) {
|
|
|
|
- // String key = keys.get(i);
|
|
|
|
- // String value = params.get(key);
|
|
|
|
- // if (i == keys.size() - 1) {
|
|
|
|
- // content.append(key).append("=").append(value);
|
|
|
|
- // } else {
|
|
|
|
- // content.append(key).append("=").append(value).append(linkStr);
|
|
|
|
- // }
|
|
|
|
// }
|
|
// }
|
|
- // return content.toString();
|
|
|
|
//}
|
|
//}
|
|
//
|
|
//
|
|
//private PunchCardRecordCollection getExistedPunchCardRecordCollection(Context ctx, Timestamp minDateTime, Timestamp maxDateTime, Set<String> setCardId) throws BOSException {
|
|
//private PunchCardRecordCollection getExistedPunchCardRecordCollection(Context ctx, Timestamp minDateTime, Timestamp maxDateTime, Set<String> setCardId) throws BOSException {
|
|
@@ -467,211 +269,5 @@ public class PunchCardRecordListHandlerEx extends PunchCardRecordListHandler {
|
|
// return existColl;
|
|
// return existColl;
|
|
//
|
|
//
|
|
//}
|
|
//}
|
|
- ////
|
|
|
|
- ////public void syncZKPunchCardData(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) {
|
|
|
|
- //// //String url = "jdbc:sqlserver://10.0.3.23:1433;databaseName=kaoqin";
|
|
|
|
- //// String url = "jdbc:sqlserver://10.0.3.23:1433;databaseName=kaoqin;encrypt=true;trustServerCertificate=true;";
|
|
|
|
- //// String username = "zhongkong";
|
|
|
|
- //// String password = "6554+oijhh@";
|
|
|
|
- //// try {
|
|
|
|
- //// // 加载SQL Server JDBC驱动程序
|
|
|
|
- //// //Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
|
|
|
- //// // 建立连接
|
|
|
|
- //// Connection connection = DriverManager.getConnection(url, username, password);
|
|
|
|
- //// // 创建Statement对象
|
|
|
|
- //// Statement statement = connection.createStatement();
|
|
|
|
- //// //获取当前时间以及一个月前的时间
|
|
|
|
- //// // 获取当前日期
|
|
|
|
- //// Date now = new Date();
|
|
|
|
- //// Calendar calendar = Calendar.getInstance();
|
|
|
|
- //// calendar.setTime(now);
|
|
|
|
- //// // 将月份减1(这里只是简单的月份减1,没有考虑日期边界等复杂情况)
|
|
|
|
- //// calendar.add(Calendar.MONTH, -1);
|
|
|
|
- //// Date one_month_ago = calendar.getTime();
|
|
|
|
- //// // 获取当前日期
|
|
|
|
- //// Date currentDate = new Date();
|
|
|
|
- //// // 使用Calendar类来操作日期
|
|
|
|
- //// Calendar calendarNewDate = Calendar.getInstance();
|
|
|
|
- //// calendarNewDate.setTime(currentDate);
|
|
|
|
- //// // 在当前日期基础上加1天
|
|
|
|
- //// calendarNewDate.add(Calendar.DAY_OF_MONTH, 1);
|
|
|
|
- //// Date newDate = calendarNewDate.getTime();
|
|
|
|
- //// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
- //// String oneMOnthDate = sdf.format(one_month_ago);
|
|
|
|
- //// String nowDate = sdf.format(newDate);
|
|
|
|
- //// logger.error("PunchCardRecordEx----oneMOnthDate--" + oneMOnthDate);
|
|
|
|
- //// logger.error("PunchCardRecordEx----nowDate--" + nowDate);
|
|
|
|
- //// int success = 0;
|
|
|
|
- //// int error = 0;
|
|
|
|
- //// // 执行查询语句
|
|
|
|
- //// //String query = "select \n" +
|
|
|
|
- //// // "userinfo.SSN as personNumber ,\n" +
|
|
|
|
- //// // "checkin.CHECKTIME as checkTime\n" +
|
|
|
|
- //// // "from checkinout as checkin\n" +
|
|
|
|
- //// // "left join USERINFO as userinfo on userinfo.USERID = checkin.USERID\n" +
|
|
|
|
- //// // "where checkin.CHECKTIME >='" + oneMOnthDate + "' and checkin.CHECKTIME <='" + nowDate + "'\n";
|
|
|
|
- //// String query = "\n" +
|
|
|
|
- //// " \n" +
|
|
|
|
- //// "select \n" +
|
|
|
|
- //// "userinfo.SSN as personNumber ,\n" +
|
|
|
|
- //// "checkin.CHECKTIME as checkTime\n" +
|
|
|
|
- //// "from checkinout as checkin\n" +
|
|
|
|
- //// "left join USERINFO as userinfo on userinfo.USERID = checkin.USERID\n" +
|
|
|
|
- //// "where checkin.CHECKTIME >='2024-10-30' and checkin.CHECKTIME <='2024-10-31'\n" +
|
|
|
|
- //// " ";
|
|
|
|
- //// ResultSet resultSet = statement.executeQuery(query);
|
|
|
|
- //// Set<String> setCardId = new HashSet();
|
|
|
|
- //// Set<String> EquNoSet = new HashSet();
|
|
|
|
- //// Timestamp minDateTime = null;
|
|
|
|
- //// Timestamp maxDateTime = null;
|
|
|
|
- //// CoreBaseCollection cardCollFinally = new CoreBaseCollection();
|
|
|
|
- //// CoreBaseCollection cardColl = new CoreBaseCollection();
|
|
|
|
- //// JSONArray formatErrorRecords = new JSONArray();
|
|
|
|
- //// //存储相同的数据
|
|
|
|
- //// JSONArray duplicateRecords = new JSONArray();
|
|
|
|
- //// //存储考勤日期为空的数据
|
|
|
|
- //// JSONArray notExistRecords = new JSONArray();
|
|
|
|
- ////
|
|
|
|
- //// JSONArray seccussArray = new JSONArray();
|
|
|
|
- ////
|
|
|
|
- //// // 处理查询结果
|
|
|
|
- //// while (resultSet.next()) {
|
|
|
|
- //// ++success;
|
|
|
|
- //// String personNumber = resultSet.getString("personNumber");//员工编码
|
|
|
|
- //// String punchCardDate = resultSet.getString("checkTime"); //打卡时间
|
|
|
|
- //// String RecDate = punchCardDate.substring(0, 10);// 考勤日期
|
|
|
|
- //// String RecTime = punchCardDate.substring(11, 19);// 考勤时间
|
|
|
|
- //// //String locationDetail = resultSet.getString("name"); //打卡地点
|
|
|
|
- //// //String EquNo = resultSet.getString("EquNo"); //考勤机编码
|
|
|
|
- //// //String exceptionType = resultSet.getString("EquNo"); // 打卡/异常类型
|
|
|
|
- //// //Date punchDate = HRTimeWebUtils.stringToShortDate(RecDate, true);
|
|
|
|
- //// Date punchDate = com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.stringToShortDate(RecDate, true);
|
|
|
|
- //// Timestamp punchCardTime = com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.stringToTimestamp(punchCardDate, true);
|
|
|
|
- //// // 处理数据
|
|
|
|
- //// if (punchCardDate != null && punchCardTime != null) {
|
|
|
|
- //// PunchCardRecordInfo cardInfo = new PunchCardRecordInfo();
|
|
|
|
- //// //考勤机编码
|
|
|
|
- //// cardInfo.setEquipmentNum("001");
|
|
|
|
- //// //考勤编码
|
|
|
|
- //// cardInfo.setAttendanceNum(personNumber);
|
|
|
|
- //// //打卡日期
|
|
|
|
- //// cardInfo.setPunchCardDate(punchDate);
|
|
|
|
- //// //打卡时间
|
|
|
|
- //// cardInfo.setPunchCardTime(punchCardTime);
|
|
|
|
- //// // 打卡来源
|
|
|
|
- //// cardInfo.setPunchCardSource(PunchCardSourceEnum.mobileRegistration);
|
|
|
|
- //// // 打卡位置
|
|
|
|
- //// cardInfo.setPunchCardPlace("考勤机打卡");
|
|
|
|
- //// // 有效
|
|
|
|
- //// cardInfo.setPunchCardState(PunchCardStateEnum.normal);
|
|
|
|
- //// ////简称
|
|
|
|
- //// //cardInfo.setSimpleName(exceptionType);
|
|
|
|
- //// //描述
|
|
|
|
- //// //cardInfo.setDescription(exceptionType);
|
|
|
|
- ////
|
|
|
|
- //// EquNoSet.add("001");
|
|
|
|
- //// if (!StringUtils.isEmpty(personNumber)) {
|
|
|
|
- //// setCardId.add(personNumber);
|
|
|
|
- //// cardColl.add(cardInfo);
|
|
|
|
- //// }
|
|
|
|
- ////
|
|
|
|
- //// if (minDateTime != null && maxDateTime != null) {
|
|
|
|
- //// if (punchCardTime.getTime() < minDateTime.getTime()) {
|
|
|
|
- //// minDateTime = punchCardTime;
|
|
|
|
- //// } else if (punchCardTime.getTime() > maxDateTime.getTime()) {
|
|
|
|
- //// maxDateTime = punchCardTime;
|
|
|
|
- //// }
|
|
|
|
- //// } else {
|
|
|
|
- //// minDateTime = punchCardTime;
|
|
|
|
- //// maxDateTime = punchCardTime;
|
|
|
|
- //// }
|
|
|
|
- ////
|
|
|
|
- //// } else {
|
|
|
|
- //// formatErrorRecords.add(resultSet);
|
|
|
|
- //// }
|
|
|
|
- //// }
|
|
|
|
- //// // 考勤档案
|
|
|
|
- //// Map<String, AttendanceFileInfo> attendanceFileMap = AttendanceFileFactory.getLocalInstance(ctx).getPersonByAttendanceNum(setCardId);
|
|
|
|
- //// logger.error("attendanceFileMap-----" + attendanceFileMap);
|
|
|
|
- //// //相同的数据
|
|
|
|
- //// PunchCardRecordCollection existColl = this.getExistedPunchCardRecordCollection(ctx, minDateTime, maxDateTime, setCardId);
|
|
|
|
- //// logger.error("existColl-----" + existColl.size());
|
|
|
|
- //// for (int i = 0; i < cardColl.size(); ++i) {
|
|
|
|
- //// Map map = new HashMap();
|
|
|
|
- //// // 原始打卡记录实体
|
|
|
|
- //// PunchCardRecordInfo cardInfo = (PunchCardRecordInfo) cardColl.get(i);
|
|
|
|
- //// JSONObject jsObject = new JSONObject();
|
|
|
|
- //// jsObject.put("deviceid", cardInfo.getEquipmentNum()); // deviceid --EquNo
|
|
|
|
- //// jsObject.put("userid", cardInfo.getAttendanceNum()); // userid --CardId
|
|
|
|
- //// jsObject.put("RecDate", com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.dateShortToString(cardInfo.getPunchCardDate())); //checkin_time --RecDate
|
|
|
|
- //// jsObject.put("RecTime", com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.timestampToString(cardInfo.getPunchCardTime()).substring(11)); //checkin_time --RecDate
|
|
|
|
- //// map.put("userid", cardInfo.getAttendanceNum());
|
|
|
|
- //// map.put("RecDate", com.kingdee.eas.custom.synctask.utils.HRTimeWebUtils.dateShortToString(cardInfo.getPunchCardDate()));
|
|
|
|
- //// map.put("RecTime", HRTimeWebUtils.timestampToString(cardInfo.getPunchCardTime()).substring(11));
|
|
|
|
- //// //员工是否有考勤档案
|
|
|
|
- //// if (attendanceFileMap.containsKey(cardInfo.getAttendanceNum())) {
|
|
|
|
- //// if (existColl.contains(cardInfo)) {
|
|
|
|
- //// duplicateRecords.add(jsObject);
|
|
|
|
- //// } else {
|
|
|
|
- //// // 打卡位置 ,考勤机 的地址
|
|
|
|
- //// cardInfo.setPunchCardPlace(cardInfo.getPunchCardPlace());
|
|
|
|
- //// //打卡来源
|
|
|
|
- //// cardInfo.setPunchCardSource(PunchCardSourceEnum.mobileRegistration);
|
|
|
|
- //// // 考勤实体
|
|
|
|
- //// AttendanceFileInfo attendanceFileInfo = (AttendanceFileInfo) attendanceFileMap.get(cardInfo.getAttendanceNum());
|
|
|
|
- //// // 姓名
|
|
|
|
- //// cardInfo.setProposer(attendanceFileInfo.getProposer());
|
|
|
|
- //// // HR 组织
|
|
|
|
- //// cardInfo.setHrOrgUnit(attendanceFileInfo.getHrOrgUnit());
|
|
|
|
- //// //行政组织
|
|
|
|
- //// cardInfo.setAdminOrgUnit(attendanceFileInfo.getAdminOrgUnit());
|
|
|
|
- //// cardInfo.setCreator((UserInfo) ctx.get("UserInfo"));
|
|
|
|
- //// cardInfo.setLastUpdateUser((UserInfo) ctx.get("UserInfo"));
|
|
|
|
- //// cardInfo.setCreateTime(new Timestamp((new Date()).getTime()));
|
|
|
|
- //// cardInfo.setLastUpdateTime(new Timestamp((new Date()).getTime()));
|
|
|
|
- //// cardCollFinally.add(cardInfo);
|
|
|
|
- //// }
|
|
|
|
- //// seccussArray.add(map);
|
|
|
|
- //// } else {
|
|
|
|
- //// ++error;
|
|
|
|
- //// notExistRecords.add(jsObject);
|
|
|
|
- //// }
|
|
|
|
- //// }
|
|
|
|
- //// logger.error("cardCollFinally-----" + cardCollFinally.size());
|
|
|
|
- //// logger.error("success-----" + success);
|
|
|
|
- //// logger.error("error-----" + error);
|
|
|
|
- //// logger.error("notExistRecords--list---" + notExistRecords);
|
|
|
|
- //// logger.error("notExistRecords-----" + notExistRecords.size());
|
|
|
|
- //// logger.error("seccussArray--Size-----" + seccussArray.size());
|
|
|
|
- //// logger.error("seccussArray-----" + seccussArray);
|
|
|
|
- //// IObjectPK[] iObjectPKS = PunchCardRecordFactory.getLocalInstance(ctx).saveBatchData(cardCollFinally);
|
|
|
|
- //// logger.error("iObjectPKS----" + iObjectPKS.length);
|
|
|
|
- //// JSONUtils.SUCCESS(iObjectPKS);
|
|
|
|
- //// // 关闭连接
|
|
|
|
- //// resultSet.close();
|
|
|
|
- //// statement.close();
|
|
|
|
- //// connection.close();
|
|
|
|
- ////
|
|
|
|
- //// } catch (Exception e) {
|
|
|
|
- //// e.printStackTrace();
|
|
|
|
- //// }
|
|
|
|
- ////}
|
|
|
|
- ////
|
|
|
|
- ////private PunchCardRecordCollection getExistedPunchCardRecordCollection(Context ctx, Timestamp minDateTime, Timestamp maxDateTime, Set<String> setCardId) throws BOSException {
|
|
|
|
- //// EntityViewInfo evi = new EntityViewInfo();
|
|
|
|
- //// FilterInfo fi = new FilterInfo();
|
|
|
|
- //// evi.setFilter(fi);
|
|
|
|
- //// evi.getSelector().add(new SelectorItemInfo("punchCardDate"));
|
|
|
|
- //// evi.getSelector().add(new SelectorItemInfo("punchCardTime"));
|
|
|
|
- //// evi.getSelector().add(new SelectorItemInfo("punchCardSource"));
|
|
|
|
- //// evi.getSelector().add(new SelectorItemInfo("equipmentNum"));
|
|
|
|
- //// evi.getSelector().add(new SelectorItemInfo("attendanceNum"));
|
|
|
|
- //// fi.getFilterItems().add(new FilterItemInfo("attendanceNum", setCardId, CompareType.INCLUDE));
|
|
|
|
- //// fi.getFilterItems().add(new FilterItemInfo("punchCardTime", maxDateTime, CompareType.LESS_EQUALS));
|
|
|
|
- //// fi.getFilterItems().add(new FilterItemInfo("punchCardTime", minDateTime, CompareType.GREATER_EQUALS));
|
|
|
|
- //// PunchCardRecordCollection existColl = PunchCardRecordFactory.getLocalInstance(ctx).getPunchCardRecordCollection(evi);
|
|
|
|
- //// return existColl;
|
|
|
|
- ////
|
|
|
|
- ////}
|
|
|
|
|
|
|
|
}
|
|
}
|