1:增加资源甘特图获取数据接口
parent
c2d3e044fb
commit
bd834a24cb
@ -0,0 +1,50 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.aps.bean;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
|
||||||
|
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
|
||||||
|
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
|
||||||
|
import cn.estsh.i3plus.pojo.aps.holders.ERuleDetail;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :规则组合下的规则明细
|
||||||
|
* @Reference :
|
||||||
|
* @Author : jason.niu
|
||||||
|
* @CreateDate : 2019-11-05
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@Table(name = "APS_RULE_DETAIL")
|
||||||
|
@Api("规则明细")
|
||||||
|
public class RuleDetail extends BaseAPS {
|
||||||
|
@Column(name="RULE_GROUP_ID")
|
||||||
|
@ApiParam(value ="规则组合ID")
|
||||||
|
@FieldAnnotation(property = false)
|
||||||
|
private Long ruleGroupId;
|
||||||
|
|
||||||
|
@Column(name="RULE_ID")
|
||||||
|
@ApiParam(value ="规则配置ID")
|
||||||
|
@FieldAnnotation(property = false)
|
||||||
|
private Long ruleId;
|
||||||
|
|
||||||
|
RuleGroup getRuleGroup() { return BeanRelation.get(this, ERuleDetail.RuleGroup); }
|
||||||
|
|
||||||
|
void setRuleGroup(RuleGroup ruleGroup) {
|
||||||
|
this.ruleGroupId = ruleGroup != null ? ruleGroup.getId() : 0;
|
||||||
|
BeanRelation.set(this, ERuleDetail.RuleGroup, ruleGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
BaseRule getRule() { return BeanRelation.get(this, ERuleDetail.Rule); }
|
||||||
|
|
||||||
|
void setRule(BaseRule rule) {
|
||||||
|
this.ruleId = rule != null ? rule.getId() : 0;
|
||||||
|
BeanRelation.set(this, ERuleDetail.Rule, rule);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.aps.holders;
|
||||||
|
|
||||||
|
public enum EBaseRule {
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.aps.holders;
|
||||||
|
|
||||||
|
public enum ERuleDetail {
|
||||||
|
RuleGroup,
|
||||||
|
Rule
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.aps.holders;
|
||||||
|
|
||||||
|
public enum ERuleGroup {
|
||||||
|
Details
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.aps.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.aps.bean.RuleDetail;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RuleDetailRepository extends CrudRepository<RuleDetail, Long> {
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Class name="RuleDetail">
|
||||||
|
<Relation field="Rule" name="BaseRule" type="MULTI_TO_ONE" owner="false">
|
||||||
|
</Relation>
|
||||||
|
</Class>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Class name="RuleGroup">
|
||||||
|
<Relation field="Details" name="RuleDetail" reverse="RuleGroup" type="ONE_TO_MULTI" owner="true">
|
||||||
|
</Relation>
|
||||||
|
</Class>
|
Loading…
Reference in New Issue