请假流程过滤节假日,修复请假流程提交校验假期余额逻辑
parent
23459242c7
commit
959163ad69
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,12 +1,31 @@
|
||||
DriverClasses=oracle.jdbc.OracleDriver
|
||||
#DriverClasses=oracle.jdbc.OracleDriver
|
||||
#
|
||||
#ecology.url = jdbc:oracle:thin:@192.168.0.106:1521:ecology
|
||||
#ecology.user = hrm_test
|
||||
#ecology.password = ecology
|
||||
#ecology.charset = ISO
|
||||
#ecology.maxconn = 300
|
||||
#ecology.minconn = 50
|
||||
#ecology.maxusecount = 6000
|
||||
#ecology.maxidletime = 600
|
||||
#ecology.maxalivetime = 10
|
||||
#ecology.checktime = 3600
|
||||
|
||||
ecology.url = jdbc:oracle:thin:@192.168.0.106:1521:ecology
|
||||
ecology.user = hrm_test
|
||||
ecology.password = ecology
|
||||
|
||||
|
||||
DriverClasses = com.mysql.cj.jdbc.Driver
|
||||
|
||||
ecology.url = jdbc:mysql://221.226.25.34:8286/ecologyjcl?characterEncoding=utf8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=Asia/Shanghai
|
||||
ecology.user = fanwei
|
||||
ecology.password = alpwsl92
|
||||
ecology.charset = ISO
|
||||
ecology.maxconn = 300
|
||||
ecology.minconn = 50
|
||||
ecology.maxusecount = 6000
|
||||
ecology.maxidletime = 600
|
||||
ecology.maxalivetime = 10
|
||||
ecology.checktime = 3600
|
||||
ecology.checktime = 3600
|
||||
|
||||
ecology.isgoveproj = 0
|
||||
LOG_FORMAT = yyyy.MM.dd'-'hh:mm:ss
|
||||
DEBUG_MODE = false
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1,41 @@
|
||||
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;
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.engine.attendance.workflow.cmd;
|
||||
|
||||
import com.engine.attendance.enums.CheckBoxEnum;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.common.util.CommonUtil;
|
||||
import com.engine.common.util.DateUtil;
|
||||
import com.engine.common.util.DbTools;
|
||||
import com.engine.common.util.Utils;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.company.SubCompanyComInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
public class GetRestDayIntervalCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public GetRestDayIntervalCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> resultMap = Maps.newHashMap();
|
||||
|
||||
String userId = Util.null2String(params.get("userId"));
|
||||
String startDate = Util.null2String(params.get("startDate"));
|
||||
String endDate = Util.null2String(params.get("endDate"));
|
||||
String modeId = Utils.getFormmodeIdMap().get("uf_jcl_kq_rlmc");
|
||||
Set<String> calendarSetIdsSets = CommonUtil.getDataIds(userId,modeId, DateUtil.getCurrentDate(),DateUtil.getCurrentDate());
|
||||
if (calendarSetIdsSets.size() > 0){
|
||||
String sql = "select rqlx,rq from uf_jcl_kq_rlxx where rlmc=? and rq>=? and rq<=?";
|
||||
List<Map<String,Object>> dataList = DbTools.getSqlToList(sql,calendarSetIdsSets.toArray()[0],startDate,endDate);
|
||||
if (dataList.size() == 0){
|
||||
dataList = getDefaultDateType(userId,startDate,endDate);
|
||||
}
|
||||
resultMap.put("data",dataList);
|
||||
}else {
|
||||
resultMap.put("data",getDefaultDateType(userId,startDate,endDate));
|
||||
}
|
||||
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
public List<Map<String,Object>> getDefaultDateType(String userId,String startDate,String endDate){
|
||||
List<Map<String,Object>> resultList = Lists.newArrayList();
|
||||
String sql = "select subcompanyid1 from hrmresource where id =?";
|
||||
Map<String,Object> departMentMap = DbTools.getSqlToMap(sql,userId);
|
||||
String subcompanyid1 = departMentMap.get("subcompanyid1").toString();
|
||||
String parentSubcompanyids = "";
|
||||
try {
|
||||
parentSubcompanyids = new SubCompanyComInfo().getAllParentSubcompanyId(subcompanyid1,parentSubcompanyids);
|
||||
}catch (Exception e){
|
||||
log.error("getDefaultDateType error:[{}]",e);
|
||||
}
|
||||
parentSubcompanyids = subcompanyid1+parentSubcompanyids;
|
||||
sql = "select b.szjg,a.rqlx,a.rq from uf_jcl_kq_rlxx a left join uf_jcl_kq_rlmc b on a.rlmc=b.id where b.mrrl=1 and b.szjg in ("+parentSubcompanyids+") and a.rq>=? and a.rq<=?";
|
||||
List<Map<String,Object>> dataList = DbTools.getSqlToList(sql,startDate,endDate);
|
||||
Map<String,List<Map<String,Object>>> dataGroupByOrganzation = dataList.stream().collect(Collectors.groupingBy(e->e.get("szjg").toString()));
|
||||
for (int i=0;i<parentSubcompanyids.split(",").length;i++){
|
||||
String subId = parentSubcompanyids.split(",")[i];
|
||||
resultList = dataGroupByOrganzation.get(subId);
|
||||
if (resultList != null && resultList.size()>0){
|
||||
break;
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,37 @@
|
||||
package workflow;
|
||||
|
||||
import com.engine.attendance.vacation.service.VocationService;
|
||||
import com.engine.attendance.vacation.service.impl.VocationServiceImpl;
|
||||
import com.engine.attendance.workflow.service.AskForLeaveService;
|
||||
import com.engine.attendance.workflow.service.impl.AskForLeaveServiceImpl;
|
||||
import com.engine.common.util.CommonUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.common.util.Utils;
|
||||
import com.engine.cube.service.ModeImpExpService;
|
||||
import com.engine.cube.service.impl.ModeImpExpServiceImpl;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.junit.Test;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.company.SubCompanyComInfo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class Test1 extends beforlog {
|
||||
private ModeImpExpService getService(User user) {
|
||||
return (ModeImpExpService) ServiceUtil.getService(ModeImpExpServiceImpl.class, user);
|
||||
}
|
||||
AskForLeaveService askForLeaveService = ServiceUtil.getService(AskForLeaveServiceImpl.class);
|
||||
@Test
|
||||
public void test1() {
|
||||
Map<String,Object> param = Maps.newHashMap();
|
||||
param.put("itemId","139");
|
||||
param.put("userId","34");
|
||||
param.put("startDate","2024-05-01");
|
||||
param.put("endDate","2024-05-28");
|
||||
Map<String,Object> result = askForLeaveService.getRestDayInterval(param);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package vocation;
|
||||
package workflow;
|
||||
|
||||
import org.easymock.EasyMock;
|
||||
import org.junit.After;
|
@ -1,70 +0,0 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
|
||||
<jsp:useBean id="strUtil" class="weaver.common.StringUtil" scope="page" />
|
||||
<jsp:useBean id="dateUtil" class="weaver.common.DateUtil" scope="page" />
|
||||
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
|
||||
<jsp:useBean id="attProcSetManager" class="com.engine.kq.wfset.attendance.manager.HrmAttProcSetManager" scope="page" />
|
||||
<%
|
||||
|
||||
%>
|
||||
|
||||
<script >
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
try{
|
||||
|
||||
|
||||
WfForm.bindDetailFieldChangeEvent(WfForm.convertFieldNameToId("bdkrq", "detail_1"),function(id,rowIndex,value){
|
||||
console.log("WfForm.bindDetailFieldChangeEvent--",id,rowIndex,value);
|
||||
let bdkry = WfForm.getFieldValue(WfForm.convertFieldNameToId('bdkry'));
|
||||
$.ajax({
|
||||
url:'/api/operate/common/queryCommon',
|
||||
data:{
|
||||
action:'query_common',
|
||||
mark:'query_attendance_result',
|
||||
condition:'ygid:'+bdkry+',rq:'+value
|
||||
},
|
||||
type:'GET',
|
||||
dataType:'json',
|
||||
success:function(res){
|
||||
console.log(res)
|
||||
if(res.data.data.length > 0){
|
||||
let data = res.data.data[0]
|
||||
//班次信息
|
||||
WfForm.changeFieldValue(WfForm.convertFieldNameToId("bcbdxx", "detail_1")+"_"+rowIndex, {value:data.bcbdxx});
|
||||
//出勤结果
|
||||
WfForm.changeFieldValue(WfForm.convertFieldNameToId("cqjg", "detail_1")+"_"+rowIndex, {value:data.cqzt});
|
||||
|
||||
let dkxx='';
|
||||
for(let i=1;i<9;i++){
|
||||
let j = "j"+i;
|
||||
let c = "c"+i;
|
||||
let jvalue="";
|
||||
let cvalue="";
|
||||
for (let key in data){
|
||||
if(key == j){
|
||||
jvalue = data[key];
|
||||
}else if (key == c){
|
||||
cvalue = data[key];
|
||||
}
|
||||
}
|
||||
if (jvalue != "" || cvalue != ""){
|
||||
dkxx = dkxx +jvalue+"-"+cvalue+",";
|
||||
}
|
||||
}
|
||||
if (dkxx.length >0){
|
||||
dkxx.substring(0,dkxx.length-1);
|
||||
}
|
||||
//打卡信息
|
||||
WfForm.changeFieldValue(WfForm.convertFieldNameToId("dkxx", "detail_1")+"_"+rowIndex, {value:dkxx});
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
}catch (e) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue