commit 6e330fdb62c056cc35a2b19d0d76ba4730a5c5bf Author: chenwei <3291673014@qq.com> Date: Tue Dec 5 10:33:03 2023 +0800 我的考勤页面假期类型控制 diff --git a/src/customization/geoharbour/GetHrmKQReportInfoCmdInter.java b/src/customization/geoharbour/GetHrmKQReportInfoCmdInter.java new file mode 100644 index 0000000..71de82a --- /dev/null +++ b/src/customization/geoharbour/GetHrmKQReportInfoCmdInter.java @@ -0,0 +1,53 @@ +package customization.geoharbour; + +import com.engine.core.cfg.annotation.CommandDynamicProxy; +import com.engine.core.interceptor.AbstractCommandProxy; +import com.engine.core.interceptor.Command; +import com.engine.kq.cmd.myattendance.GetHrmKQMonthReportInfoCmd; +import com.engine.kq.cmd.myattendance.GetHrmKQReportInfoCmd; +import org.apache.commons.lang.StringUtils; +import weaver.conn.RecordSet; +import weaver.general.Util; +import weaver.hrm.User; + +import java.time.LocalDate; +import java.time.YearMonth; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +@CommandDynamicProxy(target = GetHrmKQReportInfoCmd.class, desc = "GetHrmKQReportInfoCmd") +public class GetHrmKQReportInfoCmdInter extends AbstractCommandProxy> { + @Override + public Map execute(Command> command) { + + GetHrmKQReportInfoCmd cmd = (GetHrmKQReportInfoCmd) command; + Map params = cmd.getParams(); + Map result = new HashMap<>(); + + //获取我的考勤查看人员 + User user = cmd.getUser(); + String resourceId = Util.null2String(params.get("resourceId")); + if (StringUtils.isBlank(resourceId)) { + resourceId = Util.null2String(cmd.getUser().getUID()); + + //根据人员获取所在部门 + RecordSet rs = new RecordSet(); + String departmentId = "0"; + String acqDeptSql = "select departmentid from hrmresource where id = ? "; + rs.executeQuery(acqDeptSql,resourceId); + while (rs.next()) { + departmentId = Util.null2String(rs.getString("departmentid")); + } + //根据部门确定假期范围 + String acqLeaveTypeSql = "select "; + } + + + result = nextExecute(cmd); + + return result; + } +}