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.

79 lines
2.8 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
/**
* Online custom action interface
*/
public class Action20241024032034 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) {
/*
* Process custom interface code example
*
* 1:Log
* writeLog("in my online edited action");
*
* 2Exception
* boolean error=true;
* if(error) {
* request.getRequestManager().setMessageid("90001");
* request.getRequestManager().setMessagecontent("System Abnormal Termination Process Submission");
* }
*
* 3Get requestid
* String requestId = request.getRequestid();
*
* 4Get form tableName
* String tablename = request.getRequestManager().getBillTableName();
*
* 5Find form content
* RecordSet rs = new RecordSet();
* rs.execute("select * from "+tablename+" where requestid = "+requestId);
* rs.next();
* String mainid = rs.getString("id"); //idForm primary key
* //formDataField name for form design
*
*
*/
String requestId = request.getRequestid();
String tablename = request.getRequestManager().getBillTableName();
RecordSet rs = new RecordSet();
rs.execute("select * from "+tablename+" where requestid = "+requestId);
rs.next();
String mainid = rs.getString("id");
String bghrcbt = rs.getString("bghrcbt");
String bghrcnr = rs.getString("bghrcnr");
String bghksrq = rs.getString("bghksrq");
String bghkssj = rs.getString("bghkssj");
String bghjsrq = rs.getString("bghjsrq");
String bghjssj = rs.getString("bghjssj");
String rcid = rs.getString("rcid");
String rcjsr = rs.getString("rcjsr");
rs.executeUpdate("UPDATE workplan SET " +
" NAME = ? , DESCRIPTION = ? ,BEGINDATE = ?,BEGINTIME = ?,ENDDATE = ? ,ENDTIME = ? ,REQUESTID = ? " +
" where id= ? and resourceid = ? ",
bghrcbt,bghrcnr,bghksrq,bghkssj,bghjsrq,bghjssj,requestId,rcid,rcjsr);
return Action.SUCCESS;
}
}
/***
* UPDATE workplan SET where id='{?rcid}' and resourceid='{?rcjsr}'
*
*
* NAME bghrcbt
* DESCRIPTION bghrcnr
* BEGINDATE bghksrq
* BEGINTIME bghkssj
* ENDDATE bghjsrq
* ENDTIME bghjssj
* REQUESTID requestid
*
*/