You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB
Java

package weaver.interfaces.workflow.action.javacode;
import weaver.conn.RecordSet;
import weaver.interfaces.workflow.action.Action;
import weaver.general.BaseBean;
import weaver.soa.workflow.request.RequestInfo;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Online custom action interface
*/
public class Action20241031043325 extends BaseBean implements Action {
/**
* After selecting aciton after the process path node, this method will be executed after the node is submitted.
*/
@Override
public String execute(RequestInfo request) {
try {
String requestid = request.getRequestid();
String currentTime = generateTimestamp();
String insertSql = "insert into uf_pushArchivesLog (request,ddsj,type) values (?,?,?)";
RecordSet rs = new RecordSet();
rs.executeUpdate(insertSql,requestid,currentTime,2);
} catch (Exception e) {
writeLog(e.getMessage());
e.printStackTrace();
}
return Action.SUCCESS;
}
public static String generateTimestamp() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date currentDate = new Date();
return dateFormat.format(currentDate);
}
}