Merge pull request 'ext-dev' (#343) from andly.pan/i3plus-pojo:ext-dev into ext-dev

Reviewed-on: http://git.estsh.com/i3-IMPP/i3plus-pojo/pulls/343
yun-zuoyi
钮海涛 3 years ago
commit 022ec3243e

@ -0,0 +1,51 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.ClassLevelAnnotation;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* @Description :线
* @Reference :
* @Author : pantianhu
* @CreateDate : 2022-03-29 11:26
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_PRODUCT_LINE")
@Api("产线信息")
@ClassLevelAnnotation(level = 0)
public class ProductLine extends BaseAPS {
private static final long serialVersionUID = 6900226668783322736L;
@Column(name="CODE")
@ApiParam(value ="编码")
@FieldAnnotation(popSearch = true, mainkey = true)
private String code;
@Column(name="NAME")
@ApiParam(value ="名称")
@FieldAnnotation(popSearch = true)
private String name;
@Column(name="TYPE")
@ApiParam(value ="产线类型")
private ApsEnumUtil.SANLUX_PRODUCT_TYPE type;
@Column(name="PRODUCT_QUALITY")
@ApiParam(value ="指定品质")
private String productQuality;
}

@ -108,6 +108,11 @@ public class Resource extends BaseAPS {
@FieldAnnotation(relation = "Order", modify = false)
private Long bindResourceId;
@Column(name="PRODUCT_LINE_ID")
@ApiParam(value ="生产线")
@FieldAnnotation(relation = "ProductLine")
private Long productLineId;
@JsonIgnore
public WorkShop getWorkShop() { return BeanRelation.get(this, EResource.WorkShop); }
@ -116,6 +121,14 @@ public class Resource extends BaseAPS {
BeanRelation.set(this, EResource.WorkShop, workShop);
}
@JsonIgnore
public ProductLine getProductLine() { return BeanRelation.get(this, EResource.ProductLine); }
public void setProductLine(ProductLine productLine) {
this.productLineId = productLine != null ? productLine.getId() : 0L;
BeanRelation.set(this, EResource.ProductLine, productLine);
}
@JsonBackReference
public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EResource.WorkPlans); }

@ -182,6 +182,9 @@ public class Work extends BaseAPS {
@ApiParam(value ="工作排序顺序")
private Integer workSeqNumber;
@ApiParam(value ="工作品质顺序")
private Integer workSeqQuality;
@Column(name="MOULD_ID")
@ApiParam(value ="模具能力id")
@FieldAnnotation(property = false)
@ -192,6 +195,14 @@ public class Work extends BaseAPS {
@FieldAnnotation(modify = false)
private Boolean feedbackSplit;
@Column(name="MOULD_NUM")
@ApiParam(value ="模具数量")
private Integer mouldNum;
@Column(name="MOULD_CODE")
@ApiParam(value ="模具编码")
private String mouldCode;
// 排程时,找插入位置的评估值
private transient double evaluateValue = 0;

@ -146,6 +146,10 @@ public class WorkPlan extends BaseAPS {
@ApiParam(value ="模具编码")
private String mouldCode;
@Column(name="LINE_PRIORITY")
@ApiParam(value ="产线优先级")
private String linePriority;
@JsonIgnore
public Work getWork() { return BeanRelation.get(this, EWorkPlan.Work); }

@ -12,4 +12,5 @@ public enum EResource {
WorkPlans,
BindResource,
SubBindResources,
ProductLine
}

@ -0,0 +1,19 @@
package cn.estsh.i3plus.pojo.aps.model;
import lombok.Data;
import java.util.Date;
import java.util.Map;
/**
* @Description :
* @Reference :
* @Author : pantianhu
* @CreateDate : 2022-02-25 11:22
* @Modify:
**/
@Data
public class MouldRecord {
private Date shifTime;
private Map<String,Integer> mouldMap;
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.ProductLine;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
/**
* @Description :线
* @Reference :
* @Author : pantianhu
* @CreateDate : 2022-04-01 9:46
* @Modify:
**/
@Repository
public interface ProductLineRepository extends CrudRepository<ProductLine,Long> {
}

@ -6,4 +6,6 @@
</Relation>
<Relation field="BindResource" name="Resource" reverse="SubBindResources" type="MULTI_TO_ONE">
</Relation>
<Relation field="ProductLine" name="ProductLine" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class>

@ -1197,4 +1197,33 @@ public class ApsEnumUtil {
return description;
}
}
/**
* 线
*/
public enum SANLUX_PRODUCT_TYPE implements Enumerator {
ONE_LINE("ONE_LINE", "汽车带1号线"),
TWO_LINE("TWO_LINE", "汽车带2号线"),
THREE_LINE("THREE_LINE", "汽车带3号线"),
SEVEN_LINE("SEVEN_LINE", "汽车带7号线"),
EIGHT_LINE("EIGHT_LINE", "汽车带8号线");
private final String value;
private final String description;
SANLUX_PRODUCT_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
@Override
public String getValue() {
return value;
}
@Override
public String getDescription() {
return description;
}
}
}

Loading…
Cancel
Save