816 add method

yun-zuoyi
WYnneaoapc 6 years ago
parent 0f99cb1027
commit ecba29948f

@ -316,7 +316,8 @@ public class MesEnumUtil {
NORMAL(10, "正常"), NORMAL(10, "正常"),
ONLINE(20, "已上线"), ONLINE(20, "已上线"),
OFFLINE(30, "已下线"), OFFLINE(30, "已下线"),
CLOSE(40,"已关闭"),; CLOSE(40, "已关闭"),
;
private int value; private int value;
private String description; private String description;
@ -392,7 +393,8 @@ public class MesEnumUtil {
OFFLINE(30, "下线"), OFFLINE(30, "下线"),
INSTOCKED(40, "入库"), INSTOCKED(40, "入库"),
SHIPING(50, "发运"), SHIPING(50, "发运"),
CLOSE(90,"关闭"),; CLOSE(90, "关闭"),
;
private int value; private int value;
private String description; private String description;
@ -645,6 +647,7 @@ public class MesEnumUtil {
return tmp; return tmp;
} }
} }
/** /**
* *
*/ */
@ -710,4 +713,80 @@ public class MesEnumUtil {
return description; return description;
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ACTION_TYPE {
SEATS(10, "座椅"),
METAL(20, "金属件"),
FOAMING(30, "发泡");
private int value;
private String description;
ACTION_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum EVENT_TYPE {
SEATS(10, "座椅"),
METAL(20, "金属件"),
FOAMING(30, "发泡");
private int value;
private String description;
EVENT_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return 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;
}
}
} }

@ -42,7 +42,7 @@ public class MesStepParam extends BaseBean {
@Column(name = "PARAM_NAME") @Column(name = "PARAM_NAME")
@ApiParam("参数名称") @ApiParam("参数名称")
private String paramName; private String paramName;
//text select
@Column(name = "PARAM_ATTRIBUTE") @Column(name = "PARAM_ATTRIBUTE")
@ApiParam("参数属性") @ApiParam("参数属性")
private String paramAttribute; private String paramAttribute;

@ -16,7 +16,4 @@ import java.util.List;
@Repository @Repository
public interface MesActionRepository extends BaseRepository<MesAction, Long> { public interface MesActionRepository extends BaseRepository<MesAction, Long> {
List<MesAction> findByOrganizeCodeAndIsDeleted(String organizeCode,Integer isDeleted);
List<MesAction> findByActionCodeAndIsValidAndIsDeleted(String actionCode,Integer isValid,Integer isDeleted);
} }

@ -16,10 +16,4 @@ import java.util.List;
@Repository @Repository
public interface MesEventRepository extends BaseRepository<MesEvent, Long> { public interface MesEventRepository extends BaseRepository<MesEvent, Long> {
List<MesEvent> findByOrganizeCodeAndIsDeleted(String organizeCode,Integer isDeleted);
List<MesEvent> findByButtonCodeAndIsValidAndIsDeleted(String buttonCode,Integer isValid,Integer isDeleted);
List<MesEvent> findByEventCodeAndIsValidAndIsDeleted(String eventCode,Integer isValid,Integer isDeleted);
} }

@ -474,6 +474,26 @@ public class MesHqlPack {
return packBean; return packBean;
} }
public static DdlPackBean getMesEventByButtonCode(String buttonCode,String org){
DdlPackBean packBean=getAllBaseData(org);
DdlPreparedPack.getStringEqualPack(buttonCode,"buttonCode",packBean);
DdlPreparedPack.getStringEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue()+"","isValid",packBean);
return packBean;
}
public static DdlPackBean getMesEventByEventCode(String eventCode,String org){
DdlPackBean packBean=getAllBaseData(org);
DdlPreparedPack.getStringEqualPack(eventCode,"eventCode",packBean);
DdlPreparedPack.getStringEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue()+"","isValid",packBean);
return packBean;
}
public static DdlPackBean getMesActionByActionCode(MesAction mesAction,String organizeCode){
DdlPackBean packBean=getAllBaseDataByNormalPro(mesAction,organizeCode);
DdlPreparedPack.getStringEqualPack(mesAction.getActionCode(),"actionCode",packBean);
return packBean;
}
/** /**
* *
* *
@ -521,6 +541,13 @@ public class MesHqlPack {
return packBean; return packBean;
} }
public static DdlPackBean getMesMethodByMethodCode(MesMethod mesMethod, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesMethod, organizeCode);
if (StringUtils.isNotEmpty(mesMethod.getMethodCode())) {
DdlPreparedPack.getStringEqualPack(mesMethod.getMethodCode(), "methodCode", packBean);
}
return packBean;
}
/** /**
* *
* *

Loading…
Cancel
Save