Merge remote-tracking branch 'remotes/origin/dev'
commit
91677f3c13
@ -0,0 +1,74 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.wms.dbinterface;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
public class WmsInterfaceEnumUtil {
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum DIRECTION_TYPE {
|
||||||
|
SAP2WMS(10, "SAP2WMS", "SAP --> WMS"),
|
||||||
|
WMS2SAP(20, "WMS2SAP", "WMS --> SAP"),
|
||||||
|
MES2WMS(30, "MES2WMS", "MES --> WMS"),
|
||||||
|
WMS2MES(40, "WMS2MES", "WMS --> MES");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
DIRECTION_TYPE() {
|
||||||
|
}
|
||||||
|
|
||||||
|
DIRECTION_TYPE(int value, String name, String description) {
|
||||||
|
this.value = value;
|
||||||
|
this.name = name;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String valueOf(int val) {
|
||||||
|
String tmp = null;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
tmp = values()[i].getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int nameOf(String val) {
|
||||||
|
int tmp = -1;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].name.equals(val)) {
|
||||||
|
tmp = values()[i].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -1 不在范围内
|
||||||
|
* @param desc
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static int descOf(String desc) {
|
||||||
|
int tmp = -1;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].description.equals(desc)) {
|
||||||
|
tmp = values()[i].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.wms.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||||
|
import cn.estsh.i3plus.pojo.wms.bean.WmsCustomerPart;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 对象持久层仓用方法控制(客户零件号关系)
|
||||||
|
* @Reference :
|
||||||
|
* @Author : sky.meng
|
||||||
|
* @CreateDate : 2019-06-21 20:22
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public interface WmsCustomerPartRepository extends BaseRepository<WmsCustomerPart, Long> {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue