上线工位

tags/yfai-mes-ext-v1.0
yxw 2 years ago
parent fc1696aa39
commit 853fcb9e67

@ -0,0 +1,63 @@
package cn.estsh.i3plus.ext.mes.pojo.bean;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @Description:
* @Author: xinwang.yi
* @Date: 2023/10/12 14:03
* @Modify:
*/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_MANAGE_CODE", indexes = {
@Index(columnList = "MANAGE_CODE"),
@Index(columnList = "WORK_CENTER_CODE"),
@Index(columnList = "MANAGE_CODE,WORK_CENTER_CODE"),
})
@Api("MES_管理码主表")
public class MesManageCode extends BaseBean implements Serializable {
private static final long serialVersionUID = -249096410002817786L;
@Column(name = "MANAGE_CODE")
@ApiParam(value = "管理编码")
private String manageCode;
@Column(name = "MANAGE_NAME")
@ApiParam("管理编码名称")
private String shiftCode;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("产线代码")
private String workCenterCode;
@Column(name = "WORK_CENTER_NAME")
@ApiParam("产线名称")
private String workCenterName;
@Column(name = "USE_STATUS")
@ColumnDefault("10")
@ApiParam("使用状态")
@AnnoOutputColumn(refClass = MesExtEnumUtil.MANAGE_USE_STATUS.class, refForeignKey = "value", value = "description")
private Integer useStatus;
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.ext.mes.pojo.repository;
import cn.estsh.i3plus.ext.mes.pojo.bean.MesManageCode;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import org.springframework.stereotype.Repository;
/**
* @author xinwang.yi
* @version 1.0
* @date 2023/10/12 9:17
**/
@Repository
public interface MesManageCodeRepository extends BaseRepository<MesManageCode, Long> {
}

@ -802,7 +802,7 @@ public class MesExtEnumUtil {
PART_CHECK(10, "物料点检"), PART_CHECK(10, "物料点检"),
PERSON_CHECK(20, "上岗证点检"), PERSON_CHECK(20, "上岗证点检"),
TORQUE_MANAGE(30, "扭矩管理点检"), //Q_MANAGE(30, "Q管理"),
EQU_CHECK(40, "设备点检"), EQU_CHECK(40, "设备点检"),
ESD_CHECK(50, "防静电点检"), ESD_CHECK(50, "防静电点检"),
WORK_ORDER_FIRST(60, "Q管理"), WORK_ORDER_FIRST(60, "Q管理"),
@ -812,8 +812,8 @@ public class MesExtEnumUtil {
NAMEPLATE_GUARANTEE_CONSISTENCY(100, "铭牌保证书一致性"), NAMEPLATE_GUARANTEE_CONSISTENCY(100, "铭牌保证书一致性"),
EXTERIOR_SCRATCH_PROOF_CHECK(110, "外观防划伤点检"), EXTERIOR_SCRATCH_PROOF_CHECK(110, "外观防划伤点检"),
PROJECT_TOUR_CONTRIM(120, "工程巡回确认"), PROJECT_TOUR_CONTRIM(120, "工程巡回确认"),
WEIGHING_MANAGEMENT_TABLE(130, "称重管理表"); WEIGHING_MANAGEMENT_TABLE(130, "称重管理表"),
TORQUE_MANAGE(140, "扭矩管理");
private int value; private int value;
private String description; private String description;
@ -2259,7 +2259,9 @@ public class MesExtEnumUtil {
public enum LINE_TYPE { public enum LINE_TYPE {
ONTOLOGY_LINE(10, "本体线"), ONTOLOGY_LINE(10, "本体线"),
COMPONENT_LINE(20, "组件线"); COMPONENT_LINE(20, "组件线"),
FOUNTAIN(30, "源泉线"),
PARTS(40, "零部件");
private int value; private int value;
private String description; private String description;
@ -4638,18 +4640,18 @@ public class MesExtEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MANAGE_USE_STATUS { public enum MANAGE_USE_STATUS {
LEISURE("10", "空闲"), LEISURE(10, "空闲"),
OCCUPY("20", "占用"); OCCUPY(20, "占用");
private String value; private int value;
private String description; private String description;
MANAGE_USE_STATUS(String value, String description) { MANAGE_USE_STATUS(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
public String getValue() { public int getValue() {
return value; return value;
} }
@ -4657,18 +4659,18 @@ public class MesExtEnumUtil {
return description; return description;
} }
public static String valueOfDescription(String val) { public static String valueOfDescription(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) { if (values()[i].value == val) {
tmp = values()[i].description; tmp = values()[i].description;
} }
} }
return tmp; return tmp;
} }
public static String descriptionOfValue(String description) { public static Integer descriptionOfValue(String description) {
String tmp = null; Integer tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) { if (values()[i].description.equals(description)) {
tmp = values()[i].value; tmp = values()[i].value;

Loading…
Cancel
Save