mes生产工单下达配置状态

yun-zuoyi
王杰 6 years ago
parent 0f82f3fbe5
commit d676bcf974

@ -12,6 +12,82 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_BUTTON_STATUS_JUDGE_FLAG {
EQUAL("=", "等于"),
NOT_EQUAL("!=", "不等于"),
GREATER_THAN(">", "大于"),
NOT_LESS_THAN(">=", "大于大于"),
LESS_THAN("<", "小于"),
NOT_GREATER_THAN("<=", "小于等于");
private String value;
private String description;
MES_BUTTON_STATUS_JUDGE_FLAG(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;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_BUTTON_STATUS_LOGIC_FLAG {
AND("&&", "逻辑与"),
OR("||", "逻辑或");
private String value;
private String description;
MES_BUTTON_STATUS_LOGIC_FLAG(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;
}
}
/**
* MesWorkOrderapprovalStatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -554,7 +630,7 @@ public class MesEnumUtil {
}
/**
* MesPlanOrdersource
* MesWorkOrdersource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_SOURCE {

@ -14,7 +14,7 @@ import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :mes
* @Description :mes
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-09-19
@ -25,26 +25,36 @@ import javax.persistence.Table;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_STATUS")
@Api("系统业务动作")
public class MesStatus extends BaseBean {
@Column(name="STATUS_CODE")
@ApiParam("状态代码")
private String statusCode;
@Table(name="MES_BUTTON_STATUS")
@Api("按钮状态配置表")
public class MesButtonStatus extends BaseBean {
@Column(name="STATUS_NAME")
@ApiParam("状态名称")
private String statusName;
@Column(name="BUTTON_CODE")
@ApiParam("按钮代码")
private String buttonCode;
@Column(name="STATUS_VALUE")
@ApiParam("状态值")
private Integer statusValue;
@Column(name="CLASS_NAME")
@ApiParam("实体类名称")
private String ClassName;
@Column(name="STATUS_FIELD")
@ApiParam("状态字段")
private String statusField;
public int getStatusValueVal() {
return this.statusValue == null ? 0 : this.statusValue;
}
@Column(name="JUDGE_FLAG")
@ApiParam("判断符合")
private String judgeFlag;
@Column(name="STATUS_VALUE")
@ApiParam("状态值")
private String statusValue;
@Column(name="LOGIC_FLAG")
@ApiParam("逻辑符合")
private String logicFlag;
@Column(name="STATUS_DESC")
@ApiParam("描述")
private String statusDesc;
}

@ -187,6 +187,10 @@ public class MesWorkOrder extends BaseBean {
@ApiParam("mes生产工单页面按钮控制")
private MesWorkOrderButtonModel workOrderButtonModel;
@Transient
@ApiParam(value="下达按钮编号")
public String buttonCode;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;

@ -0,0 +1,17 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesButtonStatus;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-09-23
* @Modify:
**/
@Repository
public interface MesButtonStatusRepository extends BaseRepository<MesButtonStatus, Long> {
}

@ -1215,4 +1215,19 @@ public class MesHqlPack {
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean);
return packBean;
}
/**
*
*
* @param organizeCode
* @return
*/
public static DdlPackBean getMesButtonStatus(MesButtonStatus buttonStatus, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(buttonStatus, organizeCode);
if (StringUtils.isNotEmpty(buttonStatus.getButtonCode())) {
DdlPreparedPack.getStringLikerPack(buttonStatus.getButtonCode(), "buttonCode", packBean);
}
packBean.setOrderByStr(buttonStatus.orderBy());
return packBean;
}
}

Loading…
Cancel
Save