二开--康瑞考勤需求
parent
f2c4df3e32
commit
e9b8e62287
@ -0,0 +1,49 @@
|
|||||||
|
package weaver.interfaces.kr.workflow.action;
|
||||||
|
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.interfaces.workflow.action.Action;
|
||||||
|
import weaver.soa.workflow.request.MainTableInfo;
|
||||||
|
import weaver.soa.workflow.request.Property;
|
||||||
|
import weaver.soa.workflow.request.RequestInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2023/05/24
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class KrLeaveRepeatAction implements Action {
|
||||||
|
@Override
|
||||||
|
public String execute(RequestInfo requestInfo) {
|
||||||
|
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||||
|
String resourceId = "";
|
||||||
|
String leaveType = "";
|
||||||
|
|
||||||
|
Property[] properties = mainTableInfo.getProperty();
|
||||||
|
for (Property property : properties) {
|
||||||
|
String name = property.getName();
|
||||||
|
String value = property.getValue();
|
||||||
|
switch (name) {
|
||||||
|
case "resourceId":
|
||||||
|
resourceId = value;
|
||||||
|
break;
|
||||||
|
case "jqlx":
|
||||||
|
leaveType = value;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
String billTableName = requestInfo.getRequestManager().getBillTableName();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select count(1) as num from " + billTableName + " where resourceId = ? and jqlx =? and spzt != 2", resourceId, leaveType);
|
||||||
|
if (rs.next()) {
|
||||||
|
int num = rs.getInt("num");
|
||||||
|
if (num > 0) {
|
||||||
|
requestInfo.getRequestManager().setMessagecontent("当前人员存在未审批完成的请假审核流程,请勿重复提交");
|
||||||
|
return FAILURE_AND_CONTINUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue