浙文 人员调动计划任务

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

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

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

@ -202,25 +202,27 @@ public class EmployeeTransferJob extends BaseCronJob {
rst.writeLog("xkqz222==" + xkqz);
KQGroupMemberComInfo kqGroupMemberComInfo = new KQGroupMemberComInfo();
String kqGroupId = kqGroupMemberComInfo.getKQGroupId(ddr);
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')";
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()){
String validatefrom = rst.getString("validatefrom");
}
if (StringUtils.isNotBlank(xkqz)) {
KQGroupMemberComInfo kqGroupMemberComInfo = new KQGroupMemberComInfo();
String kqGroupId = kqGroupMemberComInfo.getKQGroupId(ddr);
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')";
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()) {
// String validatefrom = rst.getString("validatefrom");
//}
sql = "update kq_groupmember set validateto = ? where type = 1 and ISNULL(isDelete,0) != 1 and typevalue = ? and groupid = ?";
String yesterday = DateUtil.addDate(ddsxrq, -1);
rst.writeLog("yesterday===" + yesterday);
rst.executeUpdate(sql, yesterday, ddr, kqGroupId);
sql = "update kq_groupmember set validateto = ? where type = 1 and ISNULL(isDelete,0) != 1 and typevalue = ? and groupid = ?";
String yesterday = DateUtil.addDate(ddsxrq, -1);
rst.writeLog("yesterday===" + yesterday);
rst.executeUpdate(sql, yesterday, ddr, kqGroupId);
}
}
rst.writeLog("updateEmployeeGroup---finish");

Loading…
Cancel
Save