Compare commits
13 Commits
master
...
武汉联特科技股份有限
Author | SHA1 | Date |
---|---|---|
|
4e4edb0c2d | 7 days ago |
|
c083975d62 | 7 days ago |
|
f88a0aefec | 1 month ago |
|
686c6e968b | 1 month ago |
|
adecc5ca95 | 1 month ago |
|
769d5d3db1 | 7 months ago |
|
4a1213d429 | 8 months ago |
|
3e5b0e0b08 | 8 months ago |
|
3349b6a2e4 | 8 months ago |
|
593594458c | 8 months ago |
|
d3d6ccde30 | 9 months ago |
|
fd45118dd7 | 9 months ago |
|
8fbf36fc8b | 9 months ago |
@ -1,15 +1,10 @@
|
|||||||
/weaver-develop.iml
|
/weaver-develop.iml
|
||||||
/out/
|
/out/
|
||||||
.idea/
|
.idea/
|
||||||
|
/target/
|
||||||
HELP.md
|
|
||||||
target/
|
|
||||||
|
|
||||||
.idea
|
|
||||||
|
|
||||||
/test
|
|
||||||
/src/rebel.xml
|
/src/rebel.xml
|
||||||
/src/META-INF
|
/src/META-INF
|
||||||
/WEB-INF/config
|
/WEB-INF/config
|
||||||
|
|
||||||
/log
|
/log
|
||||||
|
/src/META-INF/
|
||||||
|
/src/test/
|
@ -1,8 +0,0 @@
|
|||||||
<component name="ArtifactManager">
|
|
||||||
<artifact type="jar" name="weaver-develop:jar">
|
|
||||||
<output-path>$PROJECT_DIR$/out/artifacts/weaver_develop_jar</output-path>
|
|
||||||
<root id="archive" name="weaver-develop.jar">
|
|
||||||
<element id="module-output" name="weaver-develop" />
|
|
||||||
</root>
|
|
||||||
</artifact>
|
|
||||||
</component>
|
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CompilerConfiguration">
|
|
||||||
<annotationProcessing>
|
|
||||||
<profile default="true" name="Default" enabled="true" />
|
|
||||||
</annotationProcessing>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,9 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="classbean">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="file://$PROJECT_DIR$/../../../../weaver/ecology/classbean" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC />
|
|
||||||
<SOURCES />
|
|
||||||
</library>
|
|
||||||
</component>
|
|
@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="lib">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC />
|
|
||||||
<SOURCES>
|
|
||||||
<root url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" />
|
|
||||||
</SOURCES>
|
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" recursive="false" />
|
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/../../../../weaver/ecology/WEB-INF/lib" recursive="false" type="SOURCES" />
|
|
||||||
</library>
|
|
||||||
</component>
|
|
@ -0,0 +1,26 @@
|
|||||||
|
## \u7B2C\u4E00\u5B66\u5386
|
||||||
|
firstDegree=field29
|
||||||
|
|
||||||
|
## \u7B2C\u4E00\u5B66\u5386\u4E13\u4E1A
|
||||||
|
firstDegreeMajor=field30
|
||||||
|
|
||||||
|
## \u6700\u9AD8\u5B66\u5386
|
||||||
|
highestDegree=field31
|
||||||
|
|
||||||
|
## \u6700\u9AD8\u5B66\u5386\u4E13\u4E1A
|
||||||
|
highestDegreeMajor=field32
|
||||||
|
|
||||||
|
## \u5E74\u9F84
|
||||||
|
age=field33
|
||||||
|
|
||||||
|
## \u6700\u8FD1\u4E00\u4EFD\u5DE5\u4F5C\u5355\u4F4D\u540D\u79F0
|
||||||
|
lastWorkunitName=field34
|
||||||
|
|
||||||
|
## \u6700\u8FD1\u4E00\u4EFD\u5DE5\u4F5C\u5C97\u4F4D
|
||||||
|
lastJobName=field35
|
||||||
|
|
||||||
|
## \u4E2A\u4EBA\u4FE1\u606F
|
||||||
|
scopeid=1
|
||||||
|
|
||||||
|
## \u6D88\u606F\u63D0\u9192ID
|
||||||
|
messageRemindId=1186
|
@ -1,3 +0,0 @@
|
|||||||
Manifest-Version: 1.0
|
|
||||||
Main-Class: test.MainTest
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.api.seclinktel.web;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/19 11:03
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Path("/seclinktel/performance/workflow")
|
||||||
|
public class PerformanceWorkflowAction extends com.engine.seclinktel.web.PerformanceWorkflowAction {
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,90 @@
|
|||||||
|
package com.engine.kq.biz;
|
||||||
|
|
||||||
|
import com.engine.kq.log.KQLog;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤异常提醒公共接口
|
||||||
|
*/
|
||||||
|
public class KqYesterdayAbnormalRemindBiz {
|
||||||
|
|
||||||
|
private KQLog kqLog = new KQLog();
|
||||||
|
/**
|
||||||
|
* 获取昨天考勤异常相关数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<String, Map<String, Double>> getYesterdayAbnormalData(String fromDate, String toDate) {
|
||||||
|
return getYesterdayAbnormalData(fromDate, toDate, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Map<String, Double>> getYesterdayAbnormalData(String fromDate, String toDate, String resourceId) {
|
||||||
|
kqLog.info("KqAbnormalRemindBiz::getYesterdayAbnormalData:fromDate"+fromDate+":toDate:"+toDate+":resourceId:"+resourceId);
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
Map<String, Map<String, Double>> yesterdayAbnormalMap = new HashMap<>();
|
||||||
|
String forgotBeginWorkCheck_field = " sum(b.forgotBeginWorkCheck) ";
|
||||||
|
|
||||||
|
if(rs.getDBType().equalsIgnoreCase("oracle") || rs.getDBType().equalsIgnoreCase("gs")) {
|
||||||
|
forgotBeginWorkCheck_field = " sum(nvl(b.forgotbeginworkcheckmins,0)) ";
|
||||||
|
}else if((rs.getDBType()).equalsIgnoreCase("mysql")){
|
||||||
|
forgotBeginWorkCheck_field = " sum(ifnull(b.forgotbeginworkcheckmins,0)) ";
|
||||||
|
}else {
|
||||||
|
forgotBeginWorkCheck_field = " sum(isnull(b.forgotbeginworkcheckmins,0)) ";
|
||||||
|
}
|
||||||
|
String backFields = " a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1 as subcompanyid,a.departmentid,a.jobtitle," +
|
||||||
|
" sum(b.beLateMins) as beLateMins, " +
|
||||||
|
" sum(b.graveBeLateMins) as graveBeLateMins," +
|
||||||
|
" sum(b.leaveEarlyMins) as leaveEarlyMins, " +
|
||||||
|
" sum(b.graveLeaveEarlyMins) as graveLeaveEarlyMins, " +
|
||||||
|
" sum(b.absenteeismMins) as absenteeismMins, sum(b.forgotcheckmins)+"+forgotBeginWorkCheck_field+" as forgotCheckMins ";
|
||||||
|
|
||||||
|
if(rs.getDBType().equals("oracle")){
|
||||||
|
backFields = "/*+ index(kq_format_total IDX_KQ_FORMAT_TOTAL_KQDATE) */ "+backFields;
|
||||||
|
}
|
||||||
|
String sqlFrom = " from hrmresource a, kq_format_detail b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
|
||||||
|
if(resourceId != null) {
|
||||||
|
sqlFrom += " and (a.accounttype = 0 or a.accounttype is null) and a.id="+resourceId;
|
||||||
|
}
|
||||||
|
String groupBy = " group by a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1,a.departmentid,a.jobtitle ";
|
||||||
|
String sql = backFields + sqlFrom + groupBy;
|
||||||
|
sql = " select " + sql;
|
||||||
|
kqLog.info("KqAbnormalRemindBiz::sql:"+sql);
|
||||||
|
rs.executeQuery(sql);
|
||||||
|
while (rs.next()) {
|
||||||
|
Map<String, Double> abnormalDataMap = new HashMap<>();
|
||||||
|
String userId = rs.getString("id");
|
||||||
|
double beLateMins = Util.getDoubleValue(rs.getString("beLateMins"), 0.0);//迟到
|
||||||
|
double graveBeLateMins = Util.getDoubleValue(rs.getString("graveBeLateMins"), 0.0);//严重迟到
|
||||||
|
double leaveEarlyMins = Util.getDoubleValue(rs.getString("leaveEarlyMins"), 0.0);//早退
|
||||||
|
double graveLeaveEarlyMins = Util.getDoubleValue(rs.getString("graveLeaveEarlyMins"), 0.0);//严重早退
|
||||||
|
double absenteeismMins = Util.getDoubleValue(rs.getString("absenteeismMins"), 0.0);//旷工
|
||||||
|
double forgotCheck = Util.getDoubleValue(rs.getString("forgotCheckMins"), 0.0);//漏签
|
||||||
|
if(beLateMins> 0) {
|
||||||
|
abnormalDataMap.put("late", beLateMins);
|
||||||
|
}
|
||||||
|
if(graveBeLateMins> 0) {
|
||||||
|
abnormalDataMap.put("gravelate", graveBeLateMins);
|
||||||
|
}
|
||||||
|
if(leaveEarlyMins> 0) {
|
||||||
|
abnormalDataMap.put("leaveearly", leaveEarlyMins);
|
||||||
|
}
|
||||||
|
if(graveLeaveEarlyMins> 0) {
|
||||||
|
abnormalDataMap.put("graveleaveearly", graveLeaveEarlyMins);
|
||||||
|
}
|
||||||
|
if(absenteeismMins> 0) {
|
||||||
|
abnormalDataMap.put("absent", absenteeismMins);
|
||||||
|
}
|
||||||
|
if(forgotCheck> 0) {
|
||||||
|
abnormalDataMap.put("forgot", forgotCheck);
|
||||||
|
}
|
||||||
|
if(!abnormalDataMap.isEmpty()) {
|
||||||
|
yesterdayAbnormalMap.put(userId, abnormalDataMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
kqLog.info("KqAbnormalRemindBiz::getYesterdayAbnormalData:yesterdayAbnormalMap"+yesterdayAbnormalMap);
|
||||||
|
return yesterdayAbnormalMap;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,235 @@
|
|||||||
|
package com.engine.kq.entity;
|
||||||
|
|
||||||
|
public class KQGroupEntity {
|
||||||
|
private String id;
|
||||||
|
private String groupname;
|
||||||
|
private String excludeid;
|
||||||
|
private String excludecount;
|
||||||
|
private String subcompanyid;
|
||||||
|
private String kqtype;
|
||||||
|
private String serialids;
|
||||||
|
private String weekday;
|
||||||
|
private String signstart;
|
||||||
|
private String workhour;
|
||||||
|
private String isdelete;
|
||||||
|
private String signintype;
|
||||||
|
private String ipscope;
|
||||||
|
private String locationcheck;
|
||||||
|
private String locationcheckscope;
|
||||||
|
private String wificheck;
|
||||||
|
private String outsidesign;
|
||||||
|
|
||||||
|
private String outsignapprove;
|
||||||
|
private String validity;
|
||||||
|
private String validityfromdate;
|
||||||
|
private String validityenddate;
|
||||||
|
private String locationfacecheck;
|
||||||
|
private String locationshowaddress;
|
||||||
|
private String wififacecheck;
|
||||||
|
private String calmethod;
|
||||||
|
private String abnormalremind;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroupname() {
|
||||||
|
return groupname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupname(String groupname) {
|
||||||
|
this.groupname = groupname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExcludeid() {
|
||||||
|
return excludeid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExcludeid(String excludeid) {
|
||||||
|
this.excludeid = excludeid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExcludecount() {
|
||||||
|
return excludecount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExcludecount(String excludecount) {
|
||||||
|
this.excludecount = excludecount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubcompanyid() {
|
||||||
|
return subcompanyid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubcompanyid(String subcompanyid) {
|
||||||
|
this.subcompanyid = subcompanyid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKqtype() {
|
||||||
|
return kqtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKqtype(String kqtype) {
|
||||||
|
this.kqtype = kqtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerialids() {
|
||||||
|
return serialids;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerialids(String serialids) {
|
||||||
|
this.serialids = serialids;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWeekday() {
|
||||||
|
return weekday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeekday(String weekday) {
|
||||||
|
this.weekday = weekday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSignstart() {
|
||||||
|
return signstart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignstart(String signstart) {
|
||||||
|
this.signstart = signstart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkhour() {
|
||||||
|
return workhour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWorkhour(String workhour) {
|
||||||
|
this.workhour = workhour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsdelete() {
|
||||||
|
return isdelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsdelete(String isdelete) {
|
||||||
|
this.isdelete = isdelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSignintype() {
|
||||||
|
return signintype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignintype(String signintype) {
|
||||||
|
this.signintype = signintype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIpscope() {
|
||||||
|
return ipscope;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIpscope(String ipscope) {
|
||||||
|
this.ipscope = ipscope;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationcheck() {
|
||||||
|
return locationcheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationcheck(String locationcheck) {
|
||||||
|
this.locationcheck = locationcheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationcheckscope() {
|
||||||
|
return locationcheckscope;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationcheckscope(String locationcheckscope) {
|
||||||
|
this.locationcheckscope = locationcheckscope;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOutsidesign() {
|
||||||
|
return outsidesign;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOutsignapprove() {return outsignapprove;}
|
||||||
|
|
||||||
|
public String getValidity() {
|
||||||
|
return validity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidity(String validity) {
|
||||||
|
this.validity = validity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValidityfromdate() {
|
||||||
|
return validityfromdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityfromdate(String validityfromdate) {
|
||||||
|
this.validityfromdate = validityfromdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValidityenddate() {
|
||||||
|
return validityenddate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityenddate(String validityenddate) {
|
||||||
|
this.validityenddate = validityenddate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOutsidesign(String outsidesign) {this.outsidesign = outsidesign;}
|
||||||
|
public void setOutsignapprove(String outsignapprove) {
|
||||||
|
this.outsignapprove = outsignapprove;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWificheck() {
|
||||||
|
return wificheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWificheck(String wificheck) {
|
||||||
|
this.wificheck = wificheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationfacecheck() {
|
||||||
|
return locationfacecheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationfacecheck(String locationfacecheck) {
|
||||||
|
this.locationfacecheck = locationfacecheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationshowaddress() {
|
||||||
|
return locationshowaddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationshowaddress(String locationshowaddress) {
|
||||||
|
this.locationshowaddress = locationshowaddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWififacecheck() {
|
||||||
|
return wififacecheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWififacecheck(String wififacecheck) {
|
||||||
|
this.wififacecheck = wififacecheck;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCalmethod() {
|
||||||
|
return calmethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCalmethod(String calmethod) {
|
||||||
|
this.calmethod = calmethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAbnormalremind() {
|
||||||
|
return this.abnormalremind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAbnormalremind( String abnormalremind) {
|
||||||
|
this.abnormalremind = abnormalremind;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,189 @@
|
|||||||
|
package com.engine.kq.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤报表明细实体类
|
||||||
|
*/
|
||||||
|
public class KQShiftRuleEntity {
|
||||||
|
private String userId = "";
|
||||||
|
private String kqDate = "";
|
||||||
|
private int belatemins = 0;
|
||||||
|
private int gravebelatemins = 0;
|
||||||
|
private int leaveearlymins = 0;
|
||||||
|
private int graveleaveearlymins = 0;
|
||||||
|
private int absenteeismmins = 0;
|
||||||
|
private int forgotcheckmins = 0;
|
||||||
|
private int forgotBeginWorkCheckMins = 0;//上班漏签
|
||||||
|
private int earlyInMins = 0;//早到分钟数
|
||||||
|
private int lateOutMins = 0;//晚走分钟数
|
||||||
|
private String nosign_is_absent = "1";
|
||||||
|
private String nosign_ishandle = "0";
|
||||||
|
private String signInTime;
|
||||||
|
private String signOutTime;
|
||||||
|
private String early_one_mins;
|
||||||
|
//上午旷工
|
||||||
|
private boolean isAMAbsent = false;
|
||||||
|
//下午旷工
|
||||||
|
private boolean isPMAbsent = false;
|
||||||
|
private int on_absenteeismMins;
|
||||||
|
private int off_absenteeismMins;
|
||||||
|
|
||||||
|
public int getForgotBeginWorkCheckMins() {
|
||||||
|
return forgotBeginWorkCheckMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForgotBeginWorkCheckMins(int forgotBeginWorkCheckMins) {
|
||||||
|
this.forgotBeginWorkCheckMins = forgotBeginWorkCheckMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBelatemins() {
|
||||||
|
return belatemins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBelatemins(int belatemins) {
|
||||||
|
this.belatemins = belatemins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGravebelatemins() {
|
||||||
|
return gravebelatemins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGravebelatemins(int gravebelatemins) {
|
||||||
|
this.gravebelatemins = gravebelatemins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLeaveearlymins() {
|
||||||
|
return leaveearlymins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeaveearlymins(int leaveearlymins) {
|
||||||
|
this.leaveearlymins = leaveearlymins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGraveleaveearlymins() {
|
||||||
|
return graveleaveearlymins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGraveleaveearlymins(int graveleaveearlymins) {
|
||||||
|
this.graveleaveearlymins = graveleaveearlymins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAbsenteeismmins() {
|
||||||
|
return absenteeismmins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAbsenteeismmins(int absenteeismmins) {
|
||||||
|
this.absenteeismmins = absenteeismmins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getForgotcheckmins() {
|
||||||
|
return forgotcheckmins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForgotcheckmins(int forgotcheckmins) {
|
||||||
|
this.forgotcheckmins = forgotcheckmins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getEarlyInMins() {
|
||||||
|
return earlyInMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEarlyInMins(int earlyInMins) {
|
||||||
|
this.earlyInMins = earlyInMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLateOutMins() {
|
||||||
|
return lateOutMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLateOutMins(int lateOutMins) {
|
||||||
|
this.lateOutMins = lateOutMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKqDate() {
|
||||||
|
return kqDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKqDate(String kqDate) {
|
||||||
|
this.kqDate = kqDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNosign_is_absent() {
|
||||||
|
return nosign_is_absent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNosign_is_absent(String nosign_is_absent) {
|
||||||
|
this.nosign_is_absent = nosign_is_absent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNosign_ishandle() {
|
||||||
|
return nosign_ishandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNosign_ishandle(String nosign_ishandle) {
|
||||||
|
this.nosign_ishandle = nosign_ishandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSignInTime() {
|
||||||
|
return signInTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignInTime(String signInTime) {
|
||||||
|
this.signInTime = signInTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSignOutTime() {
|
||||||
|
return signOutTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignOutTime(String signOutTime) {
|
||||||
|
this.signOutTime = signOutTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEarly_one_mins() {
|
||||||
|
return early_one_mins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEarly_one_mins(String early_one_mins) {
|
||||||
|
this.early_one_mins = early_one_mins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAMAbsent() {
|
||||||
|
return isAMAbsent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAMAbsent(boolean AMAbsent) {
|
||||||
|
isAMAbsent = AMAbsent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPMAbsent() {
|
||||||
|
return isPMAbsent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPMAbsent(boolean PMAbsent) {
|
||||||
|
isPMAbsent = PMAbsent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOn_absenteeismMins() {
|
||||||
|
return on_absenteeismMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOn_absenteeismMins(int on_absenteeismMins) {
|
||||||
|
this.on_absenteeismMins = on_absenteeismMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOff_absenteeismMins() {
|
||||||
|
return off_absenteeismMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOff_absenteeismMins(int off_absenteeismMins) {
|
||||||
|
this.off_absenteeismMins = off_absenteeismMins;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,220 @@
|
|||||||
|
package com.engine.kq.entity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 工作时间
|
||||||
|
*/
|
||||||
|
public class WorkTimeEntity {
|
||||||
|
private String groupId;//所属考勤组
|
||||||
|
private String groupName;//所属考勤组
|
||||||
|
private String kqType;//考勤类型
|
||||||
|
private String serialId;//班次
|
||||||
|
private Map<String,Object> shiftRuleInfo;//班次人性化规则
|
||||||
|
private List<TimeScopeEntity> signTime;//允许打卡时间
|
||||||
|
private List<TimeScopeEntity> workTime;//工作时间
|
||||||
|
private List<TimeScopeEntity> restTime;//休息时间
|
||||||
|
private int workMins;//工作时长
|
||||||
|
private String isAcross;//是否跨天
|
||||||
|
private String signstart;//自由工时开始打卡时间
|
||||||
|
private boolean isExclude;//无需考勤人员
|
||||||
|
private String calmethod;//自由班制计算方式
|
||||||
|
private int signoutOnlyoff;
|
||||||
|
|
||||||
|
private List<String> halfWorkTime;//半天
|
||||||
|
|
||||||
|
private List<int[]> halfWorkIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是非工作日 1表示是非工作日班次
|
||||||
|
*/
|
||||||
|
private int nonWorkShift;
|
||||||
|
/**
|
||||||
|
* 当前日期类型
|
||||||
|
* playday 休息日
|
||||||
|
* work 工作日
|
||||||
|
* holiday 节假日
|
||||||
|
*/
|
||||||
|
private String dayType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应出勤折算天数
|
||||||
|
*/
|
||||||
|
private String convertAttendDay = "";
|
||||||
|
|
||||||
|
public String getGroupId() {
|
||||||
|
return groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupId(String groupId) {
|
||||||
|
this.groupId = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroupName() {
|
||||||
|
return groupName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupName(String groupName) {
|
||||||
|
this.groupName = groupName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKQType() {
|
||||||
|
return kqType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKQType(String kqType) {
|
||||||
|
this.kqType = kqType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerialId() {
|
||||||
|
return serialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerialId(String serialId) {
|
||||||
|
this.serialId = serialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getShiftRuleInfo() {
|
||||||
|
return shiftRuleInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShiftRuleInfo(Map<String, Object> shiftRuleInfo) {
|
||||||
|
this.shiftRuleInfo = shiftRuleInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TimeScopeEntity> getWorkTime() {
|
||||||
|
return workTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWorkTime(List<TimeScopeEntity> workTime) {
|
||||||
|
this.workTime = workTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TimeScopeEntity> getRestTime() {
|
||||||
|
return restTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRestTime(List<TimeScopeEntity> restTime) {
|
||||||
|
this.restTime = restTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWorkMins() {
|
||||||
|
return workMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWorkMins(int workMins) {
|
||||||
|
this.workMins = workMins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsAcross() {
|
||||||
|
return isAcross;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsAcross(String isAcross) {
|
||||||
|
this.isAcross = isAcross;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSignStart() {
|
||||||
|
return signstart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignStart(String signstart) {
|
||||||
|
this.signstart = signstart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TimeScopeEntity> getSignTime() {
|
||||||
|
return signTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignTime(List<TimeScopeEntity> signTime) {
|
||||||
|
this.signTime = signTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsExclude() {
|
||||||
|
return isExclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsExclude(boolean isExclude) {
|
||||||
|
this.isExclude = isExclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCalmethod() {
|
||||||
|
return calmethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCalmethod(String calmethod) {
|
||||||
|
this.calmethod = calmethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNonWorkShift() {
|
||||||
|
return nonWorkShift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNonWorkShift(int restShift) {
|
||||||
|
this.nonWorkShift = restShift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDayType() {
|
||||||
|
return dayType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDayType(String dayType) {
|
||||||
|
this.dayType = dayType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConvertAttendDay() {
|
||||||
|
return convertAttendDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConvertAttendDay(String convertAttendDay) {
|
||||||
|
this.convertAttendDay = convertAttendDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSignoutOnlyoff() {
|
||||||
|
return signoutOnlyoff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignoutOnlyoff(int signoutOnlyoff) {
|
||||||
|
this.signoutOnlyoff = signoutOnlyoff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getHalfWorkTime() {
|
||||||
|
return halfWorkTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHalfWorkTime(List<String> halfWorkTime) {
|
||||||
|
this.halfWorkTime = halfWorkTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<int[]> getHalfWorkIndex() {
|
||||||
|
return halfWorkIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHalfWorkIndex(List<int[]> halfWorkIndex) {
|
||||||
|
this.halfWorkIndex = halfWorkIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "WorkTimeEntity{" +
|
||||||
|
"groupId='" + groupId + '\'' +
|
||||||
|
", groupName='" + groupName + '\'' +
|
||||||
|
", kqType='" + kqType + '\'' +
|
||||||
|
", serialId='" + serialId + '\'' +
|
||||||
|
", shiftRuleInfo=" + shiftRuleInfo +
|
||||||
|
", signTime=" + signTime +
|
||||||
|
", workTime=" + workTime +
|
||||||
|
", restTime=" + restTime +
|
||||||
|
", workMins=" + workMins +
|
||||||
|
", isAcross='" + isAcross + '\'' +
|
||||||
|
", signstart='" + signstart + '\'' +
|
||||||
|
", isExclude=" + isExclude +
|
||||||
|
", calmethod='" + calmethod + '\'' +
|
||||||
|
", signoutOnlyoff=" + signoutOnlyoff +
|
||||||
|
", nonWorkShift=" + nonWorkShift +
|
||||||
|
", dayType='" + dayType + '\'' +
|
||||||
|
", convertAttendDay='" + convertAttendDay + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
|
|||||||
|
package com.engine.seclinktel.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/20 09:56
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DetailFields {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer rowIndex;
|
||||||
|
|
||||||
|
private double mkz;
|
||||||
|
|
||||||
|
private double mbz;
|
||||||
|
|
||||||
|
private double tzz;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.engine.seclinktel.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/20 17:18
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DetailFieldsInterview {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer rowIndex;
|
||||||
|
|
||||||
|
private String mkz;
|
||||||
|
|
||||||
|
private String mbz;
|
||||||
|
|
||||||
|
private String tzz;
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.engine.seclinktel.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/19 14:33
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class QuantitativeData {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
private List<DetailFields> quantFields;
|
||||||
|
|
||||||
|
private List<DetailFieldsInterview> interviewFields;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.engine.seclinktel.service;
|
||||||
|
|
||||||
|
import com.engine.seclinktel.entity.QuantitativeData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/19 11:12
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PerformanceWorkflowService {
|
||||||
|
|
||||||
|
QuantitativeData buildDetailData(QuantitativeData quantitativeData);
|
||||||
|
}
|
@ -0,0 +1,81 @@
|
|||||||
|
package com.engine.seclinktel.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.seclinktel.entity.QuantitativeData;
|
||||||
|
import com.engine.seclinktel.service.PerformanceWorkflowService;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.general.Util;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/19 11:12
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class PerformanceWorkflowServiceImpl extends Service implements PerformanceWorkflowService {
|
||||||
|
|
||||||
|
private final static Map<Integer, List<String>> fieldMap = new HashMap<Integer, List<String>>() {{
|
||||||
|
put(0, Arrays.asList("q1mjz","q1mbz","q1tzz"));
|
||||||
|
put(1, Arrays.asList("q2mjz","q2mbz","q2tzz"));
|
||||||
|
put(2, Arrays.asList("q3mjz","q3mbz","q3tzz"));
|
||||||
|
put(4, Arrays.asList("q2mjz","q2mbz","q2tzz"));
|
||||||
|
put(3, Arrays.asList("ndmjz","ndmbz","ndtzz"));
|
||||||
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QuantitativeData buildDetailData(QuantitativeData quantitativeData) {
|
||||||
|
|
||||||
|
List<String> fields = fieldMap.get(quantitativeData.getValue());
|
||||||
|
String join = CollectionUtil.join(fields, ",");
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
if (quantitativeData.getType() == 1) {
|
||||||
|
//1.管理人员个人绩效合约
|
||||||
|
quantitativeData.getQuantFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_glrydyjmb where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.getDoubleValue(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.getDoubleValue(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.getDoubleValue(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
quantitativeData.getInterviewFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_dlrydxjmb where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.null2String(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.null2String(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.null2String(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}else {
|
||||||
|
//2.员工个人绩效合约
|
||||||
|
quantitativeData.getQuantFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_grjhjmb_dt1 where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.getDoubleValue(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.getDoubleValue(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.getDoubleValue(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
quantitativeData.getInterviewFields().forEach(item -> {
|
||||||
|
rs.executeQuery("select "+join+" from uf_grjhjmb_dt3 where id = ?",item.getId());
|
||||||
|
if (rs.next()) {
|
||||||
|
item.setMkz(Util.null2String(rs.getString(fields.get(0))));
|
||||||
|
item.setMbz(Util.null2String(rs.getString(fields.get(1))));
|
||||||
|
item.setTzz(Util.null2String(rs.getString(fields.get(2))));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return quantitativeData;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package com.engine.seclinktel.web;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.seclinktel.entity.QuantitativeData;
|
||||||
|
import com.engine.seclinktel.service.PerformanceWorkflowService;
|
||||||
|
import com.engine.seclinktel.service.impl.PerformanceWorkflowServiceImpl;
|
||||||
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2025/6/19 11:04
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class PerformanceWorkflowAction {
|
||||||
|
|
||||||
|
private PerformanceWorkflowService getService(User user) {
|
||||||
|
return ServiceUtil.getService(PerformanceWorkflowServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/buildDetailData")
|
||||||
|
@Produces(MediaType.TEXT_PLAIN)
|
||||||
|
public String recordSignData(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QuantitativeData quantitativeData){
|
||||||
|
Map<String, Object> data = new HashMap<>(8);
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
data.put("result",getService(user).buildDetailData(quantitativeData));
|
||||||
|
data.put("api_status", true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
data.put("api_status", false);
|
||||||
|
data.put("msg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect);
|
||||||
|
}
|
||||||
|
}
|
@ -1,14 +0,0 @@
|
|||||||
package test;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author weaver_cl
|
|
||||||
* @Description:
|
|
||||||
* @Date 2022/10/9
|
|
||||||
* @Version V1.0
|
|
||||||
**/
|
|
||||||
public class MainTest {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,57 @@
|
|||||||
|
package weaver.interfaces.seclinktel.crob;
|
||||||
|
|
||||||
|
import com.weaver.general.BaseBean;
|
||||||
|
import com.weaver.general.Util;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.interfaces.schedule.BaseCronJob;
|
||||||
|
import weaver.interfaces.seclinktel.entity.po.ResourceOtherInfoPo;
|
||||||
|
import weaver.interfaces.seclinktel.util.DutyUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/4 2:18 PM
|
||||||
|
* @Description: 1、年龄定时任务更新
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ResourceAgeUpdateCron extends BaseCronJob {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
|
||||||
|
List<ResourceOtherInfoPo> hrmResource = DutyUtils.getHrmResource();
|
||||||
|
|
||||||
|
BaseBean bb = new BaseBean();
|
||||||
|
String scopeId = bb.getPropValue("seclinktel", "scopeid");
|
||||||
|
String ageField = bb.getPropValue("seclinktel", "age");
|
||||||
|
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
|
||||||
|
hrmResource.forEach(e -> {
|
||||||
|
|
||||||
|
//1.Age计算
|
||||||
|
Integer age = DutyUtils.getAge(e.getBirthday());
|
||||||
|
|
||||||
|
//2.插入更新
|
||||||
|
rs.executeQuery("select count(1) as nums from cus_fielddata where " +
|
||||||
|
" scope = 'HrmCustomFieldByInfoType' and scopeid = "+scopeId+" and id = ?",e.getId());
|
||||||
|
|
||||||
|
rs.next();
|
||||||
|
int nums = Util.getIntValue(rs.getString("nums"));
|
||||||
|
if (nums > 0) {
|
||||||
|
//更新
|
||||||
|
rs.executeUpdate("update cus_fielddata set "+ageField+" = ? " +
|
||||||
|
" where id = ? and scope = 'HrmCustomFieldByInfoType' and scopeid = ?",age,e.getId(),scopeId);
|
||||||
|
}else {
|
||||||
|
//插入
|
||||||
|
rs.executeUpdate("insert into cus_fielddata(scope,scopeid,id,"+ageField+") values(?,?,?,?)","HrmCustomFieldByInfoType",scopeId,e.getId(),age);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,172 @@
|
|||||||
|
package weaver.interfaces.seclinktel.crob;
|
||||||
|
|
||||||
|
import com.weaver.general.BaseBean;
|
||||||
|
import com.weaver.general.Util;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.interfaces.schedule.BaseCronJob;
|
||||||
|
import weaver.interfaces.seclinktel.entity.po.EducationModePo;
|
||||||
|
import weaver.interfaces.seclinktel.entity.po.ResourceOtherInfoPo;
|
||||||
|
import weaver.interfaces.seclinktel.entity.po.WorkInfoModePo;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.function.BinaryOperator;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/5 4:10 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ResourcePersonInfoCron extends BaseCronJob {
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
BaseBean bb = new BaseBean();
|
||||||
|
//1.工作经历
|
||||||
|
List<WorkInfoModePo> workInfos = new ArrayList<>();
|
||||||
|
rs.executeQuery("select xm,qgslzsj,gsmc,zw1 from uf_gzjl");
|
||||||
|
while (rs.next()) {
|
||||||
|
Integer userId = Util.getIntValue(rs.getString("xm"));
|
||||||
|
String lastCompanyLeaveDate = Util.null2String(rs.getString("qgslzsj"));
|
||||||
|
String lastWorkunitName = Util.null2String(rs.getString("gsmc"));
|
||||||
|
String lastJobName = Util.null2String(rs.getString("zw1"));
|
||||||
|
workInfos.add(WorkInfoModePo.builder().userId(userId).lastCompanyLeaveDate(lastCompanyLeaveDate).lastWorkunitName(lastWorkunitName).lastJobName(lastJobName).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<WorkInfoModePo> workResult = new ArrayList<>(workInfos.stream()
|
||||||
|
.filter(workInfo -> workInfo.getLastCompanyLeaveDate() != null)
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
WorkInfoModePo::getUserId,
|
||||||
|
Function.identity(),
|
||||||
|
BinaryOperator.maxBy(Comparator.comparing(WorkInfoModePo::getLastCompanyLeaveDate))))
|
||||||
|
.values());
|
||||||
|
Map<Integer, WorkInfoModePo> workResultPoMap = workResult.stream()
|
||||||
|
.collect(Collectors.toMap(WorkInfoModePo::getUserId, workInfo -> workInfo));
|
||||||
|
|
||||||
|
|
||||||
|
//2.教育经历第一学历
|
||||||
|
List<EducationModePo> educationFirst = new ArrayList<>();
|
||||||
|
rs.executeQuery("select id,xm,xl,zy from uf_jxjl where sfwdyxl = 0");
|
||||||
|
while (rs.next()) {
|
||||||
|
Integer id = Util.getIntValue(rs.getString("id"));
|
||||||
|
Integer userId = Util.getIntValue(rs.getString("xm"));
|
||||||
|
Integer firstDegree = Util.getIntValue(rs.getString("xl"));
|
||||||
|
String firstDegreeMajor = Util.null2String(rs.getString("zy"));
|
||||||
|
educationFirst.add(EducationModePo.builder().id(id).userId(userId).firstDegree(firstDegree).firstDegreeMajor(firstDegreeMajor).build());
|
||||||
|
}
|
||||||
|
List<EducationModePo> educationFirstResult = new ArrayList<>(educationFirst.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
EducationModePo::getUserId,
|
||||||
|
e -> e,
|
||||||
|
(existing, replacement) -> existing.getId() > replacement.getId() ? existing : replacement))
|
||||||
|
.values());
|
||||||
|
Map<Integer, EducationModePo> educationFirstMap = educationFirstResult.stream()
|
||||||
|
.collect(Collectors.toMap(EducationModePo::getUserId, educationModePo -> educationModePo));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//2.教育经历最高学历
|
||||||
|
List<EducationModePo> educationHighest = new ArrayList<>();
|
||||||
|
rs.executeQuery("select id,xm,xl,zy from uf_jxjl where sfwzgxl = 0");
|
||||||
|
while (rs.next()) {
|
||||||
|
Integer id = Util.getIntValue(rs.getString("id"));
|
||||||
|
Integer userId = Util.getIntValue(rs.getString("xm"));
|
||||||
|
Integer highestDegree = Util.getIntValue(rs.getString("xl"));
|
||||||
|
String highestDegreeMajor = Util.null2String(rs.getString("zy"));
|
||||||
|
educationHighest.add(EducationModePo.builder().id(id).userId(userId).highestDegree(highestDegree).highestDegreeMajor(highestDegreeMajor).build());
|
||||||
|
}
|
||||||
|
List<EducationModePo> educationHighResult = new ArrayList<>(educationHighest.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
EducationModePo::getUserId,
|
||||||
|
e -> e,
|
||||||
|
(existing, replacement) -> existing.getId() > replacement.getId() ? existing : replacement))
|
||||||
|
.values());
|
||||||
|
Map<Integer, EducationModePo> educationHighMap = educationHighResult.stream()
|
||||||
|
.collect(Collectors.toMap(EducationModePo::getUserId, educationModePo -> educationModePo));
|
||||||
|
|
||||||
|
|
||||||
|
List<ResourceOtherInfoPo> otherInfoPos = new ArrayList<>();
|
||||||
|
List<Integer> uniqueUserIds = getUniqueUserIds(workResult, educationFirstResult, educationHighResult);
|
||||||
|
uniqueUserIds.forEach(userId -> {
|
||||||
|
WorkInfoModePo workInfoModePo = workResultPoMap.get(userId);
|
||||||
|
EducationModePo educationModeFirst = educationFirstMap.get(userId);
|
||||||
|
EducationModePo educationModeHigh = educationHighMap.get(userId);
|
||||||
|
|
||||||
|
ResourceOtherInfoPo build = ResourceOtherInfoPo.builder().id(userId).build();
|
||||||
|
if (workInfoModePo != null) {
|
||||||
|
build.setLastWorkunitName(workInfoModePo.getLastWorkunitName());
|
||||||
|
build.setLastJobName(workInfoModePo.getLastJobName());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (educationModeFirst != null) {
|
||||||
|
build.setFirstDegree(educationModeFirst.getFirstDegree());
|
||||||
|
build.setFirstDegreeMajor(educationModeFirst.getFirstDegreeMajor());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (educationModeHigh != null) {
|
||||||
|
build.setHighestDegree(educationModeHigh.getHighestDegree());
|
||||||
|
build.setHighestDegreeMajor(educationModeHigh.getHighestDegreeMajor());
|
||||||
|
}
|
||||||
|
|
||||||
|
otherInfoPos.add(build);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
String scopeId = bb.getPropValue("seclinktel", "scopeid");
|
||||||
|
String firstDegree = bb.getPropValue("seclinktel", "firstDegree");
|
||||||
|
String firstDegreeMajor = bb.getPropValue("seclinktel", "firstDegreeMajor");
|
||||||
|
String highestDegree = bb.getPropValue("seclinktel", "highestDegree");
|
||||||
|
String highestDegreeMajor = bb.getPropValue("seclinktel", "highestDegreeMajor");
|
||||||
|
String lastWorkunitName = bb.getPropValue("seclinktel", "lastWorkunitName");
|
||||||
|
String lastJobName = bb.getPropValue("seclinktel", "lastJobName");
|
||||||
|
|
||||||
|
otherInfoPos.forEach(e -> {
|
||||||
|
|
||||||
|
//2.插入更新
|
||||||
|
rs.executeQuery("select count(1) as nums from cus_fielddata where " +
|
||||||
|
" scope = 'HrmCustomFieldByInfoType' and scopeid = "+scopeId+" and id = ?",e.getId());
|
||||||
|
|
||||||
|
rs.next();
|
||||||
|
int nums = Util.getIntValue(rs.getString("nums"));
|
||||||
|
if (nums > 0) {
|
||||||
|
//更新
|
||||||
|
rs.executeUpdate("update cus_fielddata set "+firstDegree+"=?, "+firstDegreeMajor+"=?, "+highestDegree+"=?, "+highestDegreeMajor+"=?, "+lastWorkunitName+"=?, "+lastJobName+"= ? "+
|
||||||
|
" where id=? and scope = 'HrmCustomFieldByInfoType' and scopeid = 1",e.getFirstDegree(),e.getFirstDegreeMajor(),e.getHighestDegree(),e.getHighestDegreeMajor(),e.getLastWorkunitName(),
|
||||||
|
e.getLastJobName(),e.getId());
|
||||||
|
}else {
|
||||||
|
//插入
|
||||||
|
rs.executeUpdate("insert into cus_fielddata(scope,scopeid,id,"+firstDegree+","+firstDegreeMajor+","+highestDegree+","+highestDegreeMajor+", "+lastWorkunitName+", "+lastJobName+") values(?,?,?,?,?,?,?,?,?)",
|
||||||
|
"HrmCustomFieldByInfoType",scopeId,e.getId(),e.getFirstDegree(),e.getFirstDegreeMajor(),e.getHighestDegree(),e.getHighestDegreeMajor(),e.getLastWorkunitName(),e.getLastJobName());
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<Integer> getUniqueUserIds(List<WorkInfoModePo> workResult,List<EducationModePo> educationFirstResult,
|
||||||
|
List<EducationModePo> educationHighResult) {
|
||||||
|
List<Integer> userIdsFromEducationFirst = educationFirstResult.stream()
|
||||||
|
.map(EducationModePo::getUserId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<Integer> userIdsFromWork = workResult.stream()
|
||||||
|
.map(WorkInfoModePo::getUserId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<Integer> userIdsFromEducationHigh = educationHighResult.stream()
|
||||||
|
.map(EducationModePo::getUserId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
return Stream.concat(
|
||||||
|
Stream.concat(userIdsFromEducationFirst.stream(), userIdsFromWork.stream()),
|
||||||
|
userIdsFromEducationHigh.stream()
|
||||||
|
).distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package weaver.interfaces.seclinktel.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/5 5:39 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class EducationModePo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
private Integer firstDegree;
|
||||||
|
|
||||||
|
private String firstDegreeMajor;
|
||||||
|
|
||||||
|
private Integer highestDegree;
|
||||||
|
|
||||||
|
private String highestDegreeMajor;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package weaver.interfaces.seclinktel.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/4 2:32 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ResourceOtherInfoPo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private String birthday;
|
||||||
|
|
||||||
|
private Integer firstDegree;
|
||||||
|
|
||||||
|
private String firstDegreeMajor;
|
||||||
|
|
||||||
|
private Integer highestDegree;
|
||||||
|
|
||||||
|
private String highestDegreeMajor;
|
||||||
|
|
||||||
|
private Integer age;
|
||||||
|
|
||||||
|
private String lastWorkunitName;
|
||||||
|
|
||||||
|
private String lastJobName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package weaver.interfaces.seclinktel.entity.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/5 4:53 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class WorkInfoModePo {
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
private String lastCompanyLeaveDate;
|
||||||
|
|
||||||
|
private String lastWorkunitName;
|
||||||
|
|
||||||
|
private String lastJobName;
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package weaver.interfaces.seclinktel.util;
|
||||||
|
|
||||||
|
import com.weaver.general.Util;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.interfaces.seclinktel.entity.po.ResourceOtherInfoPo;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.Period;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2024/11/4 3:44 PM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class DutyUtils {
|
||||||
|
|
||||||
|
public static List<ResourceOtherInfoPo> getHrmResource(){
|
||||||
|
List<ResourceOtherInfoPo> infoPoList = new ArrayList<>();
|
||||||
|
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select id,birthday from hrmresource");
|
||||||
|
while (rs.next()) {
|
||||||
|
|
||||||
|
Integer id = Util.getIntValue(rs.getString("id"));
|
||||||
|
String birthday = Util.null2String(rs.getString("birthday"));
|
||||||
|
if (StringUtils.isNotBlank(birthday)) {
|
||||||
|
infoPoList.add(ResourceOtherInfoPo.builder().id(id).birthday(birthday).build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return infoPoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Integer getAge(String birthday) {
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
// 解析生日字符串为 LocalDate 对象
|
||||||
|
LocalDate birthDate = LocalDate.parse(birthday, formatter);
|
||||||
|
LocalDate currentDate = LocalDate.now();
|
||||||
|
return Period.between(birthDate, currentDate).getYears();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue