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.

84 lines
3.1 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 com.engine.custom.sl.entity.ExpenseItem;
import com.engine.custom.sl.entity.TravelToEsbBean;
import com.weaver.general.Util;
import weaver.conn.RecordSet;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import weaver.interfaces.workflow.action.Action;
import weaver.general.BaseBean;
import weaver.soa.workflow.request.RequestInfo;
import java.util.ArrayList;
import java.util.List;
/**
* 推送商旅节点后附加操作(推送商旅节点后附加操作
*/
public class Action20230911062023 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) {
// if(error) {
// request.getRequestManager().setMessageid("90001");
// request.getRequestManager().setMessagecontent("System Abnormal Termination Process Submission");
// }
String requestId = request.getRequestid();
String tablename = request.getRequestManager().getBillTableName();
TravelToEsbBean toEsbBean = new TravelToEsbBean();
//封装主表数据
RecordSet rs = new RecordSet();
String mainId = setMainForm(requestId, tablename, rs, toEsbBean);
setFormDt1();
return Action.SUCCESS;
}
private String setMainForm(String requestId, String tablename, RecordSet rs ,TravelToEsbBean toEsbBean) {
rs.execute("select * from " + tablename + " where requestid = " + requestId);
String main = "";
if (rs.next()) {
String mainid = rs.getString("id");
//OA差旅报销单单据编号
toEsbBean.setOaTrvlBnsExpnsAcctNo(Util.null2String("djbh"));
//经办人工号
toEsbBean.setOperatorNo(Util.null2String("jbrgh"));
//经办人姓名 id
toEsbBean.setOperatorName(Util.null2String("jbrxm"));
//附件张数
toEsbBean.setAcsryNums(Util.null2String("fjzs"));
//报销金额
toEsbBean.setExpnsAmt(Util.null2String("bxjedwf"));
//报销事由
toEsbBean.setExpnsRsn(Util.null2String("bxsy"));
//备注
toEsbBean.setRemark(Util.null2String("bz"));
// String formData = rs.getString("formData");
}
return main;
}
private void setFormDt1(String mainid, String tablename, RecordSet rs ,TravelToEsbBean toEsbBean) {
rs.execute("select * from " + tablename + "_dt1 where mainid = " + mainid);
List<ExpenseItem> expenseArray = new ArrayList<>();
while (rs.next()) {
ExpenseItem expenseItem = new ExpenseItem();
// 支出类型
expenseItem.setExpndType(Util.null2String("djbh"));
//不含税金额
expenseItem.setExclsvTaxAmt();
//不含税金额
expenseItem.setAcctingAbstct();
expenseItem.setAcctingAbstct();
expenseItem.setAcctingAbstct();
}
}
}