|  |  |  | @ -0,0 +1,76 @@ | 
		
	
		
			
				|  |  |  |  | package cn.estsh.i3plus.pojo.softswitch.bean; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; | 
		
	
		
			
				|  |  |  |  | import cn.estsh.i3plus.pojo.base.bean.BaseBean; | 
		
	
		
			
				|  |  |  |  | import io.swagger.annotations.Api; | 
		
	
		
			
				|  |  |  |  | import lombok.Data; | 
		
	
		
			
				|  |  |  |  | import lombok.EqualsAndHashCode; | 
		
	
		
			
				|  |  |  |  | import lombok.NoArgsConstructor; | 
		
	
		
			
				|  |  |  |  | import org.hibernate.annotations.DynamicInsert; | 
		
	
		
			
				|  |  |  |  | import org.hibernate.annotations.DynamicUpdate; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | import javax.persistence.*; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | /** | 
		
	
		
			
				|  |  |  |  |  * 脚本持久化实体类 | 
		
	
		
			
				|  |  |  |  |  * | 
		
	
		
			
				|  |  |  |  |  */ | 
		
	
		
			
				|  |  |  |  | @Data | 
		
	
		
			
				|  |  |  |  | @Entity | 
		
	
		
			
				|  |  |  |  | @NoArgsConstructor | 
		
	
		
			
				|  |  |  |  | @EqualsAndHashCode(callSuper = true) | 
		
	
		
			
				|  |  |  |  | @Inheritance(strategy = InheritanceType.JOINED) | 
		
	
		
			
				|  |  |  |  | @Table(name = "SCRIPT_PERSISTENCE", uniqueConstraints = { | 
		
	
		
			
				|  |  |  |  |         @UniqueConstraint(columnNames = {"SCRIPT_NO"}) | 
		
	
		
			
				|  |  |  |  | }) | 
		
	
		
			
				|  |  |  |  | @Api("动态脚本脚本,目前只支持groovy") | 
		
	
		
			
				|  |  |  |  | public class ScriptPersistence extends BaseBean { | 
		
	
		
			
				|  |  |  |  |     private static final long serialVersionUID = 7893111140559759490L; | 
		
	
		
			
				|  |  |  |  |     // 脚本调用的唯一编号,例如:WMS_PDA_0001
 | 
		
	
		
			
				|  |  |  |  |     @Column(name = "SCRIPT_NO", length = 50) | 
		
	
		
			
				|  |  |  |  |     @AnnoOutputColumn(name = "脚本编码") | 
		
	
		
			
				|  |  |  |  |     private String scriptNo; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // 脚本的中文名称F
 | 
		
	
		
			
				|  |  |  |  |     @Column(name = "SCRIPT_NAME", length = 50) | 
		
	
		
			
				|  |  |  |  |     @AnnoOutputColumn(name = "脚本名称") | 
		
	
		
			
				|  |  |  |  |     private String scriptName; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // 10=webService 结果拦截脚本
 | 
		
	
		
			
				|  |  |  |  |     @Column(name = "SCRIPT_TYPE") | 
		
	
		
			
				|  |  |  |  |     @AnnoOutputColumn(name = "脚本类型") | 
		
	
		
			
				|  |  |  |  |     private Integer scriptType; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // 脚本编写的语言
 | 
		
	
		
			
				|  |  |  |  |     // 10=Groovy, 20=Jython, 30=JavaScript, 40=Scala, 50=JRuby
 | 
		
	
		
			
				|  |  |  |  |     @Column(name = "LANGUAGE_TYPE") | 
		
	
		
			
				|  |  |  |  |     @AnnoOutputColumn(name = "脚本语言") | 
		
	
		
			
				|  |  |  |  |     private Integer languageType; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // 脚本的具体内容
 | 
		
	
		
			
				|  |  |  |  |     @Lob | 
		
	
		
			
				|  |  |  |  |     @Column(name = "SCRIPT_CONTENT", columnDefinition = "TEXT") | 
		
	
		
			
				|  |  |  |  |     @AnnoOutputColumn(name = "脚本内容") | 
		
	
		
			
				|  |  |  |  |     private String scriptContent; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // 脚本的描述,包含脚本的用法,参数说明等
 | 
		
	
		
			
				|  |  |  |  |     @Column(name = "SCRIPT_REMARK", length = 2000) | 
		
	
		
			
				|  |  |  |  |     @AnnoOutputColumn(name = "脚本描述",required = false) | 
		
	
		
			
				|  |  |  |  |     private String scriptRemark; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // 编译后的脚本内容,通过预编译加快脚本的运行速度
 | 
		
	
		
			
				|  |  |  |  |     @Transient | 
		
	
		
			
				|  |  |  |  |     private Object compiledScript; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // 构造方法,便于批量创建数据
 | 
		
	
		
			
				|  |  |  |  |     public ScriptPersistence(Long id, String scriptNo, String scriptName, Integer scriptType, Integer languageType, | 
		
	
		
			
				|  |  |  |  |                                        String scriptContent, String scriptRemark) { | 
		
	
		
			
				|  |  |  |  |         this.id = id; | 
		
	
		
			
				|  |  |  |  |         this.scriptNo = scriptNo; | 
		
	
		
			
				|  |  |  |  |         this.scriptName = scriptName; | 
		
	
		
			
				|  |  |  |  |         this.scriptType = scriptType; | 
		
	
		
			
				|  |  |  |  |         this.languageType = languageType; | 
		
	
		
			
				|  |  |  |  |         this.scriptContent = scriptContent; | 
		
	
		
			
				|  |  |  |  |         this.scriptRemark = scriptRemark; | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | } |