You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.5 KiB
Java
42 lines
1.5 KiB
Java
1 year ago
|
package com.engine.attendance.vacation.cmd;
|
||
|
|
||
|
import com.engine.common.biz.AbstractCommonCommand;
|
||
|
import com.engine.common.entity.BizLogContext;
|
||
|
import com.engine.common.util.DateUtil;
|
||
|
import com.engine.common.util.DbTools;
|
||
|
import com.engine.core.interceptor.CommandContext;
|
||
|
import weaver.general.Util;
|
||
|
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
import java.util.Set;
|
||
|
import java.util.stream.Collectors;
|
||
|
|
||
|
public class HandleOverdueVocationCmd extends AbstractCommonCommand<Map<String,Object>> {
|
||
|
public HandleOverdueVocationCmd(Map<String,Object> params){
|
||
|
this.params=params;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public BizLogContext getLogContext() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Map<String, Object> execute(CommandContext commandContext) {
|
||
|
String releaseDate = Util.null2String(params.get("releaseDate"));
|
||
|
if ("".equals(releaseDate)){
|
||
|
releaseDate = DateUtil.getCurrentDate();
|
||
|
}
|
||
|
|
||
|
String sql = "select jb,jywxcl,yqsc,edkyqcs,yqhedzgxz from uf_jcl_kq_jqed where jywxcl in (0,1)";
|
||
|
List<Map<String,Object>> holidayRuleList = DbTools.getSqlToList(sql);
|
||
|
Set<String> jbsets = holidayRuleList.stream().map(e->e.get("jb").toString()).collect(Collectors.toSet());
|
||
|
sql = "select id,jqid,sxrq,jzrq,yqsxrq from uf_jcl_kq_jqye where yqsxrq<? and jqid in ("+String.join(",",jbsets)+")";
|
||
|
List<Map<String,Object>> holidayBalanceList = DbTools.getSqlToList(sql,releaseDate);
|
||
|
|
||
|
|
||
|
return null;
|
||
|
}
|
||
|
}
|