diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java index 0bd68a5..638da66 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/busi/MesSpotCheckOrderService.java @@ -5,7 +5,8 @@ import cn.estsh.i3plus.ext.mes.api.busi.IMesSpotCheckOrderPartService; import cn.estsh.i3plus.ext.mes.api.busi.IMesSpotCheckOrderResultService; import cn.estsh.i3plus.ext.mes.api.busi.IMesSpotCheckOrderService; import cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base.BaseMesService; -import cn.estsh.i3plus.pojo.mes.unit.MesExtEnumUtil; +import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil; import cn.estsh.i3plus.mes.api.iservice.busi.ISyncFuncService; import cn.estsh.i3plus.platform.common.convert.ConvertBean; import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum; @@ -61,6 +62,8 @@ public class MesSpotCheckOrderService extends BaseMesService public MesSpotCheckOrder insert(MesSpotCheckOrder bean) { onInsertBean(bean); + bean.setTaskResource(MesCommonConstant.SPOT_CHECK_ORDER_TASK_RESOURCE); + bean.setStatus(MesExtEnumUtil.SPOT_CHECK_ORDER_STATUS.CREATE.getValue()); //查询点检方案 点检单点检方案 spotCheckId-id关联 MesEquipmentSpotCheck equipmentSpotCheck = equipmentSpotCheckService.get(bean.getSpotCheckId()); @@ -72,9 +75,17 @@ public class MesSpotCheckOrderService extends BaseMesService .build(); } + if (equipmentSpotCheck.getTriggerMode() == MesExtEnumUtil.EQUIPMENT_SPOT_CHECK_TRIGGER_MODE.TIME.getValue()) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("【%s】点检方案触发方式为【%s】,请勿手动创建", bean.getSpotCheckId(), MesExtEnumUtil.EQUIPMENT_SPOT_CHECK_TRIGGER_MODE.TIME.getDescription()) + .build(); + } + //查询点检明细 主表明细表 spotCheckId-pid关联 DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); - DdlPreparedPack.getNumberBiggerEqualPack(bean.getSpotCheckId(), "pid", packBean); + DdlPreparedPack.getNumEqualPack(bean.getSpotCheckId(), "pid", packBean); List detailList = equipmentSpotCheckDetailRepository.findByHqlWhere(packBean); if (CollectionUtils.isEmpty(detailList)) { @@ -98,13 +109,13 @@ public class MesSpotCheckOrderService extends BaseMesService } //生成单据号 - GenSerialNoModel genSerialNoModel = new GenSerialNoModel(); - List resultList = syncFuncService.syncSerialNo(genSerialNoModel, bean.getCreateUser(), bean.getOrganizeCode(), 1).getResultList(); +// GenSerialNoModel genSerialNoModel = new GenSerialNoModel(MesCommonConstant.SPOT_CHECK_ORDER_NO_RULE); +// List resultList = syncFuncService.syncSerialNo(genSerialNoModel, bean.getCreateUser(), bean.getOrganizeCode(), 1).getResultList(); //保存单据 BeanUtils.copyProperties(equipmentSpotCheck, bean, "id"); - bean.setSpotCheckOrderNo(resultList.get(0)); -// ConvertBean.serviceModelInitialize(bean, AuthUtil.getSessionUser().getUserName()); + bean.setSpotCheckOrderNo("SPOT_CHECK_ORDER_NO_0002"); + ConvertBean.serviceModelInitialize(bean, AuthUtil.getSessionUser().getUserName()); bean = baseRDao.insert(bean); //保存单据明细 @@ -114,6 +125,9 @@ public class MesSpotCheckOrderService extends BaseMesService MesSpotCheckOrderResult result = new MesSpotCheckOrderResult(); BeanUtils.copyProperties(k, result, "id"); result.setPid(finalBean.getId()); + result.setSpotCheckItemId(k.getId()); + result.setTaskItemName(k.getSpotCheckItemName()); + result.setSpotCheckStandardValue(k.getStandardValue()); ConvertBean.serviceModelInitialize(result, AuthUtil.getSessionUser().getUserName()); // ConvertBean.serviceModelInitialize(result, "LML"); spotCheckOrderResults.add(result); @@ -127,8 +141,8 @@ public class MesSpotCheckOrderService extends BaseMesService MesSpotCheckOrderPart spotCheckOrderPart = new MesSpotCheckOrderPart(); spotCheckOrderPart.setSpotCheckOrderId(finalBean.getId()); BeanUtils.copyProperties(k, spotCheckOrderPart, "id"); -// ConvertBean.serviceModelInitialize(spotCheckOrderPart, AuthUtil.getSessionUser().getUserName()); - ConvertBean.serviceModelInitialize(spotCheckOrderPart, "LML"); + ConvertBean.serviceModelInitialize(spotCheckOrderPart, AuthUtil.getSessionUser().getUserName()); +// ConvertBean.serviceModelInitialize(spotCheckOrderPart, "LML"); spotCheckOrderPartList.add(spotCheckOrderPart); }); spotCheckOrderPartService.insertBatch(spotCheckOrderPartList); @@ -145,6 +159,22 @@ public class MesSpotCheckOrderService extends BaseMesService //获取点检单 MesSpotCheckOrder originBean = baseRDao.getById(bean.getId()); + if (StringUtils.isEmpty(originBean)) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("【%s】点检单不存在,请检查数据", bean.getId()) + .build(); + } + + if (originBean.getStatus() != MesExtEnumUtil.SPOT_CHECK_ORDER_STATUS.CREATE.getValue()) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("【%s】点检单状态为【%s】不允许修改,请检查数据", bean.getSpotCheckId(), MesExtEnumUtil.SPOT_CHECK_ORDER_STATUS.valueOfDescription(originBean.getStatus())) + .build(); + } + //获取点检单明细 DdlPackBean orderResultPackBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); DdlPreparedPack.getNumEqualPack(bean.getId(), "pid", orderResultPackBean); @@ -158,7 +188,9 @@ public class MesSpotCheckOrderService extends BaseMesService spotCheckOrderResultRepository.saveAll(oldOrderResultList); //获取点检单零件号 - List oldOrderPartList = spotCheckOrderPartRepository.findByHqlWhere(orderResultPackBean); + DdlPackBean orderPartPackBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); + DdlPreparedPack.getNumEqualPack(bean.getId(), "spotCheckOrderId", orderPartPackBean); + List oldOrderPartList = spotCheckOrderPartRepository.findByHqlWhere(orderPartPackBean); //软删点检单零件号及条码 oldOrderPartList.forEach(k -> { @@ -178,6 +210,14 @@ public class MesSpotCheckOrderService extends BaseMesService .build(); } + if (equipmentSpotCheck.getTriggerMode() == MesExtEnumUtil.EQUIPMENT_SPOT_CHECK_TRIGGER_MODE.TIME.getValue()) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("【%s】点检方案触发方式为【%s】,请勿手动创建", bean.getSpotCheckId(), MesExtEnumUtil.EQUIPMENT_SPOT_CHECK_TRIGGER_MODE.TIME.getDescription()) + .build(); + } + //获取点检方案明细 主表明细表 spotCheckId-pid关联 DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); DdlPreparedPack.getNumberBiggerEqualPack(bean.getSpotCheckId(), "pid", packBean); @@ -239,6 +279,15 @@ public class MesSpotCheckOrderService extends BaseMesService for (Long id : ids) { MesSpotCheckOrder bean = baseRDao.getById(id); if (StringUtils.isEmpty(bean)) continue; + + if (bean.getStatus() != MesExtEnumUtil.SPOT_CHECK_ORDER_STATUS.CREATE.getValue()) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("【%s】点检单状态为【%s】不允许修改,请检查数据", bean.getSpotCheckId(), MesExtEnumUtil.SPOT_CHECK_ORDER_STATUS.valueOfDescription(bean.getStatus())) + .build(); + } + //获取点检方案明细 DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); DdlPreparedPack.getNumberBiggerEqualPack(bean.getSpotCheckId(), "pid", packBean); @@ -276,7 +325,7 @@ public class MesSpotCheckOrderService extends BaseMesService throw ImppExceptionBuilder.newInstance() .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) - .setErrorDetail("存在相同配置状态为【%s】 id:【%s】的点检单,请检查数据", MesExtEnumUtil.SPOT_CHECK_ORDER_STATUS.CREATE.getDescription(), bean.getSpotCheckId()) + .setErrorDetail("存在相同配置状态为【%s】的点检单 id:【%s】,请检查数据", MesExtEnumUtil.SPOT_CHECK_ORDER_STATUS.CREATE.getDescription(), bean.getSpotCheckId()) .build(); } } diff --git a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/constant/MesCommonConstant.java b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/constant/MesCommonConstant.java index 9129d0d..beb6740 100644 --- a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/constant/MesCommonConstant.java +++ b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/constant/MesCommonConstant.java @@ -14,5 +14,9 @@ public class MesCommonConstant { public static final Integer FALSE_INTEGER = 2; + public static final String SPOT_CHECK_ORDER_TASK_RESOURCE = "MES"; + + public static final String SPOT_CHECK_ORDER_NO_RULE = "SPOT_CHECK_ORDER_NO_RULE"; + } diff --git a/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtEnumUtil.java b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtEnumUtil.java new file mode 100644 index 0000000..cebd816 --- /dev/null +++ b/modules/i3plus-ext-mes-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pojo/util/MesExtEnumUtil.java @@ -0,0 +1,2284 @@ +package cn.estsh.i3plus.ext.mes.pojo.util; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * @Description : + * @Reference : + * @Author : wangjie + * @CreateDate : 2018-10-23 15:53 + * @Modify: + **/ + +public class MesExtEnumUtil { + + /** + * mes导入模块 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_EXCEL { + + MES_ITEM_PART_ERROR_PREVENTION(40, "mesItemPartErrorPreventionExcelService", "原材料防错,支持编辑"), + MES_PART_PTR(41, "mesPartPtrExcelService", "PTR,支持编辑"), + MES_EXPERIMENTAL_PIECE_RULE(42, "mesExperimentalPieceRuleExcelService", "实验件规则,支持编辑"); + + private int value; + private String service; + private String description; + + MES_EXCEL(int value, String service, String description) { + this.value = value; + this.service = service; + this.description = description; + } + + public static MES_EXCEL getByValue(int value) { + for (MES_EXCEL excel : values()) { + if (excel.getValue() == value) { + return excel; + } + } + return null; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String valueOfService(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].service; + } + } + return tmp; + } + + public int getValue() { + return value; + } + + public String getService() { + return service; + } + + public String getDescription() { + return description; + } + } + + + /** + * 工单类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum ORDER_TYPE { + SORT(10, "排序"), + UN_SORT(20, "非排序"), + BTO(30, "BTO"); + + private int value; + private String description; + + private ORDER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 工单类型标识 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum ORDER_TYPE_IDENTIFICATION { + S(10, "S"), + P(20, "P"), + N(30, "N"), + E(40, "E"); + + private int value; + private String description; + + private ORDER_TYPE_IDENTIFICATION(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 工单状态 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum ORDER_STATUS { + CREATE(10, "未处理"), + RELEASE(20, "已发布"), + process(30, "在加工"), + CLOSE(40, "关闭"), + COMPLETE(50, "已完成"), + SHIPPING(60, "已发运"), + DISMANTLE(70, "已拆解"); + + private int value; + private String description; + + private ORDER_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 发运单状态 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_ORDER_STATUS { + CREATE(10, "创建"), + PUBLISHED(20, "已发布"), + SHIPPED(30, "已发运"), + VERIFYING(35, "校验中"), + VERIFICATION_COMPLETED(40, "校验完成"); + + private int value; + private String description; + + private SHIPPING_ORDER_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 发运单类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_ORDER_TYPE { + SORT_SHIPPING(10, "排序发运"); + + private int value; + private String description; + + private SHIPPING_ORDER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 装车单明细-发运状态 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_ORDER_DETAIL_SHIPPING_STATUS { + PUBLISHED(10, "Published"), + SHIPPINGED(20, "Shippinged"); + + private int value; + private String description; + + private SHIPPING_ORDER_DETAIL_SHIPPING_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_TYPE { + PHYSICAL(10, "物理设备"), + VIRTUAL(20, "虚拟设备"); + + private int value; + private String description; + + private EQUIPMENT_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备变量类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_VARIABLE_TYPE { + PRODUCTION_PARAM(10, "生产参数"), + PRODUCTION_PARAM_COMPLETED(20, "生产参数完成"); + + private int value; + private String description; + + private EQUIPMENT_VARIABLE_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 设备变量类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SECOND_CATEGORY { + SECOND_CATEGORY_10(10, "物理设备"), + SECOND_CATEGORY_20(20, "虚拟设备"); + + private int value; + private String description; + + private SECOND_CATEGORY(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 设备点检-点检单类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_CHECK_ORDER_TYPE { + PROCESS_PARAM_INSPECTION(10, "工艺参数点检"), + EQUIPMENT_INSPECTION(20, "设备点检"), + FIRST_INSPECTION(30, "首检"), + ERROR_PROOF_VERIFICATION(40, "防错验证"), + MOLD_INSPECTION(50, "模具点检"), + FIXTURE_INSPECTION(60, "工装点检"); + + private int value; + private String description; + + private EQUIPMENT_CHECK_ORDER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备点检-关键类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_CHECK_KEY_TYPES { + DEFAULT(10, "默认"), + KEY_FEATURES(20, "关键特性"), + ERROR_PROOF_VERIFICATION(30, "防错验证"); + + private int value; + private String description; + + private EQUIPMENT_CHECK_KEY_TYPES(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备点检-点检方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_CHECK_INSPECTION_METHOD { + BEFORE_PROCESSING(10, "加工前"), + AFTER_PROCESSING(20, "加工后"), + ALL_INSPECTIONS(30, "全部点检"), + EQUIPMENT_NOTIFICATION(40, "设备告知"); + + private int value; + private String description; + + private EQUIPMENT_CHECK_INSPECTION_METHOD(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备点检-点检触发方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_CHECK_INSPECTION_TRIGGER_METHOD { + EQUIPMENT_TRIGGERED(10, "设备触发"), + PROGRAM_TRIGGERED(20, "程序触发"), + TIME_TRIGGERED(30, "时间触发"); + + private int value; + private String description; + + private EQUIPMENT_CHECK_INSPECTION_TRIGGER_METHOD(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备点检-设备点检配置 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_CHECK_INSPECTION_TRIGGER_CONFIG { + OPTION1(10, "选项1"), + OPTION2(20, "选项2"), + OPTION3(30, "选项3"), + OPTION4(40, "选项4"); + + private int value; + private String description; + + private EQUIPMENT_CHECK_INSPECTION_TRIGGER_CONFIG(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-发运单数据来源 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_GROUP_DATE_SOURCE { + CUSTOMER_SORT_INFO(10, "客户排序信息"); + + private int value; + private String description; + + private SHIPPING_GROUP_DATE_SOURCE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-发运组类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_GROUP_TYPE { + SORT_SHIPPING_ORDERS(10, "排序发运单"), + UN_SORT_SHIPPING_ORDERS(20, "非排序发运单"); + + private int value; + private String description; + + private SHIPPING_GROUP_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-扫描确认零件方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_GROUP_CONFIRM_PART_TYPE { + SCAN_PART_BARCODE(10, "扫零件条码"), + CUSTOMER_PART_BARCODE(20, "客户零件条码"); + + private int value; + private String description; + + private SHIPPING_GROUP_CONFIRM_PART_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-扫描确认零件方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PRODUCE_SN_STATUS { + CREATE(10, "创建"), + OFFLINE(20, "已完成"), + ASSEMBLY(30, "已装配"), + CHECKED(40, "已校验"), + SHIPPED(50, "发运"); + + private int value; + private String description; + + private PRODUCE_SN_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-扫描确认零件方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PRODUCE_QC_STATUS { + QUALIFIED(10, "合格"), + SUSPICIOUS(20, "可疑"), + SCRAP(30, "报废"); + + private int value; + private String description; + + private PRODUCE_QC_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-客户信息点 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_GROUP_CUSTOMER_INFO_POINTS { + CUSTOMER_SORT_INSTRUCTION_TICKET(10, "客户排序指示票"), + PAINTING_OFFLINE_POINT(20, "涂装下线点"), + SYNC_INDICATOR_TICKET(30, "同步指示票"); + + private int value; + private String description; + + private SHIPPING_GROUP_CUSTOMER_INFO_POINTS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-扫描确认顺序方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_GROUP_SCAN_CONFIRM_SEQ_MODE { + DEFAULT_SORT(10, "默认排序"), + SCAN_POSITION_MATERIAL_RACK(20, "按料架位置扫描"); + + private int value; + private String description; + + private SHIPPING_GROUP_SCAN_CONFIRM_SEQ_MODE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-扫描方式判断 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_GROUP_SCAN_METHOD_JUDGMENT { + PART_NO(10, "零件号"), + CUSTOMER_PART_NO(20, "客户零件号"); + + private int value; + private String description; + + private SHIPPING_GROUP_SCAN_METHOD_JUDGMENT(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件发运组-圆整方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SHIPPING_GROUP_ROUND_METHOD { + ADJUST_BY_WINDOW_TIME(10, "按窗口时间圆整"), + GENERATE_BY_ORDER(20, "按包装圆整"), + ROUND_ACCORDING_TO_PARTS(30, "按零件圆整"), + ROUND_ACCORDING_TO_ORDER(30, "按订单生成"), + ROUND_ACCORDING_TO_PACK_PARTS(30, "按包装零件切换圆整"), + CUST_ORDER_IMPORT(30, "客户订单导入专用"); + + private int value; + private String description; + + private SHIPPING_GROUP_ROUND_METHOD(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件拉动组-圆整方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_PULL_ROUND_METHOD { + ROUND_BY_QUANTITY(10, "按数量圆整"), + ROUND_VIRTUAL_PART_NUMBER(20, "按虚拟总成号圆整"), + ROUND_DOOR_PANELS_NUMBER(30, "按门板成套圆整"); + + private int value; + private String description; + + private PART_PULL_ROUND_METHOD(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件拉动组-拉动单类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_PULL_ORDER_TYPE { + KITTING_PULL(10, "KITTING拉动"); + + private int value; + private String description; + + private PART_PULL_ORDER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件拉动组明细-发送灯光类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_PULL_DETAIL_SEND_LIGHT_TYPE { + FLASHING_LIGHT(10, "闪烁灯"), + ALWAYS_LIGHT(20, "常亮灯"), + ALWAYS_LIGHT_DEDUCTION_FREQUENCY(30, "常亮灯逐次扣数"); + + private int value; + private String description; + + private PART_PULL_DETAIL_SEND_LIGHT_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件拉动组明细-扫描验证方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_PULL_DETAIL_SCAN_VALIDATION_TYPE { + VALIDATE(10, "验证"), + UN_VALIDATE(20, "不验证"); + + private int value; + private String description; + + private PART_PULL_DETAIL_SCAN_VALIDATION_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件拉动组明细-时效规则 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_PULL_DETAIL_TIMELINESS_RULES { + LESS_MIN_TIME_DIFFERENCE_VALID(10, "小于最小时差有效"), + GREATER_MAX_TIME_DIFFERENCE_VALID(20, "大于最大时差有效"), + MAX_AND_MIN_TIME_DIFFERENCE_VALID(30, "最大最小时差间有效"); + + private int value; + private String description; + + private PART_PULL_DETAIL_TIMELINESS_RULES(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件拉动组明细-数据取值来源 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_PULL_DETAIL_DATA_VALUE_SOURCE { + FROM_WORK_ORDER(10, "来源于工单"), + FROM_PART_PULL_DETAIL(20, "来源于拉动组明细"); + + private int value; + private String description; + + private PART_PULL_DETAIL_DATA_VALUE_SOURCE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 物料信息-零件类别 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_TYPE { + ASSEMBLY(10, "总成装配"), + FIRE_HANDLE(20, "火焰处理"), + HOT_PRESS(30, "热压"); + + private int value; + private String description; + + private PART_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * PTR零件维护-状态 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PTR_PART_STATUS { + CREATE(10, "创建"), + CLOSE(20, "关闭"); + + private int value; + private String description; + + private PTR_PART_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * PTR零件维护-总成类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public static enum PTR_PART_TYPE { + CP(10, "CP"), + OHS(20, "OHS"), + DPFL(30, "DPFL"), + DPFR(40, "DPFR"), + DPRL(50, "DPRL"), + DPRR(60, "DPRR"); + + private int value; + private String description; + + private PTR_PART_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件生产组-生产方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_GROUP_PRODUCTION { + SORT_PRODUCTION(10, "排序生产"), + UN_SORT_PRODUCTION(20, "非排序生产"); + + private int value; + private String description; + + private PART_GROUP_PRODUCTION(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件生产组-订单拆工单的方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_GROUP_SPLIT_ORDER_METHOD { + min_15(10, "15分钟"), + min_30(20, "30分钟"), + min_60(30, "60分钟"), + min_120(40, "120分钟"), + shift_code(50, "班次"), + copy(60, "复制"); + + private int value; + private String description; + + private PART_GROUP_SPLIT_ORDER_METHOD(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件生产组-数据来源 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_GROUP_DATA_SOURCE { + CUSTOMER_SORT_INFO(10, "客户排序信息"), + CUSTOMER_ORDER(20, "客户订单"); + + private int value; + private String description; + + private PART_GROUP_DATA_SOURCE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 零件生产组明细-圆整方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PART_GROUP_DETAIL_ROUND_METHOD { + ROUND_ON_TIME(10, "按时圆整"), + ROUND_ACCORD_PACK(10, "按包装圆整"), + ROUND_ACCORD_PART(10, "按零件圆整"); + + private int value; + private String description; + + private PART_GROUP_DETAIL_ROUND_METHOD(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 产线类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum LINE_TYPE { + LINE_TYPE_10(10, "排序产线"), + LINE_TYPE_20(20, "非排序产线"); + private int value; + private String description; + + private LINE_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 生成拉动单的工单状态 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum GENERATE_STATUS { + GENERATE_STATUS_10(10, "已发布"), + GENERATE_STATUS_20(20, "正在加工"), + GENERATE_STATUS_30(30, "未处理"); + + private int value; + private String description; + + private GENERATE_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 验证类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum CHECK_TYPE { + CHECK_TYPE_10(10, "无序"), + CHECK_TYPE_20(20, "柔性焊顺序"), + CHECK_TYPE_30(30, "零件号加工顺序"), + CHECK_TYPE_40(40, "工单顺序"); + + + private int value; + private String description; + + private CHECK_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 工单推送方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum PUSH_TYPE { + PUSH_TYPE_10(10, "自动推送"), + PUSH_TYPE_20(20, "手动扫描"); + + + private int value; + private String description; + + private PUSH_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 条码输入模式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SN_ENTER_TYPE { + SN_ENTER_TYPE_10(10, "扫描器带回车"), + SN_ENTER_TYPE_20(20, "条码带回车"), + SN_ENTER_TYPE_30(20, "条码自带回车"); + + + + private int value; + private String description; + + private SN_ENTER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + /** + * 缺陷类型-类别 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum DEFECT_CATEGORY { + POSITION(10, "位置"), + TYPE(20, "类型"), + RESPONSIBILITY(30, "责任"); + + private int value; + private String description; + + private DEFECT_CATEGORY(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + + /** + * 装车单-状态 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum LOADING_ORDER_STATUS { + CREATE(10, "创建"), + LOADING(15, "装车中"), + LOADED(20, "已装车"), + SHIPPING(30, "已发运"), + CLOSE(40, "关闭"); + + private int value; + private String description; + + + private LOADING_ORDER_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 装车单-状态 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum LOADING_VEHICLES_ORDER_STATUS { + POSITION(10, "位置"), + TYPE(20, "类型"), + RESPONSIBILITY(30, "责任"); + + private int value; + private String description; + + private LOADING_VEHICLES_ORDER_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 装车单-天气情况 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum LOADING_VEHICLES_ORDER_WEATHER_CONDITION { + SUNNY_WEATHER(10, "晴天"), + INDOOR_LOADING(20, "室内装车"), + RAIN(30, "雨天"), + SNOW(40, "下雪"); + + private int value; + private String description; + + private LOADING_VEHICLES_ORDER_WEATHER_CONDITION(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 客户道口-类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum MES_CUSTOMER_ROAD_TYPE { + + CUSTOMER_ROAD_TYPE(10, "客户道口"), + SHIPPING_ROAD_TYPE(20, "发运道口"); + private int value; + private String description; + + private MES_CUSTOMER_ROAD_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 车系散件-类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum MES_CAR_SERIES_LOOSE_PART_TYPE { + + ASSEMBLY_PART(10, "装配件"), + STANDARD_PART(20, "标配件"); + + private int value; + private String description; + + private MES_CAR_SERIES_LOOSE_PART_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + + /** + * 缺陷告警配置-正面反面 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum DEFECT_ALARM_CONFIG_SIDES { + + FRONT(10, "正面"), + BACK(20, "反面"); + + private int value; + private String description; + + private DEFECT_ALARM_CONFIG_SIDES(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备加工参数维护-数据来源 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum DATA_SOURCE { + DATA_SOURCE10(10, "排序加工规则"), + DATA_SOURCE20(20, "非排序加工规则"), + DATA_SOURCE30(30, "腔组明细的ID"); + + private int value; + private String description; + + private DATA_SOURCE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 生产工单-报工类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum REPORT_TYPE { + REPORT(10, "报工"), + WRITE_OFF(20, "冲销"); + + private int value; + private String description; + + private REPORT_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + public enum MES_PART_TYPE { + RAW_MATERIAL("10", "原材料"), + PARTIALLY_PREPARED_PRODUCTS("20", "半成品"), + FINISHED_PRODUCT("30", "成品"), + CONTAINER_PRODUCT("40", "容器"), + UTENSIL("50", "器具"), + WORKING_HOURS("60", "工时"); + private String value; + private String description; + + MES_PART_TYPE(String value, String description) { + this.value = value; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(val)) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String descriptionOfValue(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(val)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * 设备加工参数维护-数据来源 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SPOT_CHECK_ORDER_STATUS { + CREATE(10, "创建"), + COMPLETE(20, "完成"), + CLOSE(30, "关闭"); + + private int value; + private String description; + + private SPOT_CHECK_ORDER_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备加工参数维护-数据来源 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum SPOT_CHECK_ORDER_TYPE { + PROCESS_PARAMETER_INSPECTION(1, "⼯艺参数点检"), + EQUIPMENT_INSPECTION(2, "设备点检"), + FIRST_PRODUCT_INSPECTION(3, "产品首检"), + ERROR_PROOF_VERIFICATION(4, "防错验证"), + MOLD_INSPECTION(5, "模具点检"), + ASSEMBLY_INSPECTION(6, "⼯装点检"), + SPECIAL_INSPECTION(7, "专检"); + + private int value; + private String description; + + private SPOT_CHECK_ORDER_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备点检明细-数据类型 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_SPOT_CHECK_DETAIL_DATE_TYPE { + QUALITATIVE(10, "定性"), + RATION(20, "定量"); + + private int value; + private String description; + + private EQUIPMENT_SPOT_CHECK_DETAIL_DATE_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + + /** + * 设备点检-触发方式 + */ + @JsonFormat( + shape = JsonFormat.Shape.OBJECT + ) + public static enum EQUIPMENT_SPOT_CHECK_TRIGGER_MODE { + ARTIFICIAL(10, "人工"), + TIME(20, "时间"); + + private int value; + private String description; + + private EQUIPMENT_SPOT_CHECK_TRIGGER_MODE(int value, String description) { + this.value = value; + this.description = description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + + for (int i = 0; i < values().length; ++i) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + + return tmp; + } + + public int getValue() { + return this.value; + } + + public String getDescription() { + return this.description; + } + } + +}