package cn.ksource.beans;
|
|
import java.sql.ResultSet;
|
import java.sql.SQLException;
|
import java.util.HashMap;
|
import java.util.Iterator;
|
import java.util.List;
|
import java.util.Map;
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import cn.ksource.core.dao.BaseBean;
|
import cn.ksource.core.util.ConvertUtil;
|
import cn.ksource.core.util.StringUtil;
|
|
/**
|
* 工作流程实例
|
*/
|
public class WORKFLOW_BASE extends BaseBean{
|
|
public final static Map<String, String> KEYS = new HashMap<String, String>();
|
private Map BEAN_VALUES = null;
|
|
static {
|
KEYS.put("id", "String");
|
KEYS.put("wfname", "String");
|
KEYS.put("wfnote", "String");
|
KEYS.put("businesstype", "Integer");
|
KEYS.put("wfstate", "Integer");
|
KEYS.put("workflowtype", "Integer");
|
KEYS.put("creatername", "String");
|
KEYS.put("createrid", "String");
|
KEYS.put("createtime", "Long");
|
KEYS.put("endtime", "Long");
|
KEYS.put("mainflowid", "String");
|
KEYS.put("current_node_name", "String");
|
KEYS.put("current_node_id", "String");
|
KEYS.put("deal_type", "Integer");
|
KEYS.put("current_dealer_id", "String");
|
KEYS.put("current_dealer_name", "String");
|
KEYS.put("current_deal_roleida", "String");
|
KEYS.put("current_deal_rolename", "String");
|
KEYS.put("wf_template_id", "String");
|
KEYS.put("business_id", "String");
|
KEYS.put("order_code", "String");
|
KEYS.put("note", "String");
|
KEYS.put("customer_id", "String");
|
KEYS.put("customer_name", "String");
|
KEYS.put("project_id", "String");
|
KEYS.put("project_name", "String");
|
KEYS.put("sub_customer_name", "String");
|
KEYS.put("sub_customer_id", "String");
|
}
|
public Map getColumnMap(){
|
return KEYS;
|
}
|
|
private String id;
|
private Boolean isSetted_id = false;;
|
|
private String wfname;
|
private Boolean isSetted_wfname = false;
|
private String wfnote;
|
private Boolean isSetted_wfnote = false;
|
private Integer businesstype;
|
private Boolean isSetted_businesstype = false;
|
private Integer wfstate;
|
private Boolean isSetted_wfstate = false;
|
private Integer workflowtype;
|
private Boolean isSetted_workflowtype = false;
|
private String creatername;
|
private Boolean isSetted_creatername = false;
|
private String createrid;
|
private Boolean isSetted_createrid = false;
|
private Long createtime;
|
private Boolean isSetted_createtime = false;
|
private Long endtime;
|
private Boolean isSetted_endtime = false;
|
private String mainflowid;
|
private Boolean isSetted_mainflowid = false;
|
private String current_node_name;
|
private Boolean isSetted_current_node_name = false;
|
private String current_node_id;
|
private Boolean isSetted_current_node_id = false;
|
private Integer deal_type;
|
private Boolean isSetted_deal_type = false;
|
private String current_dealer_id;
|
private Boolean isSetted_current_dealer_id = false;
|
private String current_dealer_name;
|
private Boolean isSetted_current_dealer_name = false;
|
private String current_deal_roleida;
|
private Boolean isSetted_current_deal_roleida = false;
|
private String current_deal_rolename;
|
private Boolean isSetted_current_deal_rolename = false;
|
private String wf_template_id;
|
private Boolean isSetted_wf_template_id = false;
|
private String business_id;
|
private Boolean isSetted_business_id = false;
|
private String order_code;
|
private Boolean isSetted_order_code = false;
|
private String note;
|
private Boolean isSetted_note = false;
|
private String customer_id;
|
private Boolean isSetted_customer_id = false;
|
private String customer_name;
|
private Boolean isSetted_customer_name = false;
|
private String project_id;
|
private Boolean isSetted_project_id = false;
|
private String project_name;
|
private Boolean isSetted_project_name = false;
|
private String sub_customer_name;
|
private Boolean isSetted_sub_customer_name = false;
|
private String sub_customer_id;
|
private Boolean isSetted_sub_customer_id = false;
|
|
private void initBeanValues(){
|
BEAN_VALUES = new HashMap<String, Object>();
|
BEAN_VALUES.put("id",id);
|
BEAN_VALUES.put("wfname", null);
|
BEAN_VALUES.put("wfnote", null);
|
BEAN_VALUES.put("businesstype", null);
|
BEAN_VALUES.put("wfstate", null);
|
BEAN_VALUES.put("workflowtype", null);
|
BEAN_VALUES.put("creatername", null);
|
BEAN_VALUES.put("createrid", null);
|
BEAN_VALUES.put("createtime", null);
|
BEAN_VALUES.put("endtime", null);
|
BEAN_VALUES.put("mainflowid", null);
|
BEAN_VALUES.put("current_node_name", null);
|
BEAN_VALUES.put("current_node_id", null);
|
BEAN_VALUES.put("deal_type", null);
|
BEAN_VALUES.put("current_dealer_id", null);
|
BEAN_VALUES.put("current_dealer_name", null);
|
BEAN_VALUES.put("current_deal_roleida", null);
|
BEAN_VALUES.put("current_deal_rolename", null);
|
BEAN_VALUES.put("wf_template_id", null);
|
BEAN_VALUES.put("business_id", null);
|
BEAN_VALUES.put("order_code", null);
|
BEAN_VALUES.put("note", null);
|
BEAN_VALUES.put("customer_id", null);
|
BEAN_VALUES.put("customer_name", null);
|
BEAN_VALUES.put("project_id", null);
|
BEAN_VALUES.put("project_name", null);
|
BEAN_VALUES.put("sub_customer_name", null);
|
BEAN_VALUES.put("sub_customer_id", null);
|
}
|
|
public WORKFLOW_BASE() {
|
initBeanValues();
|
}
|
|
public WORKFLOW_BASE(String id) {
|
super();
|
this.id = id;
|
initBeanValues();
|
BEAN_VALUES.put("id",id);
|
}
|
|
/**
|
* 获取ID
|
*/
|
public String getId() {
|
return this.id;
|
}
|
/**
|
* 设置ID
|
*/
|
public WORKFLOW_BASE setId(String id) {
|
this.id = id;
|
this.isSetted_id = true;
|
BEAN_VALUES.put("id",id);
|
return this;
|
}
|
|
@Override
|
public String getUpdateSql() {
|
StringBuffer sBuffer = new StringBuffer("update WORKFLOW_BASE set ");
|
if (isSetted_wfname) {
|
sBuffer.append("wfname=:wfname,");
|
}
|
if (isSetted_wfnote) {
|
sBuffer.append("wfnote=:wfnote,");
|
}
|
if (isSetted_businesstype) {
|
sBuffer.append("businesstype=:businesstype,");
|
}
|
if (isSetted_wfstate) {
|
sBuffer.append("wfstate=:wfstate,");
|
}
|
if (isSetted_workflowtype) {
|
sBuffer.append("workflowtype=:workflowtype,");
|
}
|
if (isSetted_creatername) {
|
sBuffer.append("creatername=:creatername,");
|
}
|
if (isSetted_createrid) {
|
sBuffer.append("createrid=:createrid,");
|
}
|
if (isSetted_createtime) {
|
sBuffer.append("createtime=:createtime,");
|
}
|
if (isSetted_endtime) {
|
sBuffer.append("endtime=:endtime,");
|
}
|
if (isSetted_mainflowid) {
|
sBuffer.append("mainflowid=:mainflowid,");
|
}
|
if (isSetted_current_node_name) {
|
sBuffer.append("current_node_name=:current_node_name,");
|
}
|
if (isSetted_current_node_id) {
|
sBuffer.append("current_node_id=:current_node_id,");
|
}
|
if (isSetted_deal_type) {
|
sBuffer.append("deal_type=:deal_type,");
|
}
|
if (isSetted_current_dealer_id) {
|
sBuffer.append("current_dealer_id=:current_dealer_id,");
|
}
|
if (isSetted_current_dealer_name) {
|
sBuffer.append("current_dealer_name=:current_dealer_name,");
|
}
|
if (isSetted_current_deal_roleida) {
|
sBuffer.append("current_deal_roleida=:current_deal_roleida,");
|
}
|
if (isSetted_current_deal_rolename) {
|
sBuffer.append("current_deal_rolename=:current_deal_rolename,");
|
}
|
if (isSetted_wf_template_id) {
|
sBuffer.append("wf_template_id=:wf_template_id,");
|
}
|
if (isSetted_business_id) {
|
sBuffer.append("business_id=:business_id,");
|
}
|
if (isSetted_order_code) {
|
sBuffer.append("order_code=:order_code,");
|
}
|
if (isSetted_note) {
|
sBuffer.append("note=:note,");
|
}
|
if (isSetted_customer_id) {
|
sBuffer.append("customer_id=:customer_id,");
|
}
|
if (isSetted_customer_name) {
|
sBuffer.append("customer_name=:customer_name,");
|
}
|
if (isSetted_project_id) {
|
sBuffer.append("project_id=:project_id,");
|
}
|
if (isSetted_project_name) {
|
sBuffer.append("project_name=:project_name,");
|
}
|
if (isSetted_sub_customer_name) {
|
sBuffer.append("sub_customer_name=:sub_customer_name,");
|
}
|
if (isSetted_sub_customer_id) {
|
sBuffer.append("sub_customer_id=:sub_customer_id,");
|
}
|
String sql = sBuffer.toString();
|
return StringUtils.removeEnd(sql, ",") + " where id=:id";
|
}
|
|
|
@Override
|
public String getInsertSql() {
|
StringBuffer sBuffer = new StringBuffer("insert into WORKFLOW_BASE(");
|
StringBuffer fileds = new StringBuffer("id,");
|
StringBuffer values = new StringBuffer(":id,");
|
fileds.append("wfname,");
|
values.append(":wfname,");
|
fileds.append("wfnote,");
|
values.append(":wfnote,");
|
fileds.append("businesstype,");
|
values.append(":businesstype,");
|
fileds.append("wfstate,");
|
values.append(":wfstate,");
|
fileds.append("workflowtype,");
|
values.append(":workflowtype,");
|
fileds.append("creatername,");
|
values.append(":creatername,");
|
fileds.append("createrid,");
|
values.append(":createrid,");
|
fileds.append("createtime,");
|
values.append(":createtime,");
|
fileds.append("endtime,");
|
values.append(":endtime,");
|
fileds.append("mainflowid,");
|
values.append(":mainflowid,");
|
fileds.append("current_node_name,");
|
values.append(":current_node_name,");
|
fileds.append("current_node_id,");
|
values.append(":current_node_id,");
|
fileds.append("deal_type,");
|
values.append(":deal_type,");
|
fileds.append("current_dealer_id,");
|
values.append(":current_dealer_id,");
|
fileds.append("current_dealer_name,");
|
values.append(":current_dealer_name,");
|
fileds.append("current_deal_roleida,");
|
values.append(":current_deal_roleida,");
|
fileds.append("current_deal_rolename,");
|
values.append(":current_deal_rolename,");
|
fileds.append("wf_template_id,");
|
values.append(":wf_template_id,");
|
fileds.append("business_id,");
|
values.append(":business_id,");
|
fileds.append("order_code,");
|
values.append(":order_code,");
|
fileds.append("note,");
|
values.append(":note,");
|
fileds.append("customer_id,");
|
values.append(":customer_id,");
|
fileds.append("customer_name,");
|
values.append(":customer_name,");
|
fileds.append("project_id,");
|
values.append(":project_id,");
|
fileds.append("project_name,");
|
values.append(":project_name,");
|
fileds.append("sub_customer_name,");
|
values.append(":sub_customer_name,");
|
fileds.append("sub_customer_id,");
|
values.append(":sub_customer_id,");
|
sBuffer.append(StringUtils.removeEnd(fileds.toString(), ",") + ") values("+StringUtils.removeEnd(values.toString(), ",")+")");
|
return sBuffer.toString();
|
}
|
|
|
/**
|
* 获取流程名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getWfname() {
|
return wfname;
|
}
|
/**
|
* 设置流程名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setWfname(String wfname) {
|
this.wfname = wfname;
|
this.isSetted_wfname = true;
|
BEAN_VALUES.put("wfname",wfname);
|
return this;
|
}
|
/**
|
* 获取流程描述<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getWfnote() {
|
return wfnote;
|
}
|
/**
|
* 设置流程描述<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setWfnote(String wfnote) {
|
this.wfnote = wfnote;
|
this.isSetted_wfnote = true;
|
BEAN_VALUES.put("wfnote",wfnote);
|
return this;
|
}
|
/**
|
* 获取业务类型(6=例行维保;7=健康检查;8=事件管理;9=问题管理;10=驻场运维;)<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public Integer getBusinesstype() {
|
return businesstype;
|
}
|
/**
|
* 设置业务类型(6=例行维保;7=健康检查;8=事件管理;9=问题管理;10=驻场运维;)<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setBusinesstype(Integer businesstype) {
|
this.businesstype = businesstype;
|
this.isSetted_businesstype = true;
|
BEAN_VALUES.put("businesstype",businesstype);
|
return this;
|
}
|
/**
|
* 获取流程状态(1=进行中;2=已完成;3=已关闭;4=已评价;5=已删除;6=已挂起)<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public Integer getWfstate() {
|
return wfstate;
|
}
|
/**
|
* 设置流程状态(1=进行中;2=已完成;3=已关闭;4=已评价;5=已删除;6=已挂起)<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setWfstate(Integer wfstate) {
|
this.wfstate = wfstate;
|
this.isSetted_wfstate = true;
|
BEAN_VALUES.put("wfstate",wfstate);
|
return this;
|
}
|
/**
|
* 获取流程类型(1=主流程;2=子流程)<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public Integer getWorkflowtype() {
|
return workflowtype;
|
}
|
/**
|
* 设置流程类型(1=主流程;2=子流程)<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setWorkflowtype(Integer workflowtype) {
|
this.workflowtype = workflowtype;
|
this.isSetted_workflowtype = true;
|
BEAN_VALUES.put("workflowtype",workflowtype);
|
return this;
|
}
|
/**
|
* 获取创建人名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCreatername() {
|
return creatername;
|
}
|
/**
|
* 设置创建人名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCreatername(String creatername) {
|
this.creatername = creatername;
|
this.isSetted_creatername = true;
|
BEAN_VALUES.put("creatername",creatername);
|
return this;
|
}
|
/**
|
* 获取创建人编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCreaterid() {
|
return createrid;
|
}
|
/**
|
* 设置创建人编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCreaterid(String createrid) {
|
this.createrid = createrid;
|
this.isSetted_createrid = true;
|
BEAN_VALUES.put("createrid",createrid);
|
return this;
|
}
|
/**
|
* 获取创建时间<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public Long getCreatetime() {
|
return createtime;
|
}
|
/**
|
* 设置创建时间<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCreatetime(Long createtime) {
|
this.createtime = createtime;
|
this.isSetted_createtime = true;
|
BEAN_VALUES.put("createtime",createtime);
|
return this;
|
}
|
/**
|
* 获取结束时间<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public Long getEndtime() {
|
return endtime;
|
}
|
/**
|
* 设置结束时间<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setEndtime(Long endtime) {
|
this.endtime = endtime;
|
this.isSetted_endtime = true;
|
BEAN_VALUES.put("endtime",endtime);
|
return this;
|
}
|
/**
|
* 获取主流程编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getMainflowid() {
|
return mainflowid;
|
}
|
/**
|
* 设置主流程编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setMainflowid(String mainflowid) {
|
this.mainflowid = mainflowid;
|
this.isSetted_mainflowid = true;
|
BEAN_VALUES.put("mainflowid",mainflowid);
|
return this;
|
}
|
/**
|
* 获取当前环节名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCurrent_node_name() {
|
return current_node_name;
|
}
|
/**
|
* 设置当前环节名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCurrent_node_name(String current_node_name) {
|
this.current_node_name = current_node_name;
|
this.isSetted_current_node_name = true;
|
BEAN_VALUES.put("current_node_name",current_node_name);
|
return this;
|
}
|
/**
|
* 获取当前环节编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCurrent_node_id() {
|
return current_node_id;
|
}
|
/**
|
* 设置当前环节编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCurrent_node_id(String current_node_id) {
|
this.current_node_id = current_node_id;
|
this.isSetted_current_node_id = true;
|
BEAN_VALUES.put("current_node_id",current_node_id);
|
return this;
|
}
|
/**
|
* 获取处理人类型(1=指定角色;2=指定人员)<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public Integer getDeal_type() {
|
return deal_type;
|
}
|
/**
|
* 设置处理人类型(1=指定角色;2=指定人员)<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setDeal_type(Integer deal_type) {
|
this.deal_type = deal_type;
|
this.isSetted_deal_type = true;
|
BEAN_VALUES.put("deal_type",deal_type);
|
return this;
|
}
|
/**
|
* 获取当前处理人编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCurrent_dealer_id() {
|
return current_dealer_id;
|
}
|
/**
|
* 设置当前处理人编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCurrent_dealer_id(String current_dealer_id) {
|
this.current_dealer_id = current_dealer_id;
|
this.isSetted_current_dealer_id = true;
|
BEAN_VALUES.put("current_dealer_id",current_dealer_id);
|
return this;
|
}
|
/**
|
* 获取当前处理人名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCurrent_dealer_name() {
|
return current_dealer_name;
|
}
|
/**
|
* 设置当前处理人名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCurrent_dealer_name(String current_dealer_name) {
|
this.current_dealer_name = current_dealer_name;
|
this.isSetted_current_dealer_name = true;
|
BEAN_VALUES.put("current_dealer_name",current_dealer_name);
|
return this;
|
}
|
/**
|
* 获取当前处理角色编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCurrent_deal_roleida() {
|
return current_deal_roleida;
|
}
|
/**
|
* 设置当前处理角色编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCurrent_deal_roleida(String current_deal_roleida) {
|
this.current_deal_roleida = current_deal_roleida;
|
this.isSetted_current_deal_roleida = true;
|
BEAN_VALUES.put("current_deal_roleida",current_deal_roleida);
|
return this;
|
}
|
/**
|
* 获取当前处理角色名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCurrent_deal_rolename() {
|
return current_deal_rolename;
|
}
|
/**
|
* 设置当前处理角色名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCurrent_deal_rolename(String current_deal_rolename) {
|
this.current_deal_rolename = current_deal_rolename;
|
this.isSetted_current_deal_rolename = true;
|
BEAN_VALUES.put("current_deal_rolename",current_deal_rolename);
|
return this;
|
}
|
/**
|
* 获取流程模版编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getWf_template_id() {
|
return wf_template_id;
|
}
|
/**
|
* 设置流程模版编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setWf_template_id(String wf_template_id) {
|
this.wf_template_id = wf_template_id;
|
this.isSetted_wf_template_id = true;
|
BEAN_VALUES.put("wf_template_id",wf_template_id);
|
return this;
|
}
|
/**
|
* 获取业务编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getBusiness_id() {
|
return business_id;
|
}
|
/**
|
* 设置业务编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setBusiness_id(String business_id) {
|
this.business_id = business_id;
|
this.isSetted_business_id = true;
|
BEAN_VALUES.put("business_id",business_id);
|
return this;
|
}
|
/**
|
* 获取工单编码<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getOrder_code() {
|
return order_code;
|
}
|
/**
|
* 设置工单编码<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setOrder_code(String order_code) {
|
this.order_code = order_code;
|
this.isSetted_order_code = true;
|
BEAN_VALUES.put("order_code",order_code);
|
return this;
|
}
|
/**
|
* 获取备注<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getNote() {
|
return note;
|
}
|
/**
|
* 设置备注<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setNote(String note) {
|
this.note = note;
|
this.isSetted_note = true;
|
BEAN_VALUES.put("note",note);
|
return this;
|
}
|
/**
|
* 获取客户编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCustomer_id() {
|
return customer_id;
|
}
|
/**
|
* 设置客户编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCustomer_id(String customer_id) {
|
this.customer_id = customer_id;
|
this.isSetted_customer_id = true;
|
BEAN_VALUES.put("customer_id",customer_id);
|
return this;
|
}
|
/**
|
* 获取客户名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getCustomer_name() {
|
return customer_name;
|
}
|
/**
|
* 设置客户名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setCustomer_name(String customer_name) {
|
this.customer_name = customer_name;
|
this.isSetted_customer_name = true;
|
BEAN_VALUES.put("customer_name",customer_name);
|
return this;
|
}
|
/**
|
* 获取项目编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getProject_id() {
|
return project_id;
|
}
|
/**
|
* 设置项目编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setProject_id(String project_id) {
|
this.project_id = project_id;
|
this.isSetted_project_id = true;
|
BEAN_VALUES.put("project_id",project_id);
|
return this;
|
}
|
/**
|
* 获取项目名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getProject_name() {
|
return project_name;
|
}
|
/**
|
* 设置项目名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setProject_name(String project_name) {
|
this.project_name = project_name;
|
this.isSetted_project_name = true;
|
BEAN_VALUES.put("project_name",project_name);
|
return this;
|
}
|
/**
|
* 获取下级单位名称<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getSub_customer_name() {
|
return sub_customer_name;
|
}
|
/**
|
* 设置下级单位名称<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setSub_customer_name(String sub_customer_name) {
|
this.sub_customer_name = sub_customer_name;
|
this.isSetted_sub_customer_name = true;
|
BEAN_VALUES.put("sub_customer_name",sub_customer_name);
|
return this;
|
}
|
/**
|
* 获取下级单位编号<BR/>
|
* 䣺2020-11-02 hh:04
|
*/
|
public String getSub_customer_id() {
|
return sub_customer_id;
|
}
|
/**
|
* 设置下级单位编号<BR/>
|
* 2020-11-02 hh:04
|
*/
|
public WORKFLOW_BASE setSub_customer_id(String sub_customer_id) {
|
this.sub_customer_id = sub_customer_id;
|
this.isSetted_sub_customer_id = true;
|
BEAN_VALUES.put("sub_customer_id",sub_customer_id);
|
return this;
|
}
|
|
/**
|
* 使用ID删除Bean<BR/>
|
*/
|
public void deleteById() {
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("删除bean时ID不能为空");
|
}
|
dao.execute("delete from " + getTableName() + " where id = :id", BEAN_VALUES);
|
}
|
|
@Override
|
public WORKFLOW_BASE getInstanceById() {
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("获取Bean时ID不能为空");
|
}
|
return dao.queryForBean("select * from " + getTableName() + " where id=:id", BEAN_VALUES, this);
|
}
|
|
|
|
@Override
|
public WORKFLOW_BASE queryForBean() {
|
StringBuffer sBuffer = new StringBuffer("select * from WORKFLOW_BASE where ");
|
if(isSetted_id){
|
sBuffer.append("id=:id and ");
|
}
|
if (isSetted_wfname) {
|
sBuffer.append("wfname=:wfname and ");
|
}
|
if (isSetted_wfnote) {
|
sBuffer.append("wfnote=:wfnote and ");
|
}
|
if (isSetted_businesstype) {
|
sBuffer.append("businesstype=:businesstype and ");
|
}
|
if (isSetted_wfstate) {
|
sBuffer.append("wfstate=:wfstate and ");
|
}
|
if (isSetted_workflowtype) {
|
sBuffer.append("workflowtype=:workflowtype and ");
|
}
|
if (isSetted_creatername) {
|
sBuffer.append("creatername=:creatername and ");
|
}
|
if (isSetted_createrid) {
|
sBuffer.append("createrid=:createrid and ");
|
}
|
if (isSetted_createtime) {
|
sBuffer.append("createtime=:createtime and ");
|
}
|
if (isSetted_endtime) {
|
sBuffer.append("endtime=:endtime and ");
|
}
|
if (isSetted_mainflowid) {
|
sBuffer.append("mainflowid=:mainflowid and ");
|
}
|
if (isSetted_current_node_name) {
|
sBuffer.append("current_node_name=:current_node_name and ");
|
}
|
if (isSetted_current_node_id) {
|
sBuffer.append("current_node_id=:current_node_id and ");
|
}
|
if (isSetted_deal_type) {
|
sBuffer.append("deal_type=:deal_type and ");
|
}
|
if (isSetted_current_dealer_id) {
|
sBuffer.append("current_dealer_id=:current_dealer_id and ");
|
}
|
if (isSetted_current_dealer_name) {
|
sBuffer.append("current_dealer_name=:current_dealer_name and ");
|
}
|
if (isSetted_current_deal_roleida) {
|
sBuffer.append("current_deal_roleida=:current_deal_roleida and ");
|
}
|
if (isSetted_current_deal_rolename) {
|
sBuffer.append("current_deal_rolename=:current_deal_rolename and ");
|
}
|
if (isSetted_wf_template_id) {
|
sBuffer.append("wf_template_id=:wf_template_id and ");
|
}
|
if (isSetted_business_id) {
|
sBuffer.append("business_id=:business_id and ");
|
}
|
if (isSetted_order_code) {
|
sBuffer.append("order_code=:order_code and ");
|
}
|
if (isSetted_note) {
|
sBuffer.append("note=:note and ");
|
}
|
if (isSetted_customer_id) {
|
sBuffer.append("customer_id=:customer_id and ");
|
}
|
if (isSetted_customer_name) {
|
sBuffer.append("customer_name=:customer_name and ");
|
}
|
if (isSetted_project_id) {
|
sBuffer.append("project_id=:project_id and ");
|
}
|
if (isSetted_project_name) {
|
sBuffer.append("project_name=:project_name and ");
|
}
|
if (isSetted_sub_customer_name) {
|
sBuffer.append("sub_customer_name=:sub_customer_name and ");
|
}
|
if (isSetted_sub_customer_id) {
|
sBuffer.append("sub_customer_id=:sub_customer_id and ");
|
}
|
String sql = sBuffer.toString();
|
sql = StringUtils.removeEnd(sql, " and ");
|
return dao.queryForBean(sql,this);
|
}
|
|
@Override
|
public String getTableName() {
|
return "WORKFLOW_BASE";
|
}
|
|
|
public Map getBeanValues(){
|
return this.BEAN_VALUES;
|
}
|
|
@Override
|
public WORKFLOW_BASE insert() {
|
if (StringUtils.isBlank(id)) {
|
this.setId(StringUtil.getUUID());
|
}
|
dao.execute(getInsertSql(),BEAN_VALUES);
|
return this;
|
}
|
|
@Override
|
public WORKFLOW_BASE update() {
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("更新Bean时ID不能为空");
|
}
|
dao.execute(getUpdateSql(),BEAN_VALUES);
|
return this;
|
}
|
|
public WORKFLOW_BASE insertOrUpdate(){
|
if (StringUtils.isNotBlank(id)) {
|
return update();
|
} else {
|
return insert();
|
}
|
}
|
|
/**
|
* 通过ID获取该条信息的Map结构
|
*/
|
public Map getBeanMapById() {
|
|
if (StringUtils.isBlank(id)) {
|
throw new RuntimeException("ID不能为空!");
|
}
|
|
return dao.queryForMap("select * from WORKFLOW_BASE where id=:id",BEAN_VALUES);
|
}
|
|
public Object mapRow(ResultSet rs, int rownum) throws SQLException {
|
Object id = rs.getObject("ID");
|
this.setId(ConvertUtil.obj2Str(id));
|
BEAN_VALUES.put("id",id);
|
Object obj = null;
|
obj = rs.getObject("WFNAME");
|
BEAN_VALUES.put("wfname",obj);
|
this.setWfname(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("WFNOTE");
|
BEAN_VALUES.put("wfnote",obj);
|
this.setWfnote(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("BUSINESSTYPE");
|
BEAN_VALUES.put("businesstype",obj);
|
this.setBusinesstype(ConvertUtil.obj2Integer(obj));
|
obj = rs.getObject("WFSTATE");
|
BEAN_VALUES.put("wfstate",obj);
|
this.setWfstate(ConvertUtil.obj2Integer(obj));
|
obj = rs.getObject("WORKFLOWTYPE");
|
BEAN_VALUES.put("workflowtype",obj);
|
this.setWorkflowtype(ConvertUtil.obj2Integer(obj));
|
obj = rs.getObject("CREATERNAME");
|
BEAN_VALUES.put("creatername",obj);
|
this.setCreatername(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CREATERID");
|
BEAN_VALUES.put("createrid",obj);
|
this.setCreaterid(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CREATETIME");
|
BEAN_VALUES.put("createtime",obj);
|
this.setCreatetime(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("ENDTIME");
|
BEAN_VALUES.put("endtime",obj);
|
this.setEndtime(ConvertUtil.obj2Long(obj));
|
obj = rs.getObject("MAINFLOWID");
|
BEAN_VALUES.put("mainflowid",obj);
|
this.setMainflowid(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CURRENT_NODE_NAME");
|
BEAN_VALUES.put("current_node_name",obj);
|
this.setCurrent_node_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CURRENT_NODE_ID");
|
BEAN_VALUES.put("current_node_id",obj);
|
this.setCurrent_node_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("DEAL_TYPE");
|
BEAN_VALUES.put("deal_type",obj);
|
this.setDeal_type(ConvertUtil.obj2Integer(obj));
|
obj = rs.getObject("CURRENT_DEALER_ID");
|
BEAN_VALUES.put("current_dealer_id",obj);
|
this.setCurrent_dealer_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CURRENT_DEALER_NAME");
|
BEAN_VALUES.put("current_dealer_name",obj);
|
this.setCurrent_dealer_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CURRENT_DEAL_ROLEIDA");
|
BEAN_VALUES.put("current_deal_roleida",obj);
|
this.setCurrent_deal_roleida(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CURRENT_DEAL_ROLENAME");
|
BEAN_VALUES.put("current_deal_rolename",obj);
|
this.setCurrent_deal_rolename(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("WF_TEMPLATE_ID");
|
BEAN_VALUES.put("wf_template_id",obj);
|
this.setWf_template_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("BUSINESS_ID");
|
BEAN_VALUES.put("business_id",obj);
|
this.setBusiness_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("ORDER_CODE");
|
BEAN_VALUES.put("order_code",obj);
|
this.setOrder_code(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("NOTE");
|
BEAN_VALUES.put("note",obj);
|
this.setNote(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CUSTOMER_ID");
|
BEAN_VALUES.put("customer_id",obj);
|
this.setCustomer_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("CUSTOMER_NAME");
|
BEAN_VALUES.put("customer_name",obj);
|
this.setCustomer_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("PROJECT_ID");
|
BEAN_VALUES.put("project_id",obj);
|
this.setProject_id(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("PROJECT_NAME");
|
BEAN_VALUES.put("project_name",obj);
|
this.setProject_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("SUB_CUSTOMER_NAME");
|
BEAN_VALUES.put("sub_customer_name",obj);
|
this.setSub_customer_name(ConvertUtil.obj2Str(obj));
|
obj = rs.getObject("SUB_CUSTOMER_ID");
|
BEAN_VALUES.put("sub_customer_id",obj);
|
this.setSub_customer_id(ConvertUtil.obj2Str(obj));
|
return this;
|
}
|
|
|
public String toString() {
|
StringBuffer sb = new StringBuffer("[");
|
for (Iterator iterator = KEYS.keySet().iterator(); iterator.hasNext();) {
|
String key = (String) iterator.next();
|
sb.append(key+"=" + BEAN_VALUES.get(key)+",");
|
}
|
sb.append("]");
|
return sb.toString();
|
}
|
|
public WORKFLOW_BASE newInstance(){
|
return new WORKFLOW_BASE();
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|