考勤同步日志控制
This commit is contained in:
parent
4a0a18bb07
commit
dfd8f90df1
|
|
@ -279,7 +279,7 @@ public class SalaryArchiveExcelBO extends Service {
|
|||
if (!e.isError()) {
|
||||
e.setError(Boolean.TRUE);
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", "rowindex" + salaryArchiveErr);
|
||||
errorMessageMap.put("message", "第" + (e.getRowNo() + 1) + "行" + salaryArchiveErr);
|
||||
excelComments.add(errorMessageMap);
|
||||
// SalaryArchiveExcelBO.createExcelComment(excelComments, salaryArchiveErr, finalErrorCount.get() + 1, finalErrorCount.get() + 1, 0, 0);
|
||||
finalErrorCount.addAndGet(1);
|
||||
|
|
@ -302,7 +302,7 @@ public class SalaryArchiveExcelBO extends Service {
|
|||
if (!e.isError()) {
|
||||
e.setError(Boolean.TRUE);
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", "rowindex" + salaryArchiveErr);
|
||||
errorMessageMap.put("message", "第" + (e.getRowNo() + 1) + "行" + salaryArchiveErr);
|
||||
excelComments.add(errorMessageMap);
|
||||
// SalaryArchiveExcelBO.createExcelComment(excelComments, salaryArchiveErr, finalErrorCount.get() + 1, finalErrorCount.get() + 1, 0, 0);
|
||||
finalErrorCount.addAndGet(1);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.google.common.collect.Maps;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -19,7 +20,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
@Slf4j
|
||||
public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAttend4SalaryService {
|
||||
|
||||
private final Boolean isLog = "true".equals(new BaseBean().getPropValue("hrmSalary", "log"));
|
||||
|
||||
@Override
|
||||
public List<Map<String, String>> getColumns() {
|
||||
|
|
@ -116,7 +117,9 @@ public class RemoteAttend4SalaryServiceImpl extends Service implements RemoteAtt
|
|||
temp.put("data", JSONObject.toJSONString(paramsMap));
|
||||
temp.put("reportType", "month");
|
||||
list = (List<Map<String, String>>) commandExecutor.execute(new GetKQReportCmd(temp, user)).get("datas");
|
||||
log.info("获取的考勤数据,{}", JSONUtils.toJSONString(list));
|
||||
if (isLog) {
|
||||
log.info("获取的考勤数据,{}", JSONUtils.toJSONString(list));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取考勤数据失败", e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ import org.apache.poi.ss.usermodel.Sheet;
|
|||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
|
|
@ -84,6 +85,7 @@ import static com.engine.salary.util.excel.ExcelSupport.EXCEL_TYPE_XLSX;
|
|||
**/
|
||||
@Slf4j
|
||||
public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDataService {
|
||||
private final Boolean isLog = "true".equals(new BaseBean().getPropValue("hrmSalary", "log"));
|
||||
|
||||
private AttendQuoteBiz quoteBiz = new AttendQuoteBiz();
|
||||
private AttendQuoteDataBiz dataBiz = new AttendQuoteDataBiz();
|
||||
|
|
@ -321,7 +323,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
List<SalarySobRangeEmpQueryParam> salarySobRangeEmpQueryParams = SalarySobRangeBO.convert2EmployeeQueryParam(salarySobRanges);
|
||||
List<List<SalarySobRangeEmpQueryParam>> partition = Lists.partition(salarySobRangeEmpQueryParams, 100);
|
||||
List<Long> employeeSalarySobIds = new ArrayList<>();
|
||||
partition.forEach(l->employeeSalarySobIds.addAll(getSalarySobRangeMapper().listEmployeeIds(l)));
|
||||
partition.forEach(l -> employeeSalarySobIds.addAll(getSalarySobRangeMapper().listEmployeeIds(l)));
|
||||
|
||||
if (CollectionUtils.isEmpty(employeeSalarySobIds) || CollectionUtils.isEmpty(salarySobRangeEmpQueryParams)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100367, "薪资账套还没有人员"));
|
||||
|
|
@ -447,7 +449,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
attend4Salary.setEndDate(attendCycleRange.getEndDate());
|
||||
attend4Salary.setOnlyEmpIds(part);
|
||||
List<Map<String, String>> attendResult = getRemoteAttend4SalaryService(user).getDatas(attend4Salary);
|
||||
log.info("考勤数据:{}", JSONUtils.toJSONString(attendResult));
|
||||
|
||||
AttendQuoteDataBO.buildAttendDataFromRemote(attendResult, attendQuoteFields, attendQuoteSyncData);
|
||||
// attend4Salary.setUnit("day");
|
||||
// attendResult = remoteAttend4SalaryService.getWorkTimeSummary(attend4Salary);
|
||||
|
|
@ -458,7 +460,9 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
log.error("获取考勤数据错误失败:{}", String.format("参数:%s,错误信息:%s", JSONObject.toJSONString(attend4Salary), e.getMessage()), e);
|
||||
return attendQuoteSyncData;
|
||||
}
|
||||
log.info("同步的考勤数据:{}", JSONUtils.toJSONString(attendQuoteSyncData));
|
||||
if (isLog) {
|
||||
log.info("同步的考勤数据:{}", JSONUtils.toJSONString(attendQuoteSyncData));
|
||||
}
|
||||
return attendQuoteSyncData;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue