公式字段

This commit is contained in:
钱涛 2022-04-21 20:29:11 +08:00
parent 926b132d50
commit cd8df85e54
13 changed files with 376 additions and 209 deletions

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.datacollection; package com.engine.salary.entity.datacollection;
import com.engine.salary.annotation.SalaryFormulaVar;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@ -17,62 +18,86 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
public class AddUpDeduction { public class AddUpDeduction {
/** /**
* 累计子女教育 * 主键id
*/ */
private String addUpChildEducation; private Long id;
/**
* 累计继续教育
*/
private String addUpContinuingEducation;
/**
* 累计住房贷款利息
*/
private String addUpHousingLoanInterest;
/**
* 累计住房租金
*/
private String addUpHousingRent;
/**
* 累计赡养老人
*/
private String addUpSupportElderly;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private Long creator;
/**
* 申报月份
*/
private Date declareMonth;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
/** /**
* 人员信息表的主键id * 人员信息表的主键id
*/ */
private Long employeeId; private Long employeeId;
/**
* 主键
*/
private Long id;
/** /**
* 个税扣缴义务人的主键id * 个税扣缴义务人的主键id
*/ */
private Long taxAgentId; private Long taxAgentId;
/** /**
* 租户ID * 申报月份
*/ */
private String tenantKey; private Date declareMonth;
/**
* 累计子女教育
*/
@SalaryFormulaVar(defaultLabel = "累计子女教育", labelId = 86321, dataType = "number")
private String addUpChildEducation;
/**
* 累计继续教育
*/
@SalaryFormulaVar(defaultLabel = "累计继续教育", labelId = 86323, dataType = "number")
private String addUpContinuingEducation;
/**
* 累计住房贷款利息
*/
@SalaryFormulaVar(defaultLabel = "累计住房贷款利息", labelId = 86324, dataType = "number")
private String addUpHousingLoanInterest;
/**
* 累计住房租金
*/
@SalaryFormulaVar(defaultLabel = "累计住房租金", labelId = 86325, dataType = "number")
private String addUpHousingRent;
/**
* 累计赡养老人
*/
@SalaryFormulaVar(defaultLabel = "累计赡养老人", labelId = 86326, dataType = "number")
private String addUpSupportElderly;
/**
* 累计大病医疗
*/
@SalaryFormulaVar(defaultLabel = "累计大病医疗", labelId = 105142, dataType = "number")
private String addUpIllnessMedical;
/**
* 创建时间
*/
private Date createTime;
/** /**
* 更新时间 * 更新时间
*/ */
private Date updateTime; private Date updateTime;
/**
* 创建人
*/
private Long creator;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
/**
* 租户ID
*/
private String tenantKey;
Collection<Long> employeeIds; Collection<Long> employeeIds;
Collection<Long> taxAgentIds; Collection<Long> taxAgentIds;

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.datacollection; package com.engine.salary.entity.datacollection;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableOperate; import com.engine.salary.annotation.SalaryTableOperate;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -20,102 +21,151 @@ import java.util.Date;
@SalaryTable(pageId = "a4f83287-e3f9-4275-9527-7d06e54y6238", fields = "id,addUpSubtraction", operates = {@SalaryTableOperate(text = "删除",index = "0")}) @SalaryTable(pageId = "a4f83287-e3f9-4275-9527-7d06e54y6238", fields = "id,addUpSubtraction", operates = {@SalaryTableOperate(text = "删除",index = "0")})
public class AddUpSituation { public class AddUpSituation {
/** /**
* 累计公积金个人合计 * 主键id
*/ */
private String addUpAccumulationFundTotal; private Long id;
/**
* 累计已预扣预缴税额
*/
private String addUpAdvanceTax;
/**
* 累计准予扣除的捐赠额
*/
private String addUpAllowedDonation;
/**
* 累计子女教育
*/
private String addUpChildEducation;
/**
* 累计继续教育
*/
private String addUpContinuingEducation;
/**
* 累计企业职业年金及其他福利
*/
private String addUpEnterpriseAndOther;
/**
* 累计住房贷款利息
*/
private String addUpHousingLoanInterest;
/**
* 累计住房租金
*/
private String addUpHousingRent;
/**
* 累计收入额
*/
private String addUpIncome;
/**
* 累计其他扣除
*/
private String addUpOtherDeduction;
/**
* 累计社保个人合计
*/
private String addUpSocialSecurityTotal;
/**
* 累计减除费用
*/
private String addUpSubtraction;
/**
* 累计赡养老人
*/
private String addUpSupportElderly;
/**
* 累计免税收入
*/
private String addUpTaxExemptIncome;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private Long creator;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
/** /**
* 人员信息表的主键id * 人员信息表的主键id
*/ */
private Long employeeId; private Long employeeId;
/**
* 主键
*/
private Long id;
/** /**
* 个税扣缴义务人的主键id * 个税扣缴义务人的主键id
*/ */
private Long taxAgentId; private Long taxAgentId;
/** /**
* 税款所属期 * 税款所属期
*/ */
private Date taxYearMonth; private Date taxYearMonth;
/**
* 租户ID
*/
private String tenantKey;
/**
* 更新时间
*/
private Date updateTime;
/** /**
* 年份 * 年份
*/ */
private Integer year; private Integer year;
/**
* 累计收入额
*/
@SalaryFormulaVar(defaultLabel = "累计收入额", labelId = 86712, dataType = "number")
private String addUpIncome;
/**
* 累计减除费用
*/
@SalaryFormulaVar(defaultLabel = "累计减除费用", labelId = 86711, dataType = "number")
private String addUpSubtraction;
/**
* 累计社保个人合计
*/
@SalaryFormulaVar(defaultLabel = "累计社保个人合计", labelId = 86710, dataType = "number")
private String addUpSocialSecurityTotal;
/**
* 累计公积金个人合计
*/
@SalaryFormulaVar(defaultLabel = "累计公积金个人合计", labelId = 86709, dataType = "number")
private String addUpAccumulationFundTotal;
/**
* 累计子女教育
*/
@SalaryFormulaVar(defaultLabel = "累计子女教育", labelId = 86321, dataType = "number")
private String addUpChildEducation;
/**
* 累计继续教育
*/
@SalaryFormulaVar(defaultLabel = "累计继续教育", labelId = 86323, dataType = "number")
private String addUpContinuingEducation;
/**
* 累计住房贷款利息
*/
@SalaryFormulaVar(defaultLabel = "累计住房贷款利息", labelId = 86324, dataType = "number")
private String addUpHousingLoanInterest;
/**
* 累计住房租金
*/
@SalaryFormulaVar(defaultLabel = "累计住房租金", labelId = 86325, dataType = "number")
private String addUpHousingRent;
/**
* 累计赡养老人
*/
@SalaryFormulaVar(defaultLabel = "累计赡养老人", labelId = 86326, dataType = "number")
private String addUpSupportElderly;
/**
* 累计大病医疗
*/
@SalaryFormulaVar(defaultLabel = "累计大病医疗", labelId = 105142, dataType = "number")
private String addUpIllnessMedical;
/**
* 累计企业职业年金及其他福利
*/
@SalaryFormulaVar(defaultLabel = "累计企业(职业)年金及其他福利", labelId = 90567, dataType = "number")
private String addUpEnterpriseAndOther;
/**
* 累计其他免税扣除
*/
@SalaryFormulaVar(defaultLabel = "累计其他免税扣除", labelId = 93902, dataType = "number")
private String addUpOtherDeduction;
/**
* 累计免税收入
*/
@SalaryFormulaVar(defaultLabel = "累计免税收入", labelId = 86704, dataType = "number")
private String addUpTaxExemptIncome;
/**
* 累计准予扣除的捐赠额
*/
@SalaryFormulaVar(defaultLabel = "累计准予扣除的捐赠额", labelId = 86703, dataType = "number")
private String addUpAllowedDonation;
/**
* 累计减免税额
*/
@SalaryFormulaVar(defaultLabel = "累计减免税额", labelId = 105478, dataType = "number")
private String addUpTaxSavings;
/**
* 累计已预扣预缴税额
*/
@SalaryFormulaVar(defaultLabel = "累计已预扣预缴税额", labelId = 86702, dataType = "number")
private String addUpAdvanceTax;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建人
*/
private Long creator;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
/**
* 租户ID
*/
private String tenantKey;
//条件 //条件
Collection<Long> employeeIds; Collection<Long> employeeIds;

View File

@ -0,0 +1,77 @@
package com.engine.salary.entity.datacollection.bo;
import com.engine.salary.entity.datacollection.po.AttendQuoteFieldPO;
import com.engine.salary.util.JsonUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 考勤引用数据
* @Author: wangxiangzhong
* @Date: 2021/11/30 16:10
*/
public class AttendQuoteDataBO {
@Override
public String toString() {
return "AttendQuoteDataBO{}";
}
/**
* 根据考勤模块来构建考勤数据
* @param unit
* @param dataMap
* @param attendQuoteFields
* @param attendQuoteSyncData
*/
public static void buildAttendDataFromRemote(String unit, Map<String, Object> dataMap, List<AttendQuoteFieldPO> attendQuoteFields, List<Map<String, Object>> attendQuoteSyncData) {
if (dataMap.containsKey("datas")) {
List<HashMap> list = JsonUtil.parseList(dataMap.get("datas"), HashMap.class);
if (CollectionUtils.isEmpty(list)) {
return;
}
list.forEach(m-> {
for (AttendQuoteFieldPO field : attendQuoteFields) {
if (StringUtils.isEmpty(field.getCode())) {
continue;
}
String key = field.getCode().replaceAll("_"+unit, "").replaceAll("_leave", "");
if (m.containsKey(key) || m.containsKey("leaveHour"+key)) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("employeeId", m.get("empId"));
map.put("attendQuoteFieldId", field.getId());
if (m.containsKey(key)) {
map.put("dataValue", m.get(key));
} else if (m.containsKey("leaveHour"+key)) {
map.put("dataValue", m.get("leaveHour"+key));
}
attendQuoteSyncData.add(map);
}
}
});
}
}
// public static SimpleEmployee getCurrentUser4Remote() {
// SimpleEmployee se = UserContext.getCurrentUser();
// if(se != null){
// SimpleEmployee simple = new SimpleEmployee();
// simple.setId(se.getId());
// simple.setUserId(se.getUserId());
// simple.setUsername(se.getUsername());
// simple.setPinyin(se.getPinyin());
// simple.setImUid(se.getImUid());
// simple.setImCid(se.getImCid());
// simple.setTenantKey(se.getTenantKey());
// simple.setDepartment(se.getDepartment());
// simple.setAuthorities(null);
// return simple;
// }
// return null;
// }
}

View File

@ -48,105 +48,52 @@ public class AttendQuoteFieldBO {
*/ */
public static List<Map<String, String>> buildAttendFixedFields() { public static List<Map<String, String>> buildAttendFixedFields() {
List<Map<String, String>> attendFixedFields = new LinkedList<>(); List<Map<String, String>> attendFixedFields = new LinkedList<>();
/* ====== 按小时 ============================================================================================================ */
//-------------------------------按小时------------------------------------------------------------
// 应出勤工时 // 应出勤工时
attendFixedFields.add(attendFixedField("working_hour", 92040, "应出勤工时")); attendFixedFields.add(attendFixedField("workmins_hour", 92040, "应出勤工时"));
// 出勤工时
attendFixedFields.add(attendFixedField("actual_hour", 92041, "出勤工时"));
// 实际出勤工时 // 实际出勤工时
attendFixedFields.add(attendFixedField("actualWork_hour", 92042, "实际出勤工时")); attendFixedFields.add(attendFixedField("attendancemins_hour", 92042, "实际出勤工时"));
/* ====== 异常缺勤 ==================================== */
// 迟到工时 // 迟到工时
attendFixedFields.add(attendFixedField("lateLength_hour", 92043, "迟到工时")); attendFixedFields.add(attendFixedField("belatemins_hour", 92043, "迟到时长"));
attendFixedFields.add(attendFixedField("gravebelatemins_hour", 92043, "严重迟到时长"));
// 早退工时 // 早退工时
attendFixedFields.add(attendFixedField("earlyOutLength_hour", 92044, "早退工时")); attendFixedFields.add(attendFixedField("leaveearlymins_hour", 92044, "早退时长"));
attendFixedFields.add(attendFixedField("graveleaveearlymins_hour", 92044, "严重早退时长"));
// 未出勤工时 // 未出勤工时
attendFixedFields.add(attendFixedField("lostLength_hour", 92045, "未出勤工时")); attendFixedFields.add(attendFixedField("forgotcheckMins_hour", 92045, "漏签时长"));
// 旷工工时 // 旷工工时
attendFixedFields.add(attendFixedField("absenteeismLength_hour", 92046, "旷工工时")); attendFixedFields.add(attendFixedField("absenteeism_hour", 92046, "旷工次数"));
attendFixedFields.add(attendFixedField("absenteeismmins_hour", 92046, "旷工工时"));
// 外勤次数 //----------------------------按天-------------------------------------------------------------
attendFixedFields.add(attendFixedField("oAttendNum_hour", 92047, "外勤次数(按小时)"));
// 外勤时长
attendFixedFields.add(attendFixedField("oAttendLength_hour", 92048, "外勤时长(按小时)"));
/* ====== 出差工时 ==================================== */
// 工作日出差
attendFixedFields.add(attendFixedField("bTnormal_hour", 92049, "工作日出差工时"));
// 周末出差
attendFixedFields.add(attendFixedField("bTweekend_hour", 92050, "周末出差工时"));
// 节假日出差
attendFixedFields.add(attendFixedField("bTholiday_hour", 92051, "节假日出差工时"));
/* ====== 加班工时 ==================================== */
// 工作日加班
attendFixedFields.add(attendFixedField("normal_hour", 92052, "工作日加班工时"));
// 周末加班
attendFixedFields.add(attendFixedField("weekend_hour", 92053, "周末加班工时"));
// 节假日加班
attendFixedFields.add(attendFixedField("holiday_hour", 92054, "节假日加班工时"));
/* ====== 异常考勤 ==================================== */
// 未签到次数
attendFixedFields.add(attendFixedField("absenseNumOfMonth_hour", 92055, "未签到次数(按小时)"));
// 未签退次数
attendFixedFields.add(attendFixedField("unSignOutNumOfMonth_hour", 92056, "未签退次数(按小时)"));
// 未打卡次数
attendFixedFields.add(attendFixedField("unSignNum_hour", 92057, "未打卡次数(按小时)"));
// 申诉次数
attendFixedFields.add(attendFixedField("appealNum_hour", 92058, "申诉次数(按小时)"));
/* ====== 按天 ============================================================================================================ */
// 应出勤天数 // 应出勤天数
attendFixedFields.add(attendFixedField("working_day", 92059, "应出勤天数")); attendFixedFields.add(attendFixedField("workdays_day", 92059, "应出勤天数"));
// 出勤天数
attendFixedFields.add(attendFixedField("actual_day", 92060, "出勤天数"));
// 实际出勤天数 // 实际出勤天数
attendFixedFields.add(attendFixedField("actualWork_day", 92061, "实际出勤天数")); attendFixedFields.add(attendFixedField("attendancedays_day", 92061, "实际出勤天数"));
/* ====== 异常缺勤 ==================================== */ /* ====== 异常缺勤 ==================================== */
// 迟到天数 // 迟到天数
attendFixedFields.add(attendFixedField("lateLength_day", 92062, "迟到天数")); attendFixedFields.add(attendFixedField("belate_day", 92062, "迟到次数"));
attendFixedFields.add(attendFixedField("gravebelate_day", 92043, "严重迟到次数"));
// 早退天数 // 早退天数
attendFixedFields.add(attendFixedField("earlyOutLength_day", 92063, "早退天数")); attendFixedFields.add(attendFixedField("leaveeearly_day", 92063, "早退次数"));
attendFixedFields.add(attendFixedField("graveleaveearly_day", 92044, "严重早退次数"));
// 未出勤天数 // 未出勤天数
attendFixedFields.add(attendFixedField("lostLength_day", 92064, "未出勤天")); attendFixedFields.add(attendFixedField("forgotcheck_day", 92064, "漏签次数"));
// 旷工天数 // 旷工天数
attendFixedFields.add(attendFixedField("absenteeismLength_day", 92065, "旷工天数")); attendFixedFields.add(attendFixedField("absenteeism_day", 92065, "旷工天数"));
// 外勤时长 //请假
attendFixedFields.add(attendFixedField("oAttendNum_day", 92066, "外勤时长天数")); attendFixedFields.add(attendFixedField("leaveMins_day", 92065, "请假时长"));
// 外勤时长 attendFixedFields.add(attendFixedField("evectionMins_day", 92065, "出差时长"));
attendFixedFields.add(attendFixedField("oAttendLength_day", 92048, "外勤时长(按天)")); attendFixedFields.add(attendFixedField("toutMins_day", 92065, "公出时长"));
/* ====== 出差天数 ==================================== */
// 工作日出差
attendFixedFields.add(attendFixedField("bTnormal_day", 92067, "工作日出差天数"));
// 周末出差
attendFixedFields.add(attendFixedField("bTweekend_day", 92068, "周末出差天数"));
// 节假日出差
attendFixedFields.add(attendFixedField("bTholiday_day", 92069, "节假日出差天数"));
/* ====== 加班天数 ==================================== */
// 工作日加班
attendFixedFields.add(attendFixedField("normal_day", 92070, "工作日加班天数"));
// 周末加班
attendFixedFields.add(attendFixedField("weekend_day", 92071, "周末加班天数"));
// 节假日加班
attendFixedFields.add(attendFixedField("holiday_day", 92072, "节假日加班天数"));
/* ====== 异常考勤 ==================================== */
// 未签到次数
attendFixedFields.add(attendFixedField("absenseNumOfMonth_day", 92055, "未签到次数(按天)"));
// 未签退次数
attendFixedFields.add(attendFixedField("unSignOutNumOfMonth_day", 92056, "未签退次数(按天)"));
// 未打卡次数
attendFixedFields.add(attendFixedField("unSignNum_day", 94604, "未打卡次数(按天)"));
// 申诉次数
attendFixedFields.add(attendFixedField("appealNum_day", 94603, "申诉次数(按天)"));
return attendFixedFields; return attendFixedFields;
} }

View File

@ -14,6 +14,7 @@ import java.util.Date;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
//hrsa_attend_quote_field
public class AttendQuoteFieldPO { public class AttendQuoteFieldPO {
/** /**
* 主键 * 主键

View File

@ -14,6 +14,7 @@ import java.util.Date;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
//hrsa_attend_quote_sync_set
public class AttendQuoteFieldSettingPO { public class AttendQuoteFieldSettingPO {
/** /**
* 主键 * 主键

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.datacollection.po; package com.engine.salary.entity.datacollection.po;
import com.engine.salary.annotation.SalaryFormulaVar;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@ -17,54 +18,71 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class OtherDeductionPO { public class OtherDeductionPO {
/** /**
* 主键 * 主键
*/ */
private Long id; private Long id;
/** /**
* 人员信息表的主键id * 人员信息表的主键id
*/ */
private Long employeeId; private Long employeeId;
/** /**
* 个税扣缴义务人的主键id * 个税扣缴义务人的主键id
*/ */
private Long taxAgentId; private Long taxAgentId;
/** /**
* 申报 * 申报
*/ */
private Date declareMonth; private Date declareMonth;
/** /**
* 商业健康保险 * 商业健康保险
*/ */
@SalaryFormulaVar(defaultLabel = "商业健康保险", labelId = 91238, dataType = "number")
private String businessHealthyInsurance; private String businessHealthyInsurance;
/** /**
* 税延养老保险 * 税延养老保险
*/ */
@SalaryFormulaVar(defaultLabel = "税延养老保险", labelId = 91239, dataType = "number")
private String taxDelayEndowmentInsurance; private String taxDelayEndowmentInsurance;
/** /**
* 其他 * 其他
*/ */
@SalaryFormulaVar(defaultLabel = "其他", labelId = 84500, dataType = "number")
private String otherDeduction; private String otherDeduction;
/** /**
* 准予扣除的捐赠额 * 准予扣除的捐赠额
*/ */
@SalaryFormulaVar(defaultLabel = "准予扣除的捐赠额", labelId = 91240, dataType = "number")
private String deductionAllowedDonation; private String deductionAllowedDonation;
/** /**
* 创建时间 * 创建时间
*/ */
private Date createTime; private Date createTime;
/** /**
* 更新时间 * 更新时间
*/ */
private Date updateTime; private Date updateTime;
/** /**
* 创建人 * 创建人
*/ */
private Long creator; private Long creator;
/** /**
* 是否已删除0未删除1已删除 * 是否已删除0未删除1已删除
*/ */
private Integer deleteType; private Integer deleteType;
/** /**
* 租户ID * 租户ID
*/ */

View File

@ -0,0 +1,20 @@
package com.engine.salary.remote.attend.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Attend4Salary {
private Date beginDate;
private Date endDate;
private String unit;
private List<Long> onlyEmpIds;
private Map<String, Object> extendParam;
}

View File

@ -0,0 +1,17 @@
package com.engine.salary.remote.attend.service;
import java.util.Collection;
import java.util.Date;
import java.util.Map;
/**
* 考勤模块
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public interface AttendService {
Map<String,Object> getAttendData(Date begin, Date end, Collection<Long> empIds);
}

View File

@ -0,0 +1,12 @@
package com.engine.salary.service;
/**
* 考勤模块
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public interface AttendService {
}

View File

@ -61,7 +61,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
return (AttendQuoteFieldSettingService) ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user); return (AttendQuoteFieldSettingService) ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user);
} }
private SalarySobService getSalarySobService(User user) { private SalarySobService getSalarySobService(User user) {
return (SalarySobService) ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user); return (SalarySobService) ServiceUtil.getService(SalarySobServiceImpl.class, user);
} }
private AttendQuoteDataMapper getAttendQuoteDataMapper() { private AttendQuoteDataMapper getAttendQuoteDataMapper() {
@ -232,8 +232,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
*/ */
private List<AttendQuoteFieldPO> getAttendQuoteSetFields(AttendQuoteSourceTypeEnum sourceType) { private List<AttendQuoteFieldPO> getAttendQuoteSetFields(AttendQuoteSourceTypeEnum sourceType) {
List<AttendQuoteFieldPO> allAttendQuoteFields = getAllAttendQuoteFields(); List<AttendQuoteFieldPO> allAttendQuoteFields = getAllAttendQuoteFields();
AttendQuoteFieldSettingService attendQuoteFieldSettingService = getFieldSettingService(user); List<AttendQuoteFieldSettingListDTO> attendQuoteFieldSettingList = getFieldSettingService(user).listNoSync(AttendQuoteFieldSettingQueryParam.builder().sourceType(sourceType).isViewChecked(Boolean.TRUE).build());
List<AttendQuoteFieldSettingListDTO> attendQuoteFieldSettingList = attendQuoteFieldSettingService.listNoSync(AttendQuoteFieldSettingQueryParam.builder().sourceType(sourceType).isViewChecked(Boolean.TRUE).build());
List<AttendQuoteFieldPO> attendQuoteFields = new ArrayList<>(); List<AttendQuoteFieldPO> attendQuoteFields = new ArrayList<>();
attendQuoteFieldSettingList.forEach(s -> { attendQuoteFieldSettingList.forEach(s -> {
List<AttendQuoteFieldSettingFieldListDTO> items = s.getItems(); List<AttendQuoteFieldSettingFieldListDTO> items = s.getItems();
@ -384,11 +383,9 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
// int partSize = 500; // int partSize = 500;
// List<List<Long>> partition = Lists.partition(employeeIds, partSize); // List<List<Long>> partition = Lists.partition(employeeIds, partSize);
// for (List<Long> part : partition) { // for (List<Long> part : partition) {
// attend4Salary.setBeginDate(SalaryDateUtil.localDateToDate(attendCycleRange.getFromDate())); // attend4Salary.setBeginDate(attendCycleRange.getFromDate());
// attend4Salary.setEndDate(SalaryDateUtil.localDateToDate(attendCycleRange.getEndDate())); // attend4Salary.setEndDate(attendCycleRange.getEndDate());
// attend4Salary.setTenantKey(currentTenantKey);
// attend4Salary.setOnlyEmpIds(part); // attend4Salary.setOnlyEmpIds(part);
// attend4Salary.setPageSize(partSize);
// attend4Salary.setUnit("hour"); // attend4Salary.setUnit("hour");
// WeaResult<Map<String, Object>> attendResult = remoteAttend4SalaryService.getWorkTimeSummary(attend4Salary, AttendQuoteDataBO.getCurrentUser4Remote()); // WeaResult<Map<String, Object>> attendResult = remoteAttend4SalaryService.getWorkTimeSummary(attend4Salary, AttendQuoteDataBO.getCurrentUser4Remote());
// log.info("考勤数据[按小时]:{}", JSONUtils.toJSONString(attendResult.getData())); // log.info("考勤数据[按小时]:{}", JSONUtils.toJSONString(attendResult.getData()));

View File

@ -70,7 +70,6 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
@Override @Override
public Map<String, Object> list(AttendQuoteFieldQueryParam queryParam) { public Map<String, Object> list(AttendQuoteFieldQueryParam queryParam) {
// todo 同步字段
syncAttendFields(); syncAttendFields();
String fields = " t1.id," + String fields = " t1.id," +

View File

@ -2,16 +2,19 @@ package com.engine.salary.web;
import com.engine.common.util.ParamUtil; import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil; import com.engine.common.util.ServiceUtil;
import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldFormDTO;
import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldSettingListDTO; import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldSettingListDTO;
import com.engine.salary.entity.datacollection.dto.AttendQuoteListDTO; import com.engine.salary.entity.datacollection.dto.AttendQuoteListDTO;
import com.engine.salary.entity.datacollection.param.*; import com.engine.salary.entity.datacollection.param.*;
import com.engine.salary.entity.datacollection.po.AttendQuoteFieldPO;
import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.util.ResponseResult; import com.engine.salary.util.ResponseResult;
import com.engine.salary.util.SalaryDateUtil; import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.page.PageInfo;
import com.engine.salary.wrapper.*; import com.engine.salary.wrapper.AttendQuoteDataWrapper;
import com.engine.salary.wrapper.AttendQuoteFieldSettingWrapper;
import com.engine.salary.wrapper.AttendQuoteFieldWrapper;
import com.engine.salary.wrapper.AttendQuoteWrapper;
import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@ -241,7 +244,7 @@ public class AttendQuoteController {
if (StringUtils.isNotBlank(idStr)) { if (StringUtils.isNotBlank(idStr)) {
id = Long.parseLong(request.getParameter("id")); id = Long.parseLong(request.getParameter("id"));
} }
return new ResponseResult<Long, AttendQuoteFieldPO>().run(getAttendQuoteFieldWrapper(user)::getFrom, id); return new ResponseResult<Long, AttendQuoteFieldFormDTO>().run(getAttendQuoteFieldWrapper(user)::getFrom, id);
} }