Merge branch 'dev' of http://git.estsh.com/i3-IMPP/i3plus-pojo into dev
commit
4e303413ff
@ -0,0 +1,270 @@
|
||||
package cn.estsh.i3plus.pojo.aps.common;
|
||||
|
||||
import cn.estsh.i3plus.pojo.aps.enums.FIELD_TYPE;
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class BeanInfo {
|
||||
private Class<? extends BaseBean> cls;
|
||||
private BeanInfo superBeanInfo;
|
||||
private List<BeanInfo> childsBeanInfos = new ArrayList<>();
|
||||
private Map<Enum<?>, RelationInfo> relations = new HashMap<>();
|
||||
|
||||
public BeanInfo(Class<? extends BaseBean> cls) {
|
||||
this.cls = cls;
|
||||
}
|
||||
|
||||
public void initHolder(Class<Enum<? extends Enum<?>>> holderCls) {
|
||||
Enum<? extends Enum<?>>[] ens = holderCls.getEnumConstants();
|
||||
for (Enum<? extends Enum<?>> en : ens) {
|
||||
RelationInfo info = new RelationInfo();
|
||||
info.setHolder(en);
|
||||
info.setBeanInfo(this);
|
||||
relations.put(en, info);
|
||||
}
|
||||
}
|
||||
|
||||
public BeanInfo getSuperBeanInfo() { return superBeanInfo; }
|
||||
|
||||
public boolean validHolder(Enum<?> holder) {
|
||||
return this.relations.get(holder) != null;
|
||||
}
|
||||
|
||||
public Enum<?> getHolder(String name) {
|
||||
for (Enum<?> holder : relations.keySet()) {
|
||||
if (holder.name().equalsIgnoreCase(name)) {
|
||||
return holder;
|
||||
}
|
||||
}
|
||||
if (superBeanInfo != null) {
|
||||
return superBeanInfo.getHolder(name);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Enum<?> getReverseHolder(Enum<?> holder) {
|
||||
RelationInfo relaInfo = getRelationInfo(holder);
|
||||
if (relaInfo != null) {
|
||||
return relaInfo.getReverseHolder();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Enum<?> getReverseHolder(String name) {
|
||||
RelationInfo relaInfo = getRelationInfo(name);
|
||||
if (relaInfo != null) {
|
||||
return relaInfo.getReverseHolder();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RelationInfo getRelationInfo(Enum<?> holder) {
|
||||
if (validHolder(holder)) {
|
||||
return relations.get(holder);
|
||||
}
|
||||
if (superBeanInfo != null) {
|
||||
return superBeanInfo.getRelationInfo(holder);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RelationInfo getRelationInfo(String name) {
|
||||
Enum<?> holder = getHolder(name);
|
||||
if (holder != null) {
|
||||
return getRelationInfo(holder);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addRelationInfo(Enum<?> holder, RelationInfo info) {
|
||||
this.relations.put(holder, info);
|
||||
}
|
||||
|
||||
public <T extends BaseBean> Class<T> getBeanClass() {
|
||||
return (Class<T>)cls;
|
||||
}
|
||||
|
||||
public BeanInfo getRelationBeanInfo(Enum<?> holder) {
|
||||
RelationInfo relaInfo = getRelationInfo(holder);
|
||||
if (relaInfo != null) {
|
||||
return relaInfo.getBeanInfo();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public BeanInfo getRelationBeanInfo(String name) {
|
||||
RelationInfo relaInfo = getRelationInfo(name);
|
||||
if (relaInfo != null) {
|
||||
return relaInfo.getBeanInfo();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public RELATION_TYPE getRelationType(Enum<?> holder) {
|
||||
RelationInfo relaInfo = getRelationInfo(holder);
|
||||
if (relaInfo != null) {
|
||||
return relaInfo.getType();
|
||||
}
|
||||
return RELATION_TYPE.INVALID;
|
||||
}
|
||||
|
||||
public RELATION_TYPE getRelationType(String name) {
|
||||
RelationInfo relaInfo = getRelationInfo(name);
|
||||
if (relaInfo != null) {
|
||||
return relaInfo.getType();
|
||||
}
|
||||
|
||||
return RELATION_TYPE.INVALID;
|
||||
}
|
||||
|
||||
public List<Enum<?>> getAllHolders() {
|
||||
List<Enum<?>> holders = new ArrayList<>();
|
||||
for (Map.Entry<Enum<?>, RelationInfo> entry : relations.entrySet()) {
|
||||
holders.add(entry.getKey());
|
||||
}
|
||||
return holders;
|
||||
}
|
||||
|
||||
public List<Enum<?>> getOwnerHolders() {
|
||||
List<Enum<?>> owners = new ArrayList<>();
|
||||
for (Map.Entry<Enum<?>, RelationInfo> entry : relations.entrySet()) {
|
||||
if (entry.getValue().isOwner()) {
|
||||
owners.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
return owners;
|
||||
}
|
||||
|
||||
public List<Enum<?>> getNormalSigns() {
|
||||
List<Enum<?>> holders = new ArrayList<>();
|
||||
for (Map.Entry<Enum<?>, RelationInfo> entry : relations.entrySet()) {
|
||||
if (!entry.getValue().isOwner()) {
|
||||
holders.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
return holders;
|
||||
}
|
||||
|
||||
private static Map<Class<? extends BaseBean>, BeanInfo> beanInfos = new HashMap<>();
|
||||
private static Map<String, BeanInfo> nameMapBeanInfos = new HashMap<>();
|
||||
|
||||
static {
|
||||
BeanInfo beanInfo = new BeanInfo(BaseBean.class);
|
||||
beanInfos.put(BaseBean.class, beanInfo);
|
||||
nameMapBeanInfos.put(BaseBean.class.getSimpleName(), beanInfo);
|
||||
}
|
||||
|
||||
public static void register(Class<? extends BaseBean> cls) {
|
||||
if (beanInfos.containsKey(cls)) {
|
||||
return;
|
||||
}
|
||||
BeanInfo beanInfo = new BeanInfo(cls);
|
||||
beanInfos.put(cls, beanInfo);
|
||||
nameMapBeanInfos.put(cls.getSimpleName(), beanInfo);
|
||||
register((Class<? extends BaseBean>)cls.getSuperclass());
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
for (Map.Entry<Class<? extends BaseBean>, BeanInfo> entry : beanInfos.entrySet()) {
|
||||
Class<? extends BaseBean> superClass = (Class<? extends BaseBean>)entry.getKey().getSuperclass();
|
||||
BeanInfo superBeanInfo = beanInfos.get(superClass);
|
||||
if (superBeanInfo != null) {
|
||||
entry.getValue().superBeanInfo = superBeanInfo;
|
||||
superBeanInfo.childsBeanInfos.add(entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
BeanRelationUtil.initData("cn.estsh.i3plus.pojo.aps.holders");
|
||||
BeanRelationUtil.loadConfig("relations");
|
||||
}
|
||||
|
||||
public static Set<Class<? extends BaseBean>> getBeanClasses() {
|
||||
return beanInfos.keySet();
|
||||
}
|
||||
|
||||
public static BeanInfo getBeanInfo(Class<? extends BaseBean> cls) {
|
||||
BeanInfo info = beanInfos.get(cls);
|
||||
return info;
|
||||
}
|
||||
|
||||
public static BeanInfo getBeanInfo(String name) {
|
||||
BeanInfo info = nameMapBeanInfos.get(name);
|
||||
return info;
|
||||
}
|
||||
|
||||
public static Class<? extends BaseBean> getSuperClass(Class<? extends BaseBean> cls) {
|
||||
BeanInfo superBeanInfo = getBeanInfo(cls).superBeanInfo;
|
||||
if (superBeanInfo != null) {
|
||||
return superBeanInfo.getBeanClass();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static FIELD_TYPE getFieldType(Class<?> cls) {
|
||||
FIELD_TYPE type = null;
|
||||
if (cls == Boolean.class || cls == boolean.class) {
|
||||
type = FIELD_TYPE.BOOLEAN;
|
||||
} else if (cls == Character.class) {
|
||||
type = FIELD_TYPE.CHAR;
|
||||
} else if (cls == Short.class || cls == short.class) {
|
||||
type = FIELD_TYPE.SHORT;
|
||||
} else if (cls == Integer.class || cls == int.class) {
|
||||
type = FIELD_TYPE.INTEGER;
|
||||
} else if (cls == Long.class || cls == long.class) {
|
||||
type = FIELD_TYPE.LONG;
|
||||
} else if (cls == Double.class || cls == Float.class ||
|
||||
cls == double.class || cls == float.class) {
|
||||
type = FIELD_TYPE.DOUBLE;
|
||||
} else if (cls == String.class) {
|
||||
type = FIELD_TYPE.STRING;
|
||||
} else if(cls == Date.class || cls == java.sql.Date.class) {
|
||||
type = FIELD_TYPE.DATE_TIME;
|
||||
} else if (cls == DateDuration.class) {
|
||||
type = FIELD_TYPE.DURATION;
|
||||
} else if (Enum.class.isAssignableFrom(cls)) {
|
||||
type = FIELD_TYPE.ENUM;
|
||||
} else if (BaseBean.class.isAssignableFrom(cls)) {
|
||||
type = FIELD_TYPE.OBJECT;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
public static Class<?> getFieldClass(FIELD_TYPE type) {
|
||||
Class<?> cls = null;
|
||||
switch (type) {
|
||||
case BOOLEAN:
|
||||
cls = Boolean.class;
|
||||
break;
|
||||
case CHAR:
|
||||
cls = Character.class;
|
||||
break;
|
||||
case SHORT:
|
||||
cls = Short.class;
|
||||
break;
|
||||
case INTEGER:
|
||||
cls = Integer.class;
|
||||
break;
|
||||
case LONG:
|
||||
cls = Long.class;
|
||||
break;
|
||||
case DOUBLE:
|
||||
cls = Double.class;
|
||||
break;
|
||||
case DATE:
|
||||
case TIME:
|
||||
case DATE_TIME:
|
||||
cls = Date.class;
|
||||
break;
|
||||
case STRING:
|
||||
cls = String.class;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return cls;
|
||||
}
|
||||
}
|
@ -0,0 +1,258 @@
|
||||
package cn.estsh.i3plus.pojo.aps.common;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class BeanRelation {
|
||||
Map<Class<? extends BaseBean>, Map<Long, Map<Enum<?>, List<BaseBean>>>> caches = new HashMap<>();
|
||||
|
||||
private void init() {
|
||||
for (Class<? extends BaseBean> cls : BeanInfo.getBeanClasses()) {
|
||||
caches.put(cls, new ConcurrentHashMap<>());
|
||||
}
|
||||
}
|
||||
|
||||
private static Map<Long, BeanRelation> relations = new ConcurrentHashMap<>();
|
||||
private static BeanRelation get() {
|
||||
Long userId = 0l;
|
||||
BeanRelation relation = relations.get(userId);
|
||||
if (relation == null) {
|
||||
synchronized (BeanRelation.class) {
|
||||
relation = relations.get(userId);
|
||||
if (relation == null) {
|
||||
relation = new BeanRelation();
|
||||
relation.init();
|
||||
relations.put(userId, relation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return relation;
|
||||
}
|
||||
|
||||
private static Map<Enum<?>, List<BaseBean>> createRelation(Class<? extends BaseBean> cls) {
|
||||
Map<Enum<?>, List<BaseBean>> result = new HashMap<>();
|
||||
BeanInfo beanInfo = BeanInfo.getBeanInfo(cls);
|
||||
if (beanInfo == null) {
|
||||
return result;
|
||||
}
|
||||
for (Enum<?> holder : beanInfo.getAllHolders()) {
|
||||
result.put(holder, new ArrayList<>());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<Enum<?>, List<BaseBean>> get(BaseBean bean) {
|
||||
Map<Enum<?>, List<BaseBean>> temp = get().caches.get(bean.getClass()).get(bean.getId());
|
||||
if (temp == null) {
|
||||
synchronized (bean.getClass()) {
|
||||
if (temp == null) {
|
||||
temp = createRelation(bean.getClass());
|
||||
get().caches.get(bean.getClass()).put(bean.getId(), temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
public static <T extends BaseBean> T get(BaseBean bean, Enum<?> holder) {
|
||||
List<T> beans = (List<T>)get(bean).get(holder);
|
||||
if (beans == null || beans.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return beans.get(0);
|
||||
}
|
||||
|
||||
public static <T extends BaseBean> T get(BaseBean bean, Enum<?> holder, Enum<?>... args) {
|
||||
return get(bean, null, holder, args);
|
||||
}
|
||||
|
||||
public static <T extends BaseBean> T get(BaseBean bean, Predicate<T> pred, Enum<?> holder, Enum<?>... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static <T extends BaseBean> T getImpl(BaseBean bean, Predicate<T> pred, Enum<?>[] args, int index) {
|
||||
if (index >= args.length) {
|
||||
if (pred == null || pred.test((T)bean)) {
|
||||
return (T)bean;
|
||||
}
|
||||
} else {
|
||||
List<BaseBean> relaBeans = list(bean, args[index]);
|
||||
for (BaseBean relaBean : relaBeans) {
|
||||
T temp = getImpl(relaBean, pred, args, index + 1);
|
||||
if (temp != null) {
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends BaseBean> List<T> list(BaseBean bean, Enum<?> holder) {
|
||||
List<T> beans = (List<T>)get(bean).get(holder);
|
||||
if (beans == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return beans;
|
||||
}
|
||||
|
||||
public static <T extends BaseBean> List<T> list(BaseBean bean, Enum<?> holder, Enum<?>... args) {
|
||||
return list(bean, null, holder, args);
|
||||
}
|
||||
|
||||
public static <T extends BaseBean> List<T> list(BaseBean bean, Predicate<T> pred, Enum<?> holder, Enum<?>... args) {
|
||||
List<T> result = new ArrayList<>();
|
||||
List<BaseBean> nextBeans = list(bean, holder);
|
||||
for (BaseBean nextBean : nextBeans) {
|
||||
listImpl(result, nextBean, pred, args, 0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static <T extends BaseBean> void listImpl(List<T> result, BaseBean bean, Predicate<T> pred, Enum<?>[] holders, int index) {
|
||||
if (index >= holders.length) {
|
||||
if (pred == null || pred.test((T)bean)) {
|
||||
result.add((T)bean);
|
||||
}
|
||||
} else {
|
||||
List<BaseBean> nextBeans = list(bean, holders[index]);
|
||||
for (BaseBean nextBean : nextBeans) {
|
||||
listImpl(result, nextBean, pred, holders, index + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设值两个对象之间的关联
|
||||
*
|
||||
* @param bean
|
||||
* @param holder
|
||||
* @param relaBean
|
||||
*/
|
||||
public static void set(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
if (relaBean == null) {
|
||||
remove(bean, holder);
|
||||
} else {
|
||||
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
|
||||
final Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
|
||||
switch (beanInfo.getRelationType(holder)) {
|
||||
case MULTI_TO_MULTI:
|
||||
break;
|
||||
case MULTI_TO_ONE:
|
||||
remove(bean, holder);
|
||||
break;
|
||||
case INVALID:
|
||||
break;
|
||||
case ONE_TO_MULTI:
|
||||
remove(relaBean, reverseHolder);
|
||||
break;
|
||||
case ONE_TO_ONE:
|
||||
remove(bean, holder);
|
||||
remove(relaBean, reverseHolder);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
setImpl(bean, holder, relaBean, reverseHolder);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 建立对象之间双向引用实现
|
||||
*
|
||||
* @param bean
|
||||
* @param holder
|
||||
* @param relaBean
|
||||
* @param reverseHolder
|
||||
*/
|
||||
private static void setImpl(BaseBean bean, Enum<?> holder, BaseBean relaBean, Enum<?> reverseHolder) {
|
||||
get(bean).get(holder).add(relaBean);
|
||||
if (reverseHolder != null) {
|
||||
get(relaBean).get(reverseHolder).add(bean);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除关联
|
||||
*
|
||||
* @param bean
|
||||
* @param holder
|
||||
*/
|
||||
private static void remove(BaseBean bean, Enum<?> holder) {
|
||||
if (holder == null) {
|
||||
return;
|
||||
}
|
||||
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
|
||||
final Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
|
||||
if (reverseHolder != null) {
|
||||
for (BaseBean relaBean : get(bean).get(holder)) {
|
||||
if (relaBean == null) {
|
||||
continue;
|
||||
}
|
||||
get(relaBean).get(reverseHolder).remove(bean);
|
||||
}
|
||||
}
|
||||
get(bean).get(holder).clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除关联的指定对象
|
||||
*
|
||||
* @param bean
|
||||
* @param holder
|
||||
* @param relaBean
|
||||
*/
|
||||
private static void remove(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
|
||||
final Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
|
||||
if (reverseHolder != null) {
|
||||
get(relaBean).get(reverseHolder).remove(bean);
|
||||
}
|
||||
get(bean).get(holder).remove(relaBean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除对象
|
||||
*
|
||||
* @param bean
|
||||
*/
|
||||
public static void delete(BaseBean bean) {
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
|
||||
List<Enum<?>> ownerSigns = beanInfo.getOwnerHolders();
|
||||
for (Enum<?> holder : ownerSigns) {
|
||||
List<BaseBean> relaBeans = new ArrayList<>(list(bean, holder));
|
||||
for (BaseBean relaBean : relaBeans) {
|
||||
//MemoryManager.delete(relaBean);
|
||||
}
|
||||
}
|
||||
|
||||
List<Enum<?>> normalSigns = beanInfo.getNormalSigns();
|
||||
for (Enum<?> holder : normalSigns) {
|
||||
Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
|
||||
List<BaseBean> relaBeans = new ArrayList<>(list(bean, holder));
|
||||
for (BaseBean relaBean : relaBeans) {
|
||||
if (reverseHolder != null) {
|
||||
remove(relaBean, reverseHolder, bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,320 @@
|
||||
package cn.estsh.i3plus.pojo.aps.common;
|
||||
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
public class BeanRelationUtil {
|
||||
|
||||
static class XMLReader extends DefaultHandler {
|
||||
private BeanInfo firstInfo = null;
|
||||
private Enum<?> firstHolder = null;
|
||||
private BeanInfo secondInfo = null;
|
||||
private Enum<?> secondHolder = null;
|
||||
private RELATION_TYPE type = RELATION_TYPE.INVALID;
|
||||
private boolean owner = false;
|
||||
public void startElement(String uri, String localName, String nodeName, Attributes attributes) throws SAXException {
|
||||
if (nodeName.equalsIgnoreCase("Class")) {
|
||||
final String name = attributes.getValue("name");
|
||||
if (name == null) {
|
||||
throw new SAXException("Class节点的属性name未配置");
|
||||
}
|
||||
|
||||
this.firstInfo = BeanInfo.getBeanInfo(name);
|
||||
if (this.firstInfo == null) {
|
||||
throw new SAXException("未找到" + name + "的类定义");
|
||||
}
|
||||
} else if (nodeName.equalsIgnoreCase("Relation")) {
|
||||
if (this.firstInfo == null) {
|
||||
throw new SAXException("未配置Class节点");
|
||||
}
|
||||
|
||||
String firstSignName = attributes.getValue("field");
|
||||
if (firstSignName == null) {
|
||||
throw new SAXException("Relation节点缺少field属性");
|
||||
}
|
||||
this.firstHolder = this.firstInfo.getHolder(firstSignName);
|
||||
if (this.firstHolder == null) {
|
||||
throw new SAXException("未定义枚举标识" + firstSignName);
|
||||
}
|
||||
|
||||
String secondFactoryName = attributes.getValue("name");
|
||||
if (secondFactoryName == null) {
|
||||
throw new SAXException("Relation节点缺少name属性");
|
||||
}
|
||||
this.secondInfo = BeanInfo.getBeanInfo(secondFactoryName);
|
||||
if (this.secondInfo == null) {
|
||||
throw new SAXException("未找到" + secondFactoryName + "的类定义");
|
||||
}
|
||||
|
||||
String secondSignName = attributes.getValue("reverse");
|
||||
if (secondSignName != null) {
|
||||
this.secondHolder = this.secondInfo.getHolder(secondSignName);
|
||||
if (this.secondHolder == null) {
|
||||
throw new SAXException(secondFactoryName + "类未定义枚举标识" + secondSignName);
|
||||
}
|
||||
} else {
|
||||
this.secondHolder = null;
|
||||
}
|
||||
|
||||
String typeName = attributes.getValue("type");
|
||||
if (typeName == null) {
|
||||
throw new SAXException("Relation节点缺少type属性");
|
||||
}
|
||||
this.type = RELATION_TYPE.valueOf(typeName);
|
||||
|
||||
String ownerName = attributes.getValue("owner");
|
||||
if (ownerName == null) {
|
||||
this.owner = false;
|
||||
} else {
|
||||
this.owner = ownerName.equalsIgnoreCase("true") ? true : false;
|
||||
}
|
||||
|
||||
RelationInfo firstData = this.getSignData(firstInfo, this.firstHolder);
|
||||
firstData.setBeanInfo(this.secondInfo);
|
||||
firstData.setType(this.type);
|
||||
firstData.setOwner(this.owner);
|
||||
firstData.setReverseHolder(this.secondHolder);
|
||||
|
||||
if (this.secondHolder != null) {
|
||||
RelationInfo secondData = this.getSignData(secondInfo, this.secondHolder);
|
||||
secondData.setBeanInfo(this.firstInfo);
|
||||
secondData.setOwner(false);
|
||||
secondData.setReverseHolder(this.firstHolder);
|
||||
switch (this.type) {
|
||||
case MULTI_TO_MULTI:
|
||||
secondData.setType(RELATION_TYPE.MULTI_TO_MULTI);
|
||||
break;
|
||||
case MULTI_TO_ONE:
|
||||
secondData.setType(RELATION_TYPE.ONE_TO_MULTI);
|
||||
break;
|
||||
case INVALID:
|
||||
secondData.setType(RELATION_TYPE.INVALID);
|
||||
break;
|
||||
case ONE_TO_MULTI:
|
||||
secondData.setType(RELATION_TYPE.MULTI_TO_ONE);
|
||||
break;
|
||||
case ONE_TO_ONE:
|
||||
secondData.setType(RELATION_TYPE.ONE_TO_ONE);
|
||||
break;
|
||||
default:
|
||||
secondData.setType(RELATION_TYPE.INVALID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RelationInfo getSignData(BeanInfo beanInfo, Enum<?> holder) {
|
||||
RelationInfo data = beanInfo.getRelationInfo(holder);
|
||||
if (data == null) {
|
||||
data = new RelationInfo();
|
||||
data.setHolder(holder);
|
||||
beanInfo.addRelationInfo(holder, data);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
public static void initData(String holderPackage) {
|
||||
List<Class<?>> holderClses = loadClass(holderPackage);
|
||||
for (Class<?> enumCls : holderClses) {
|
||||
if (!Enum.class.isAssignableFrom(enumCls)) {
|
||||
continue;
|
||||
}
|
||||
String name = enumCls.getSimpleName();
|
||||
BeanInfo beanInfo = BeanInfo.getBeanInfo(name.substring(1));
|
||||
if (beanInfo == null) {
|
||||
continue;
|
||||
}
|
||||
beanInfo.initHolder((Class<Enum<? extends Enum<?>>>) enumCls);
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadConfig(String packName) {
|
||||
ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||
final String strFile = packName.replaceAll("\\.", "/");
|
||||
try {
|
||||
Enumeration<URL> urls = loader.getResources(strFile);
|
||||
while (urls.hasMoreElements()) {
|
||||
URL url = urls.nextElement();
|
||||
if (url != null) {
|
||||
String protocol = url.getProtocol();
|
||||
String filePath = url.getPath();
|
||||
if (protocol.equals("file")) {
|
||||
loadFileImpl(filePath);
|
||||
} else if (protocol.equals("jar")) {
|
||||
loadJarImpl(packName, url);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadFileImpl(String dirPath) {
|
||||
File dir = new File(dirPath);
|
||||
if (!dir.exists() || !dir.isDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
||||
File[] dirFiles = dir.listFiles(new FileFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File file) {
|
||||
return file.isDirectory() || file.getName().endsWith(".xml");
|
||||
}
|
||||
});
|
||||
|
||||
for (File file : dirFiles) {
|
||||
if (file.isDirectory()) {
|
||||
loadFileImpl(dirPath + "/" + file.getName());
|
||||
} else {
|
||||
try {
|
||||
loadXMLConfigure(file.getCanonicalPath());
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadJarImpl(String packName, URL url) throws IOException {
|
||||
JarURLConnection jarURLConnection = (JarURLConnection) url.openConnection();
|
||||
JarFile jarFile = jarURLConnection.getJarFile();
|
||||
Enumeration<JarEntry> jarEntries = jarFile.entries();
|
||||
while (jarEntries.hasMoreElements()) {
|
||||
JarEntry jarEntry = jarEntries.nextElement();
|
||||
String jarEntryName = jarEntry.getName();
|
||||
if (jarEntryName.endsWith(".xml")) {
|
||||
String packNameNew = packName.replace(".", "/");
|
||||
if (jarEntryName.contains(packNameNew)) {
|
||||
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(jarEntryName);
|
||||
loadXMLConfigure(is);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载本地开发环境中的xml配置文件。
|
||||
* @param xmlPath
|
||||
*/
|
||||
private static void loadXMLConfigure(String xmlPath) {
|
||||
SAXParserFactory sf = SAXParserFactory.newInstance();
|
||||
try {
|
||||
SAXParser sp = sf.newSAXParser();
|
||||
sp.parse(new InputSource(xmlPath), new XMLReader());
|
||||
} catch (ParserConfigurationException | SAXException | IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载jar中的xml配置文件。
|
||||
* @param is
|
||||
*/
|
||||
private static void loadXMLConfigure(InputStream is) {
|
||||
SAXParserFactory sf = SAXParserFactory.newInstance();
|
||||
try {
|
||||
SAXParser sp = sf.newSAXParser();
|
||||
sp.parse(new InputSource(is), new XMLReader());
|
||||
} catch (ParserConfigurationException | SAXException | IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将指定包下的类加载到内存中
|
||||
* @param packName
|
||||
*/
|
||||
public static List<Class<?>> loadClass(String packName) {
|
||||
List<Class<?>> clses = new ArrayList<>();
|
||||
ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||
String strFile = packName.replaceAll("\\.", "/");
|
||||
try {
|
||||
Enumeration<URL> urls = loader.getResources(strFile);
|
||||
while (urls.hasMoreElements()) {
|
||||
URL url = urls.nextElement();
|
||||
if (url != null) {
|
||||
String protocol = url.getProtocol();
|
||||
String filePath = url.getPath();
|
||||
if (protocol.equals("file")) {
|
||||
loadClassImpl(packName, filePath, clses);
|
||||
} else if (protocol.equals("jar")) {
|
||||
loadJarImpl(packName, url, clses);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return clses;
|
||||
}
|
||||
|
||||
private static void loadClassImpl(String packName, String dirPath, List<Class<?>> clses) {
|
||||
File dir = new File(dirPath);
|
||||
if (!dir.exists() || !dir.isDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
||||
File[] dirFiles = dir.listFiles(new FileFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File file) {
|
||||
return file.isDirectory() || file.getName().endsWith(".class");
|
||||
}
|
||||
});
|
||||
|
||||
for (File file : dirFiles) {
|
||||
if (file.isDirectory()) {
|
||||
loadClassImpl(packName + "." + file.getName(), dirPath + "/" + file.getName(), clses);
|
||||
} else {
|
||||
String clsName = file.getName();
|
||||
clsName = clsName.substring(0, clsName.length() - 6);
|
||||
try {
|
||||
clses.add(Class.forName(packName + "." + clsName));
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadJarImpl(String packName, URL url, List<Class<?>> clses) throws IOException {
|
||||
JarURLConnection jarURLConnection = (JarURLConnection) url.openConnection();
|
||||
JarFile jarFile = jarURLConnection.getJarFile();
|
||||
Enumeration<JarEntry> jarEntries = jarFile.entries();
|
||||
while (jarEntries.hasMoreElements()) {
|
||||
JarEntry jarEntry = jarEntries.nextElement();
|
||||
final String jarEntryName = jarEntry.getName();
|
||||
if (jarEntryName.endsWith(".class")) {
|
||||
String clsName = jarEntryName.replace("/", ".");
|
||||
if (clsName.startsWith(packName)) {
|
||||
clsName = clsName.substring(0, clsName.length() - 6);
|
||||
try {
|
||||
clses.add(Class.forName(clsName));
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package cn.estsh.i3plus.pojo.aps.common;
|
||||
|
||||
public enum RELATION_TYPE {
|
||||
INVALID, // 无效关联
|
||||
ONE_TO_ONE, // 1对1关系
|
||||
ONE_TO_MULTI, // 1对多关系
|
||||
MULTI_TO_ONE, // 多对1关系
|
||||
MULTI_TO_MULTI,// 多对多关系
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package cn.estsh.i3plus.pojo.aps.common;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RelationInfo {
|
||||
private BeanInfo beanInfo;
|
||||
private Enum<?> holder;
|
||||
private Enum<?> reverseHolder;
|
||||
private RELATION_TYPE type;
|
||||
private boolean owner;
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
package cn.estsh.i3plus.pojo.aps.holders;
|
||||
|
||||
public enum EDayShift {
|
||||
ResCalendar
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
package cn.estsh.i3plus.pojo.aps.holders;
|
||||
|
||||
public enum EImportDetail {
|
||||
Project
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
package cn.estsh.i3plus.pojo.aps.holders;
|
||||
|
||||
public enum EResCalendar {
|
||||
DayShifts,
|
||||
Resources,
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
package cn.estsh.i3plus.pojo.aps.holders;
|
||||
|
||||
public enum EResource {
|
||||
OperResources,
|
||||
WorkResources
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
package cn.estsh.i3plus.pojo.aps.holders;
|
||||
|
||||
public enum EStandOperation {
|
||||
Operations
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Class name="Material">
|
||||
<Relation field="ProductRouting" name="ProductRouting" reverse="Material" type="ONE_TO_MULTI" owner="true">
|
||||
<Relation field="ProductRoutings" name="ProductRouting" reverse="Material" type="ONE_TO_MULTI" owner="true">
|
||||
</Relation>
|
||||
</Class>
|
@ -1,7 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Class name="ResCalendar">
|
||||
<Relation field="DayShifts" name="DayShift" reverse="ResCalendar" type="MULTI_TO_MULTI" owner="false">
|
||||
</Relation>
|
||||
<Relation field="Resources" name="Resource" type="MULTI_TO_MULTI" owner="false">
|
||||
</Relation>
|
||||
</Class>
|
@ -0,0 +1,38 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Description :mes系统业务动作
|
||||
* @Reference :
|
||||
* @Author : jack.jia
|
||||
* @CreateDate : 2019-04-12
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="MES_CUST_PROD_LINE")
|
||||
@Api("客户产线代码")
|
||||
public class MesCustProdLine extends BaseBean {
|
||||
@Column(name="CUST_PROD_LINE_CODE")
|
||||
@ApiParam("客户产线代码")
|
||||
private String custProdLineCode;
|
||||
|
||||
@Column(name="CUST_PROD_LINE_NAME")
|
||||
@ApiParam("客户产线名称")
|
||||
private String custProdLineName;
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Description :mes客户表
|
||||
* @Reference :
|
||||
* @Author : crish
|
||||
* @CreateDate : 2019-04-22
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="MES_CUSTOMER")
|
||||
@Api("客户产线代码")
|
||||
public class MesCustomer extends BaseBean {
|
||||
@Column(name="CUSTOMER_CODE")
|
||||
@ApiParam("客户代码")
|
||||
private String customerCode;
|
||||
|
||||
@Column(name="CUSTOMER_NAME")
|
||||
@ApiParam("客户名称")
|
||||
private String customerName;
|
||||
|
||||
@Column(name="BRIEF_TEXT")
|
||||
@ApiParam("客户简称")
|
||||
private String briefText;
|
||||
|
||||
@Column(name="ADDRESS")
|
||||
@ApiParam("客户地址")
|
||||
private String address;
|
||||
|
||||
@Column(name="CONTACT")
|
||||
@ApiParam("客户联系人")
|
||||
private String contact;
|
||||
|
||||
@Column(name="TELEPHONE")
|
||||
@ApiParam("客户电话")
|
||||
private String telephone;
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 7:17 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_DB")
|
||||
@Api("地址清单")
|
||||
public class MesDB extends BaseBean {
|
||||
|
||||
@Column(name="DS_CODE")
|
||||
@ApiParam("数据源代码")
|
||||
private String dsCode;
|
||||
|
||||
@Column(name="DS_NAME")
|
||||
@ApiParam("数据源名称")
|
||||
private String dsName;
|
||||
|
||||
@Column(name="DS_TYPE")
|
||||
@ApiParam("数据源类型")
|
||||
private String dsType;
|
||||
|
||||
@Column(name="DS_HOST")
|
||||
@ApiParam("主机")
|
||||
private String dsHost;
|
||||
|
||||
@Column(name="DS_PORT")
|
||||
@ApiParam("端口")
|
||||
private Integer dsPort;
|
||||
|
||||
@Column(name="DS_USER")
|
||||
@ApiParam("用户名")
|
||||
private String dsUser;
|
||||
|
||||
@Column(name="DS_PASSWORD")
|
||||
@ApiParam("密码")
|
||||
private String dsPassword;
|
||||
|
||||
@Column(name="EQU_CODE")
|
||||
@ApiParam("设备代码")
|
||||
private String equCode;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 7:12 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_DATA_OBJECT")
|
||||
@Api("数据对象")
|
||||
public class MesDataObject extends BaseBean {
|
||||
|
||||
@Column(name="OBJECT_CODE")
|
||||
@ApiParam("对象代码")
|
||||
private String objectCode;
|
||||
|
||||
|
||||
@Column(name="OBJECT_NAME")
|
||||
@ApiParam("对象名称")
|
||||
private String objectName;
|
||||
|
||||
@Column(name="DS_CODE")
|
||||
@ApiParam("数据源代码")
|
||||
private String dsCode;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 7:14 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_OBJECT_CFG")
|
||||
@Api("对象结构")
|
||||
public class MesObjectCfg extends BaseBean {
|
||||
|
||||
|
||||
@Column(name = "OBJECT_CODE")
|
||||
@ApiParam("对象代码")
|
||||
private String objectCode;
|
||||
|
||||
@Column(name = "FIELD_CODE")
|
||||
@ApiParam("字段代码")
|
||||
private String fieldCode;
|
||||
|
||||
@Column(name = "FIELD_NAME")
|
||||
@ApiParam("字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@Column(name = "FIELD_TYPE")
|
||||
@ApiParam("字段类型")
|
||||
private String fieldType;
|
||||
|
||||
@Column(name = "FIELD_LENGTH")
|
||||
@ApiParam("列长度")
|
||||
private String fieldLength;
|
||||
|
||||
@Column(name = "FIELD_PK")
|
||||
@ApiParam("主键标记")
|
||||
private String fieldPk;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Description :零件种类
|
||||
* @Reference :
|
||||
* @Author : jack.jia
|
||||
* @CreateDate : 2019-04-02
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="MES_PART_CATEGORY")
|
||||
@Api("零件种类")
|
||||
public class MesPartCategory extends BaseBean {
|
||||
@Column(name="CATEGORY_CODE")
|
||||
@ApiParam("分类代码")
|
||||
private String categoryCode;
|
||||
|
||||
@Column(name="CATEGORY_NAME")
|
||||
@ApiParam("分类名称")
|
||||
private String categoryName;
|
||||
|
||||
@Column(name="CATEGORY_TYPE")
|
||||
@ApiParam("分类类型")
|
||||
private String categoryType;
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Reference:
|
||||
* @Author: Crish
|
||||
* @CreateDate:2019-04-16-17:36
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="MES_PLAN_ORDER")
|
||||
@Api("生产主计划")
|
||||
public class MesPlanOrder extends BaseBean {
|
||||
@Column(name="ORDER_NO")
|
||||
@ApiParam("生产计划单号")
|
||||
private String orderNo;
|
||||
|
||||
@Column(name="PO_TYPE")
|
||||
@ApiParam("计划类型")
|
||||
private Integer planType;
|
||||
|
||||
@Column(name="PROD_CFG_CODE")
|
||||
@ApiParam("产品配置代码")
|
||||
private String prodCfgCode;
|
||||
|
||||
@Column(name="PART_NO")
|
||||
@ApiParam("物料号")
|
||||
private String partNo;
|
||||
|
||||
@Column(name="PART_NAME_RDD")
|
||||
@ApiParam("物料名称")
|
||||
private String partNameRdd;
|
||||
|
||||
@Column(name="PLAN_QTY")
|
||||
@ApiParam("计划数量")
|
||||
private Double planQty;
|
||||
|
||||
@Column(name="DECOMPOSE_QTY")
|
||||
@ApiParam("分解数量")
|
||||
private Double decomposeQty;
|
||||
|
||||
@Column(name="STATUS")
|
||||
@ApiParam("状态")
|
||||
private Integer status;
|
||||
|
||||
@Column(name="START_TIME")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam("计划开始时间")
|
||||
private String startTime;
|
||||
|
||||
@Column(name="END_TIME")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam("计划结束时间")
|
||||
private String endTime;
|
||||
|
||||
@Column(name="DELIVERY_DATE")
|
||||
@ApiParam("交货日期")
|
||||
private String deliveryDate;
|
||||
|
||||
@Column(name="CUST_CODE")
|
||||
@ApiParam("客户代码")
|
||||
private String custCode;
|
||||
|
||||
@Column(name="CUST_ORDER_NO")
|
||||
@ApiParam("客户订单号")
|
||||
private String custOrderNo;
|
||||
|
||||
@Column(name="SOURCE")
|
||||
@ApiParam("计划来源")
|
||||
private String source;
|
||||
|
||||
@Column(name="MEMO")
|
||||
@ApiParam("备注")
|
||||
private String memo;
|
||||
|
||||
@Column(name="WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心代码")
|
||||
private String workCenterCode;
|
||||
|
||||
/********************** 冗余字段 *********************************/
|
||||
|
||||
@Transient
|
||||
@ApiParam(value="区域")
|
||||
public String areaCode;
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="创建日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
|
||||
public String startTimeStart;
|
||||
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="创建日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
|
||||
public String startTimeEnd;
|
||||
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="计划结束日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
|
||||
public String endTimeStart;
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="计划结束日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
|
||||
public String endTimeEnd;
|
||||
|
||||
public double getPlanQtyVal() {
|
||||
return this.planQty == null ? 0.0d : this.planQty;
|
||||
}
|
||||
|
||||
public double getDecomposeQtyVal() {
|
||||
return this.decomposeQty == null ? 0.0d : this.decomposeQty;
|
||||
}
|
||||
|
||||
public int getStatusVal() {
|
||||
return this.status == null ? 0 : this.status;
|
||||
}
|
||||
|
||||
public int getPlanTypeVal() {
|
||||
return this.planType == null ? 0 : this.planType;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Description :产品配置
|
||||
* @Reference :
|
||||
* @Author : jack.jia
|
||||
* @CreateDate : 2019-04-02
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="MES_PROD_CFG")
|
||||
@Api("产品配置")
|
||||
public class MesProdCfg extends BaseBean {
|
||||
@Column(name="PROD_CFG_CODE")
|
||||
@ApiParam("产品配置代码")
|
||||
private String prodCfgCode;
|
||||
|
||||
@Column(name="PROD_CFG_NAME")
|
||||
@ApiParam("产品配置名称")
|
||||
private String prodCfgName;
|
||||
|
||||
@Column(name="PROD_CFG_Type_CODE")
|
||||
@ApiParam("产品配置类型代码")
|
||||
private String prodCfgTypeCode;
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/21 1:45 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_WC_CHECK")
|
||||
@Api("开线检查")
|
||||
public class MesWcCheck extends BaseBean {
|
||||
|
||||
@Column(name="WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心")
|
||||
private String workCenterCode;
|
||||
|
||||
@Column(name="PART_NO")
|
||||
@ApiParam("产品物料号")
|
||||
private String partNo;
|
||||
|
||||
@Column(name="CHECK_TYPE")
|
||||
@ApiParam("检查类型")
|
||||
private String checkType;
|
||||
|
||||
@Column(name="CHECK_OBJ")
|
||||
@ApiParam("检查对象")
|
||||
private String checkObj;
|
||||
|
||||
@Column(name="CHECK_ITEM")
|
||||
@ApiParam("检查项")
|
||||
private String checkItem;
|
||||
|
||||
@Column(name="STANDARD")
|
||||
@ApiParam("检查标准")
|
||||
private String standard;
|
||||
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/21 1:57 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_WC_CHECK_RECORD")
|
||||
@Api("开线检查记录")
|
||||
public class MesWcCheckRecord extends BaseBean {
|
||||
|
||||
@Column(name = "WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心")
|
||||
private String workCenterCode;
|
||||
|
||||
@Column(name = "WORK_ORDER")
|
||||
@ApiParam("工单号")
|
||||
private String workOrder;
|
||||
|
||||
@Column(name = "PART_NO")
|
||||
@ApiParam("产品物料号")
|
||||
private String partNo;
|
||||
|
||||
@Column(name = "CHECK_TYPE")
|
||||
@ApiParam("检查类型")
|
||||
private String checkType;
|
||||
|
||||
@Column(name = "CHECK_OBJ")
|
||||
@ApiParam("检查对象")
|
||||
private String checkObj;
|
||||
|
||||
@Column(name = "CHECK_ITEM")
|
||||
@ApiParam("检查项")
|
||||
private String checkItem;
|
||||
|
||||
@Column(name = "STANDARD")
|
||||
@ApiParam("检查标准")
|
||||
private String standard;
|
||||
|
||||
@Column(name = "CHECK_RESULT")
|
||||
@ApiParam("检查结果")
|
||||
private String checkResult;
|
||||
|
||||
@Column(name = "CHECK_VALUE")
|
||||
@ApiParam("检查值")
|
||||
private String checkValue;
|
||||
|
||||
@Column(name = "REASON")
|
||||
@ApiParam("原因")
|
||||
private String reason;
|
||||
|
||||
@Column(name = "GROUP_CODE")
|
||||
@ApiParam("组名")
|
||||
private String groupCode;
|
||||
|
||||
@Column(name = "OVERALL_RESULT")
|
||||
@ApiParam("总体结果")
|
||||
private Integer overAllResult;
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 2:31 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_WC_EQUIPMENT")
|
||||
@Api("工作单元设备关系表")
|
||||
public class MesWcEquipment extends BaseBean {
|
||||
@Column(name="WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心代码")
|
||||
private String workCenterCode;
|
||||
|
||||
@Column(name="WORK_CELL_CODE")
|
||||
@ApiParam("工作单元代码")
|
||||
private String workCellCode;
|
||||
|
||||
@Column(name="EQU_CODE")
|
||||
@ApiParam("设备代码")
|
||||
private String equCode;
|
||||
|
||||
}
|
@ -0,0 +1,216 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.bean;
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Reference:
|
||||
* @Author: wangjie
|
||||
* @CreateDate:2019-09-19-17:36
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="MES_WORK_ORDER_LOG")
|
||||
@Api("生产工单日志")
|
||||
public class MesWorkOrderLog extends BaseBean {
|
||||
@Column(name="ORDER_NO")
|
||||
@ApiParam("工单号")
|
||||
private String orderNo;
|
||||
|
||||
@Column(name="PART_NO")
|
||||
@ApiParam("物料号")
|
||||
private String partNo;
|
||||
|
||||
@Column(name="PART_NAME_RDD")
|
||||
@ApiParam("物料名称")
|
||||
private String partNameRdd;
|
||||
|
||||
@Column(name="PROD_CFG_CODE")
|
||||
@ApiParam("产品配置代码")
|
||||
private String prodCfgCode;
|
||||
|
||||
@Column(name="QTY")
|
||||
@ApiParam("数量")
|
||||
private Double qty;
|
||||
|
||||
@Column(name="COMPLETE_QTY")
|
||||
@ApiParam("完成数量")
|
||||
private Double completeQty;
|
||||
|
||||
@Column(name="REPAIR_QTY")
|
||||
@ApiParam("返修数量")
|
||||
private Double repairQty;
|
||||
|
||||
@Column(name="SCRAP_QTY")
|
||||
@ApiParam("报废数量")
|
||||
private Double scrapQty;
|
||||
|
||||
@Column(name="SEQ")
|
||||
@ApiParam("工单序号")
|
||||
private Double seq;
|
||||
|
||||
@Column(name="WO_STATUS")
|
||||
@ApiParam("工单状态")
|
||||
private Integer workOrderStatus;
|
||||
|
||||
@Column(name="WO_TYPE")
|
||||
@ApiParam("工单类型")
|
||||
private Integer workOrderType;
|
||||
|
||||
@Column(name="NEXT_ORDER")
|
||||
@ApiParam("下一工单")
|
||||
private String nextOrder;
|
||||
|
||||
@Column(name="PLAN_ORDER_NO")
|
||||
@ApiParam("生产计划单号")
|
||||
private String planOrderNo;
|
||||
|
||||
@Column(name="WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心代码")
|
||||
private String workCenterCode;
|
||||
|
||||
@Column(name="AREA_CODE")
|
||||
@ApiParam("区域代码")
|
||||
private String areaCode;
|
||||
|
||||
@Column(name="WORK_CELL_CODE")
|
||||
@ApiParam("工作单元代码")
|
||||
private String workCellCode;
|
||||
|
||||
@Column(name="SCHEDULE_DATE")
|
||||
@ApiParam("排产日期")
|
||||
private String scheduleDate;
|
||||
|
||||
@Column(name="CUST_PROD_LINE_CODE")
|
||||
@ApiParam("客户产线代码")
|
||||
private String custProdLineCode;
|
||||
|
||||
@Column(name="SHIFT_CODE")
|
||||
@ApiParam("班次")
|
||||
private String shiftCode;
|
||||
|
||||
@Column(name="START_TIME")
|
||||
@ApiParam("开始时间")
|
||||
private String startTime;
|
||||
|
||||
@Column(name="END_TIME")
|
||||
@ApiParam("结束时间")
|
||||
private String endTime;
|
||||
|
||||
@Column(name="WO_SOURCE")
|
||||
@ApiParam("工单来源")
|
||||
private String workOrderSource;
|
||||
|
||||
@Column(name="MEMO")
|
||||
@ApiParam("备注")
|
||||
private String memo;
|
||||
|
||||
@Column(name="SHIFT_GROUP")
|
||||
@ApiParam("班组")
|
||||
private String shiftGroup;
|
||||
|
||||
@Column(name="APPROVAL_STATUS")
|
||||
@ApiParam("审批状态")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@Column(name="CUST_CODE")
|
||||
@ApiParam("客户代码")
|
||||
private String custCode;
|
||||
|
||||
@Column(name="CUST_ORDER_NO")
|
||||
@ApiParam("客户订单号")
|
||||
private String custOrderNo;
|
||||
|
||||
/********************** 冗余字段 *********************************/
|
||||
@Transient
|
||||
@ApiParam(value="工作中心名称")
|
||||
public String workCenterName;
|
||||
|
||||
@Transient
|
||||
@ApiParam(value="工作单元名称")
|
||||
public String workCellName;
|
||||
|
||||
@Transient
|
||||
@ApiParam(value="客户产线名称")
|
||||
public String custProdLineName;
|
||||
|
||||
@Transient
|
||||
@ApiParam(value="班次名称")
|
||||
public String shiftName;
|
||||
|
||||
@Transient
|
||||
@ApiParam(value="班组名称")
|
||||
public String shiftGroupName;
|
||||
|
||||
@Transient
|
||||
@ApiParam(value="产品配置名称")
|
||||
public String prodCfgName;
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="计划开始日期查询用,查询开始日期",example = "2018-12-31 23:59:59")
|
||||
public String startTimeStart;
|
||||
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="计划开始日期查询用,查询截至日期",example = "2018-12-31 23:59:59")
|
||||
public String startTimeEnd;
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="计划结束日期查询用,查询结束日期起始",example = "2018-12-31 23:59:59")
|
||||
public String endTimeStart;
|
||||
|
||||
@Transient
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiParam(value="计划结束日期查询用,查询结束日期截至",example = "2018-12-31 23:59:59")
|
||||
public String endTimeEnd;
|
||||
|
||||
public double getQtyVal() {
|
||||
return this.qty == null ? 0.0d : this.qty;
|
||||
}
|
||||
|
||||
public double getCompleteQtyVal() {
|
||||
return this.completeQty == null ? 0.0d : this.completeQty;
|
||||
}
|
||||
|
||||
public double getRepairQtyVal() {
|
||||
return this.repairQty == null ? 0.0d : this.repairQty;
|
||||
}
|
||||
|
||||
public double getScrapQtyVal() {
|
||||
return this.scrapQty == null ? 0.0d : this.scrapQty;
|
||||
}
|
||||
|
||||
public double getSeqVal() {
|
||||
return this.seq == null ? 0.0d : this.seq;
|
||||
}
|
||||
|
||||
public int getWorkOrderStatusVal() {
|
||||
return this.workOrderStatus == null ? 0 : this.workOrderStatus;
|
||||
}
|
||||
|
||||
public int getWorkOrderTypeVal() {
|
||||
return this.workOrderType == null ? 0 : this.workOrderType;
|
||||
}
|
||||
|
||||
public int getApprovalStatusVal() {
|
||||
return this.approvalStatus == null ? 0 : this.approvalStatus;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/8/23 11:42 AM
|
||||
* @Description:
|
||||
**/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Api("生成条码模型")
|
||||
public class GenSerialNoModel {
|
||||
|
||||
@ApiParam("规则代码")
|
||||
private String ruleCode;
|
||||
|
||||
@ApiParam("规则描述")
|
||||
private String ruleDesc;
|
||||
|
||||
@ApiParam("物料号")
|
||||
private String partNo;
|
||||
|
||||
@ApiParam("客户物料号")
|
||||
private String custPartNo;
|
||||
|
||||
@ApiParam("客户代码")
|
||||
private String custCode;
|
||||
|
||||
@ApiParam("产地")
|
||||
private String prodLocation;
|
||||
|
||||
@ApiParam("前缀")
|
||||
private String prefix;
|
||||
|
||||
@ApiParam("编码规则")
|
||||
private String numberRule;
|
||||
|
||||
@ApiParam("序号长度")
|
||||
private Integer serialnoLength;
|
||||
|
||||
@ApiParam("增量")
|
||||
private Integer serialnoIncrement;
|
||||
|
||||
@ApiParam("最大值后循环")
|
||||
private Integer isCycle;
|
||||
|
||||
@ApiParam("当前编号前缀")
|
||||
private String currentNumberPrefix;
|
||||
|
||||
@ApiParam("当前序号")
|
||||
private Integer currentSerialno;
|
||||
|
||||
@ApiParam("当前编号")
|
||||
private String currentNumber;
|
||||
|
||||
|
||||
public GenSerialNoModel(String ruleCode){
|
||||
this.ruleCode=ruleCode;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: wangjie
|
||||
* @CreateDate: 2019/8/21 9:19 AM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Api("mes生产工单页面按钮控制model")
|
||||
public class MesWorkOrderButtonModel implements Serializable {
|
||||
|
||||
@ApiParam("修改按钮")
|
||||
private boolean updateButton;
|
||||
|
||||
@ApiParam("启动按钮")
|
||||
private boolean startUpButton;
|
||||
|
||||
@ApiParam("暂停按钮")
|
||||
private boolean suspendButton;
|
||||
|
||||
@ApiParam("取消按钮")
|
||||
private boolean revokeButton;
|
||||
|
||||
@ApiParam("关闭按钮")
|
||||
private boolean closeButton;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.model;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesProcessBom;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/21 3:11 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Api("工序BOM model")
|
||||
public class ProcessBomModel extends MesProcessBom {
|
||||
|
||||
@ApiParam("上料数量")
|
||||
private Long cellFeedQty;
|
||||
|
||||
@ApiParam("是否上料数量满足")
|
||||
private Boolean isFeedSatisfied;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.model;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWcCheckRecord;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/23 8:06 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Api("开线管控model")
|
||||
public class WcCheckModel {
|
||||
|
||||
@ApiParam("人")
|
||||
private List<MesWcCheckRecord> people;
|
||||
@ApiParam("人 列")
|
||||
private Map<String, String> peopleColumn;
|
||||
|
||||
@ApiParam("机")
|
||||
private List<MesWcCheckRecord> equipments;
|
||||
@ApiParam("机 列")
|
||||
private Map<String, String> equipmentsColumn;
|
||||
|
||||
@ApiParam("物料")
|
||||
private List<MesWcCheckRecord> materials;
|
||||
@ApiParam("物料 列")
|
||||
private Map<String, String> materialsColumn;
|
||||
|
||||
@ApiParam("法")
|
||||
private List<MesWcCheckRecord> routes;
|
||||
@ApiParam("法 列")
|
||||
private Map<String, String> routesColumn;
|
||||
|
||||
@ApiParam("对象list和列关系")
|
||||
private Map<String, String> dataColumnRelation;
|
||||
|
||||
@ApiParam("开线信号")
|
||||
private Integer onlineSignal;
|
||||
|
||||
@ApiParam("是否通过")
|
||||
private Integer isPass;
|
||||
|
||||
@ApiParam("工作中心")
|
||||
private String workCenterCode;
|
||||
|
||||
@ApiParam("工单")
|
||||
private String workOrder;
|
||||
|
||||
@ApiParam("工单零件数量")
|
||||
private Long qty;
|
||||
|
||||
@ApiParam("产品号")
|
||||
private String partNo;
|
||||
|
||||
|
||||
public WcCheckModel initialWcCheckModel() {
|
||||
WcCheckModel wcCheckModel = new WcCheckModel();
|
||||
wcCheckModel.setPeople(new ArrayList<>());
|
||||
wcCheckModel.setEquipments(new ArrayList<>());
|
||||
wcCheckModel.setMaterials(new ArrayList<>());
|
||||
wcCheckModel.setRoutes(new ArrayList<>());
|
||||
wcCheckModel.setPeopleColumn(new HashMap<>());
|
||||
wcCheckModel.setEquipmentsColumn(new HashMap<>());
|
||||
wcCheckModel.setMaterialsColumn(new HashMap<>());
|
||||
wcCheckModel.setRoutesColumn(new HashMap<>());
|
||||
wcCheckModel.setOnlineSignal(MesPcnEnumUtil.ONLINE_SIGNAL.NON_CHECK.getValue());
|
||||
wcCheckModel.setIsPass(MesPcnEnumUtil.IS_WCCHECK_PASS.NON_PASS.getValue());
|
||||
|
||||
Map<String, String> dataColumnRelationMap = new HashMap<>();
|
||||
dataColumnRelationMap.put("people", "peopleColumn");
|
||||
dataColumnRelationMap.put("equipments", "equipmentsColumn");
|
||||
dataColumnRelationMap.put("materials", "materialsColumn");
|
||||
dataColumnRelationMap.put("routes", "routesColumn");
|
||||
wcCheckModel.setDataColumnRelation(dataColumnRelationMap);
|
||||
return wcCheckModel;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesCustProdLine;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Reference:
|
||||
* @Author: Crish
|
||||
* @CreateDate:2019-04-19-11:15
|
||||
* @Modify:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesCustProdLineRepository extends BaseRepository<MesCustProdLine, Long> {
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesCustomer;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Reference:
|
||||
* @Author: Crish
|
||||
* @CreateDate:2019-04-22-16:12
|
||||
* @Modify:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesCustomerRepository extends BaseRepository<MesCustomer, Long> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesNumberRule;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/8/23 1:22 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesNumberRuleRepository extends BaseRepository<MesNumberRule, Long> {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesNumberSerialno;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/8/23 1:23 PM
|
||||
* @Description:
|
||||
**/
|
||||
|
||||
@Repository
|
||||
public interface MesNumberSerialnoRepository extends BaseRepository<MesNumberSerialno, Long> {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPartCategory;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : jack.jia
|
||||
* @CreateDate : 2019-04-02
|
||||
* @Modify:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesPartCategoryRepository extends BaseRepository<MesPartCategory, Long> {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPlanOrder;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Reference:
|
||||
* @Author: Crish
|
||||
* @CreateDate:2019-04-17-17:08
|
||||
* @Modify:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesPlanOrderRepository extends BaseRepository<MesPlanOrder, Long> {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesProdCfg;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : jack.jia
|
||||
* @CreateDate : 2019-04-02
|
||||
* @Modify:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesProdCfgRepository extends BaseRepository<MesProdCfg, Long> {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesShiftGroup;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Reference:
|
||||
* @Author: wangjie
|
||||
* @CreateDate:2019-09-18-17:13
|
||||
* @Modify:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesShiftGroupRepository extends BaseRepository<MesShiftGroup, Long> {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWcCheckRecord;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/23 7:30 PM
|
||||
* @Description:
|
||||
**/
|
||||
public interface MesWcCheckRecordRepository extends BaseRepository<MesWcCheckRecord, Long> {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWcCheck;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/23 7:30 PM
|
||||
* @Description:
|
||||
**/
|
||||
public interface MesWcCheckRepository extends BaseRepository<MesWcCheck, Long> {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.estsh.i3plus.pojo.mes.pcn.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWorkOrderLog;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Reference:
|
||||
* @Author: wangjie
|
||||
* @CreateDate:2019-09-19-17:13
|
||||
* @Modify:
|
||||
**/
|
||||
@Repository
|
||||
public interface MesWorkOrderLogRepository extends BaseRepository<MesWorkOrderLog, Long> {
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package cn.estsh.i3plus.pojo.mes.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 7:17 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_DB")
|
||||
@Api("地址清单")
|
||||
public class MesDB extends BaseBean {
|
||||
|
||||
@Column(name = "DS_CODE")
|
||||
@ApiParam("数据源代码")
|
||||
private String dsCode;
|
||||
|
||||
@Column(name = "DS_NAME")
|
||||
@ApiParam("数据源名称")
|
||||
private String dsName;
|
||||
|
||||
@Column(name = "DS_TYPE")
|
||||
@ApiParam("数据源类型")
|
||||
private String dsType;
|
||||
|
||||
@Column(name = "DS_HOST")
|
||||
@ApiParam("主机")
|
||||
private String dsHost;
|
||||
|
||||
@Column(name = "DS_PORT")
|
||||
@ApiParam("端口")
|
||||
private Integer dsPort;
|
||||
|
||||
@Column(name = "DS_USER")
|
||||
@ApiParam("用户名")
|
||||
private String dsUser;
|
||||
|
||||
@Column(name = "DS_PASSWORD")
|
||||
@ApiParam("密码")
|
||||
private String dsPassword;
|
||||
|
||||
@Column(name = "EQU_CODE")
|
||||
@ApiParam("设备代码")
|
||||
private String equCode;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.estsh.i3plus.pojo.mes.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 7:12 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_DATA_OBJECT")
|
||||
@Api("数据对象")
|
||||
public class MesDataObject extends BaseBean {
|
||||
|
||||
@Column(name="OBJECT_CODE")
|
||||
@ApiParam("对象代码")
|
||||
private String objectCode;
|
||||
|
||||
|
||||
@Column(name="OBJECT_NAME")
|
||||
@ApiParam("对象名称")
|
||||
private String objectName;
|
||||
|
||||
@Column(name="DS_CODE")
|
||||
@ApiParam("数据源代码")
|
||||
private String dsCode;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.estsh.i3plus.pojo.mes.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 7:14 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_OBJECT_CFG")
|
||||
@Api("对象结构")
|
||||
public class MesObjectCfg extends BaseBean {
|
||||
|
||||
|
||||
@Column(name = "OBJECT_CODE")
|
||||
@ApiParam("对象代码")
|
||||
private String objectCode;
|
||||
|
||||
@Column(name = "FIELD_CODE")
|
||||
@ApiParam("字段代码")
|
||||
private String fieldCode;
|
||||
|
||||
@Column(name = "FIELD_NAME")
|
||||
@ApiParam("字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@Column(name = "FIELD_TYPE")
|
||||
@ApiParam("字段类型")
|
||||
private String fieldType;
|
||||
|
||||
@Column(name = "FIELD_LENGTH")
|
||||
@ApiParam("列长度")
|
||||
private String fieldLength;
|
||||
|
||||
@Column(name = "FIELD_PK")
|
||||
@ApiParam("主键标记")
|
||||
private String fieldPk;
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.estsh.i3plus.pojo.mes.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/21 1:45 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_WC_CHECK")
|
||||
@Api("开线检查")
|
||||
public class MesWcCheck extends BaseBean {
|
||||
|
||||
@Column(name="WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心")
|
||||
private String workCenterCode;
|
||||
|
||||
@Column(name="PART_NO")
|
||||
@ApiParam("产品物料号")
|
||||
private String partNo;
|
||||
|
||||
@Column(name="CHECK_TYPE")
|
||||
@ApiParam("检查类型")
|
||||
private String checkType;
|
||||
|
||||
@Column(name="CHECK_OBJ")
|
||||
@ApiParam("检查对象")
|
||||
private String checkObj;
|
||||
|
||||
@Column(name="CHECK_ITEM")
|
||||
@ApiParam("检查项")
|
||||
private String checkItem;
|
||||
|
||||
@Column(name="STANDARD")
|
||||
@ApiParam("检查标准")
|
||||
private String standard;
|
||||
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package cn.estsh.i3plus.pojo.mes.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/21 1:57 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_WC_CHECK_RECORD")
|
||||
@Api("开线检查记录")
|
||||
public class MesWcCheckRecord extends BaseBean {
|
||||
|
||||
@Column(name = "WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心")
|
||||
private String workCenterCode;
|
||||
|
||||
@Column(name = "WORK_ORDER")
|
||||
@ApiParam("工单号")
|
||||
private String workOrder;
|
||||
|
||||
@Column(name = "PART_NO")
|
||||
@ApiParam("产品物料号")
|
||||
private String partNo;
|
||||
|
||||
@Column(name = "CHECK_TYPE")
|
||||
@ApiParam("检查类型")
|
||||
private String checkType;
|
||||
|
||||
@Column(name = "CHECK_OBJ")
|
||||
@ApiParam("检查对象")
|
||||
private String checkObj;
|
||||
|
||||
@Column(name = "CHECK_ITEM")
|
||||
@ApiParam("检查项")
|
||||
private String checkItem;
|
||||
|
||||
@Column(name = "STANDARD")
|
||||
@ApiParam("检查标准")
|
||||
private String standard;
|
||||
|
||||
@Column(name = "CHECK_RESULT")
|
||||
@ApiParam("检查结果")
|
||||
private String checkResult;
|
||||
|
||||
@Column(name = "CHECK_VALUE")
|
||||
@ApiParam("检查值")
|
||||
private String checkValue;
|
||||
|
||||
@Column(name = "REASON")
|
||||
@ApiParam("原因")
|
||||
private String reason;
|
||||
|
||||
@Column(name = "GROUP_CODE")
|
||||
@ApiParam("组名")
|
||||
private String groupCode;
|
||||
|
||||
@Column(name = "OVERALL_RESULT")
|
||||
@ApiParam
|
||||
private Integer overAllResult;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.estsh.i3plus.pojo.mes.bean;
|
||||
|
||||
|
||||
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.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/24 2:31 PM
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_WC_EQUIPMENT")
|
||||
@Api("工作单元设备关系表")
|
||||
public class MesWcEquipment extends BaseBean {
|
||||
|
||||
@Column(name="WORK_CENTER_CODE")
|
||||
@ApiParam("工作中心代码")
|
||||
private String workCenterCode;
|
||||
|
||||
@Column(name="WORK_CELL_CODE")
|
||||
@ApiParam("工作单元代码")
|
||||
private String workCellCode;
|
||||
|
||||
@Column(name="EQU_CODE")
|
||||
@ApiParam("设备代码")
|
||||
private String equCode;
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package cn.estsh.i3plus.pojo.mes.repository;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesWcCheckRecord;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/23 7:30 PM
|
||||
* @Description:
|
||||
**/
|
||||
public interface MesWcCheckRecordRepository extends BaseRepository<MesWcCheckRecord, Long> {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package cn.estsh.i3plus.pojo.mes.repository;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesWcCheck;
|
||||
|
||||
/**
|
||||
* @Author: Wynne.Lu
|
||||
* @CreateDate: 2019/9/23 7:30 PM
|
||||
* @Description:
|
||||
**/
|
||||
public interface MesWcCheckRepository extends BaseRepository<MesWcCheck, Long> {
|
||||
}
|
Loading…
Reference in New Issue