浙文 人员调动计划任务

浙文眼镜
dxfeng 7 months ago
parent 3b4e7af398
commit 17fc7fba83

@ -1,4 +1,4 @@
package com.engine.mzg.exception; package com.engine.zhewen.exception;
/** /**
* @Author weaver_cl * @Author weaver_cl

@ -1,4 +1,4 @@
package com.engine.mzg.util; package com.engine.zhewen.util;
/** /**
* @Author weaver_cl * @Author weaver_cl

@ -1,11 +1,11 @@
package com.engine.mzg.util; package com.engine.zhewen.util;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.engine.core.exception.ECException; import com.engine.core.exception.ECException;
import com.engine.mzg.exception.CustomizeRunTimeException; import com.engine.zhewen.exception.CustomizeRunTimeException;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -50,7 +50,7 @@ public class ResponseResult<T, R> {
log.info("run api , param {}", t); log.info("run api , param {}", t);
} }
return getJsonString(f.apply(t)); return getJsonString(f.apply(t));
} catch (CustomizeRunTimeException e) { } catch (com.engine.zhewen.exception.CustomizeRunTimeException e) {
log.error("api run fail", e); log.error("api run fail", e);
return Error(e.getMessage()); return Error(e.getMessage());
} catch (ECException e) { } catch (ECException e) {
@ -72,7 +72,7 @@ public class ResponseResult<T, R> {
log.info("run api , param {}", t); log.info("run api , param {}", t);
} }
return Ok(f.apply(t)); return Ok(f.apply(t));
} catch (CustomizeRunTimeException e) { } catch (com.engine.zhewen.exception.CustomizeRunTimeException e) {
log.error("api run fail", e); log.error("api run fail", e);
return Error(e.getMessage()); return Error(e.getMessage());
} catch (ECException e) { } catch (ECException e) {
@ -95,7 +95,7 @@ public class ResponseResult<T, R> {
} }
f.accept(t); f.accept(t);
return Ok(); return Ok();
} catch (CustomizeRunTimeException e) { } catch (com.engine.zhewen.exception.CustomizeRunTimeException e) {
log.error("api run fail", e); log.error("api run fail", e);
return Error(e.getMessage()); return Error(e.getMessage());
} catch (ECException e) { } catch (ECException e) {

@ -202,25 +202,27 @@ public class EmployeeTransferJob extends BaseCronJob {
rst.writeLog("xkqz222==" + xkqz); rst.writeLog("xkqz222==" + xkqz);
KQGroupMemberComInfo kqGroupMemberComInfo = new KQGroupMemberComInfo(); if (StringUtils.isNotBlank(xkqz)) {
String kqGroupId = kqGroupMemberComInfo.getKQGroupId(ddr); KQGroupMemberComInfo kqGroupMemberComInfo = new KQGroupMemberComInfo();
rst.writeLog("kqGroupId===" + kqGroupId); String kqGroupId = kqGroupMemberComInfo.getKQGroupId(ddr);
if (!kqGroupId.equals(xkqz)) { rst.writeLog("kqGroupId===" + kqGroupId);
// 更新“调动人”的【考勤组】为:新考勤组; if (!kqGroupId.equals(xkqz)) {
// 更新“调动人”的新考勤组中的“生效日期”=调动生效日期; // 更新“调动人”的【考勤组】为:新考勤组;
// 更新“调动人”的原考勤组中的“失效日期”=调动生效日期 - 1天 // 更新“调动人”的新考勤组中的“生效日期”=调动生效日期;
String sql = "insert into kq_groupmember(groupid,typevalue,type,seclevel,seclevelto,validatefrom,validateto) values(?,?,1,0,100,?,'2999-12-31')"; // 更新“调动人”的原考勤组中的“失效日期”=调动生效日期 - 1天
rst.executeUpdate(sql, xkqz, ddr, ddsxrq); String sql = "insert into kq_groupmember(groupid,typevalue,type,seclevel,seclevelto,validatefrom,validateto) values(?,?,1,0,100,?,'2999-12-31')";
// 如果生效日期小于失效日期,将生效日期也改为失效日期 rst.executeUpdate(sql, xkqz, ddr, ddsxrq);
rst.executeQuery("select * from kq_groupmember where type = 1 and ISNULL(isDelete,0) != 1 and typevalue = ? and groupid = ?", ddr, kqGroupId); // 如果生效日期小于失效日期,将生效日期也改为失效日期
if(rst.next()){ rst.executeQuery("select * from kq_groupmember where type = 1 and ISNULL(isDelete,0) != 1 and typevalue = ? and groupid = ?", ddr, kqGroupId);
String validatefrom = rst.getString("validatefrom"); //if (rst.next()) {
} // String validatefrom = rst.getString("validatefrom");
//}
sql = "update kq_groupmember set validateto = ? where type = 1 and ISNULL(isDelete,0) != 1 and typevalue = ? and groupid = ?"; sql = "update kq_groupmember set validateto = ? where type = 1 and ISNULL(isDelete,0) != 1 and typevalue = ? and groupid = ?";
String yesterday = DateUtil.addDate(ddsxrq, -1); String yesterday = DateUtil.addDate(ddsxrq, -1);
rst.writeLog("yesterday===" + yesterday); rst.writeLog("yesterday===" + yesterday);
rst.executeUpdate(sql, yesterday, ddr, kqGroupId); rst.executeUpdate(sql, yesterday, ddr, kqGroupId);
}
} }
rst.writeLog("updateEmployeeGroup---finish"); rst.writeLog("updateEmployeeGroup---finish");

Loading…
Cancel
Save