yun-zuoyi
alwaysfrin 6 years ago
commit 65b5ac3803

@ -10,10 +10,7 @@ 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;
import javax.persistence.*;
/**
* @Description :
@ -24,7 +21,16 @@ import javax.persistence.Transient;
**/
@Data
@Entity
@Table(name="ANDON_MANAGE_QUEUE")
@Table(name="ANDON_MANAGE_QUEUE", indexes = {
@Index(columnList = "WORK_CENTER_CODE", name = "ANDON_INDEX_WORK_CENTER_CODE"),
@Index(columnList = "WORK_CELL_CODE", name = "ANDON_INDEX_WORK_CELL_CODE"),
@Index(columnList = "ORGANIZE_CODE", name = "ANDON_INDEX_ORGANIZE_CODE"),
@Index(columnList = "ANDON_ORDER_NO", name = "ANDON_INDEX_ANDON_ORDER_NO"),
@Index(columnList = "ALARM_CODE", name = "ANDON_INDEX_ALARM_CODE"),
@Index(columnList = "STATUS_CODE", name = "ANDON_INDEX_STATUS_CODE"),
@Index(columnList = "ACTION_CODE", name = "ANDON_INDEX_ACTION_CODE"),
@Index(columnList = "EQUIPMENT_CODE", name = "ANDON_INDEX_EQUIPMENT_CODE")
})
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@ -87,76 +93,67 @@ public class AndonManageQueue extends BaseBean {
@ApiParam(value = "优先级别", example = "1")
private Integer priorityLevel;
@Column(name="CALL_TIME",updatable = false)
@Column(name="CALL_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "呼叫时间")
@ApiParam(value="呼叫时间",example = "2018-01-01 01:00:00")
@AnnoOutputColumn(hidden = true)
public String callTime;
@Transient
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="呼叫时间,查询开始时间")
@ApiParam(value="呼叫时间,查询开始时间", example = "2018-01-01 01:00:00")
public String callTimeStart;
@Transient
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="呼叫时间,查询结束时间")
@ApiParam(value="呼叫时间,查询结束时间", example = "2018-01-01 01:00:00")
public String callTimeEnd;
@Transient
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="呼叫时间",example = "2018-01-01 01:00:00")
@AnnoOutputColumn(hidden = true)
public String callTimeStr;
@Column(name="CONFIRM_TIME",updatable = false)
@ApiParam(value = "响应时间")
@Column(name="CONFIRM_TIME")
@ApiParam(value = "响应时间", example = "2018-01-01 01:00:00")
@AnnoOutputColumn(hidden = true)
public String confirmTime;
@Transient
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="响应时间",example = "2018-01-01 01:00:00")
@AnnoOutputColumn(hidden = true)
public String confirmTimeStr;
@Column(name="RESET_TIME",updatable = false)
@ApiParam(value = "解决时间")
@AnnoOutputColumn(hidden = true)
public String resetTime;
@Transient
@Column(name="RESET_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="解决时间",example = "2018-01-01 01:00:00")
@AnnoOutputColumn(hidden = true)
public String resetTimeStr;
public String resetTime;
@Column(name = "CALL_USER")
@ApiParam(value = "呼叫人")
private String callUser;
@Transient
@ApiParam(value = "呼叫人名字")
private String callUserName;
@Column(name = "CONFIRM_USER")
@ApiParam(value = "响应人")
private String confirmUser;
@Transient
@ApiParam(value = "响应人名字")
private String confirmUserName;
@Column(name = "RESET_USER")
@ApiParam(value = "解决人")
private String resetUser;
@Transient
@ApiParam(value = "解决人名字")
private String resetUserName;
@Column(name = "IS_SHIFT_CALL")
@ApiParam(value = "是否转呼", example = "1")
private Integer isShiftCall;
@Column(name="SHIFT_CALL_TIME",updatable = false)
@ApiParam(value = "转呼时间")
@AnnoOutputColumn(hidden = true)
public String shiftCallTime;
@Transient
@Column(name="SHIFT_CALL_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="转呼时间",example = "2018-01-01 01:00:00")
@AnnoOutputColumn(hidden = true)
public String shiftCallTimeStr;
public String shiftCallTime;
@Column(name = "RP_OBJECT_CODE")
@ApiParam(value = "转呼对象代码")
@ -164,7 +161,7 @@ public class AndonManageQueue extends BaseBean {
@Column(name = "SC_RESPONSE_CODE")
@ApiParam(value = "转呼响应方式")
private String scObjectCode;
private String scResponseCode;
@Column(name = "SC_RP_LEVEL")
@ApiParam(value = "转呼通知等级")
@ -226,6 +223,26 @@ public class AndonManageQueue extends BaseBean {
@ApiParam(value = "响应时长", example = "0")
private Long signTime;
@Transient
@ApiParam(value = "ANDON次数用于报表统计", example = "0")
private Integer andonCount;
@Transient
@ApiParam(value = "平均响应时长", example = "0")
private Long avgSignTime;
@Transient
@ApiParam(value = "平均解决时长", example = "0")
private Long avgResolveTime;
@Transient
@ApiParam(value = "比例", example = "0")
private Double proportion;
@Column(name = "SEND_FLAG")
@ApiParam(value = "发送标志")
private String sendFlag;
// 是否转呼
public Integer getIsShiftCall() {
return this.isShiftCall == null ? 0 : this.isShiftCall;

@ -10,10 +10,7 @@ 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;
import javax.persistence.*;
/**
* @Description :
@ -24,7 +21,16 @@ import javax.persistence.Transient;
**/
@Data
@Entity
@Table(name="ANDON_MANAGE_RECORD")
@Table(name="ANDON_MANAGE_RECORD", indexes = {
@Index(columnList = "WORK_CENTER_CODE", name = "ANDON_INDEX_WORK_CENTER_CODE"),
@Index(columnList = "WORK_CELL_CODE", name = "ANDON_INDEX_WORK_CELL_CODE"),
@Index(columnList = "ORGANIZE_CODE", name = "ANDON_INDEX_ORGANIZE_CODE"),
@Index(columnList = "ANDON_ORDER_NO", name = "ANDON_INDEX_ANDON_ORDER_NO"),
@Index(columnList = "ALARM_CODE", name = "ANDON_INDEX_ALARM_CODE"),
@Index(columnList = "STATUS_CODE", name = "ANDON_INDEX_STATUS_CODE"),
@Index(columnList = "ACTION_CODE", name = "ANDON_INDEX_ACTION_CODE"),
@Index(columnList = "EQUIPMENT_CODE", name = "ANDON_INDEX_EQUIPMENT_CODE")
})
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@ -153,7 +159,7 @@ public class AndonManageRecord extends BaseBean {
@Column(name = "SC_RESPONSE_CODE")
@ApiParam(value = "转呼响应方式")
private String scObjectCode;
private String scResponseCode;
@Column(name = "SC_RP_LEVEL")
@ApiParam(value = "转呼通知等级")

@ -10,6 +10,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
/**
@ -21,7 +22,14 @@ import javax.persistence.Table;
**/
@Data
@Entity
@Table(name="ANDON_PLC_RECORD")
@Table(name="ANDON_PLC_RECORD", indexes = {
@Index(columnList = "WORK_CENTER_CODE", name = "ANDON_INDEX_WORK_CENTER_CODE"),
@Index(columnList = "WORK_CELL_CODE", name = "ANDON_INDEX_WORK_CELL_CODE"),
@Index(columnList = "ORGANIZE_CODE", name = "ANDON_INDEX_ORGANIZE_CODE"),
@Index(columnList = "CHANNEL_NAME", name = "ANDON_INDEX_CHANNEL_NAME"),
@Index(columnList = "TAG_ADDRESS", name = "ANDON_INDEX_TAG_ADDRESS"),
@Index(columnList = "GROUP_NO", name = "ANDON_INDEX_GROUP_NO")
})
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)

@ -3,6 +3,7 @@ package cn.estsh.i3plus.pojo.andon.sqlpack;
import cn.estsh.i3plus.pojo.andon.bean.*;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.AndonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import org.apache.commons.lang3.StringUtils;
@ -306,4 +307,22 @@ public class AndonHqlPack {
return packBean;
}
/**
*
* @param responseCfg
* @return
*/
public static DdlPackBean packAndonAlarmResponseCfg(AndonAlarmResponseCfg responseCfg) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(responseCfg.getAlarmCode(), "alarmCode", result);
DdlPreparedPack.getStringEqualPack(responseCfg.getAndonStatus(), "andonStatus", result);
DdlPreparedPack.getNumNOEqualPack(String.valueOf(AndonEnumUtil.ALARM_PRIORITY.FIRST.getValue()),
"rpLevel", result);
getStringBuilderPack(responseCfg, result);
return result;
}
}

@ -83,7 +83,7 @@ public class AndonEnumUtil {
public enum ALARM_FLAG{
CALL(1,"10","呼叫"),
SIGN(2,"20","签到"),
SIGN(2,"20","响应"),
RESOLVE(3,"30","解决"),
CANCEL(4,"40", "撤销");

@ -608,5 +608,40 @@ public class MesEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum STEP_PARAM_TYPE{
QUALIFIED(10,"数字"),
DEFECTED(20,"字符串"),
SCRAPED(30,"可选值");
private int value;
private String description;
STEP_PARAM_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;
}
}
}

@ -0,0 +1,63 @@
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 : crish
* @CreateDate : 2019-05-15
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_KP_DATA")
@Api("生产区域")
public class MesKpData extends BaseBean {
@Column(name="PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name="KEY_DATA_CODE")
@ApiParam("关键数据代码")
private String keyDataCode;
@Column(name="KEY_DATA_NAME")
@ApiParam("关键数据名称")
private String keyDataName;
@Column(name="KEY_DATA_COUNT")
@ApiParam("关键数据数量")
private Integer keyDataCount;
@Column(name="UPPER_LIMIT")
@ApiParam("数据上限")
private Double upperLimit;
@Column(name="LOWER_LIMIT")
@ApiParam("数据下限")
private Double lowerLimit;
@Transient
@ApiParam("扭矩值")
private Double torqueValue;
@Transient
@ApiParam("是否在范围之内")
private Boolean ok;
}

@ -0,0 +1,59 @@
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 :PLC
* @Reference :
* @Author : Crish
* @CreateDate : 2019-05-17
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_PLC_CONFIGURE")
@Api("PLC设备信息配置表")
public class MesPLCConfigure extends BaseBean {
@Column(name="IP")
@ApiParam("设备ip")
private String ipAddress;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String channelName;
@Column(name="AREA_NAME")
@ApiParam("区域名称")
private String deviceName;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String tagName;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元")
private String workCellCode;
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String areaCode;
}

@ -13,6 +13,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -54,6 +55,15 @@ public class MesProcessBom extends BaseBean {
@ApiParam(value = "是否检查")
private Integer isCheck;
@Transient
@ApiParam("是否已绑定")
private boolean isBind;
@Transient
@ApiParam("显示颜色")
private String color;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -0,0 +1,83 @@
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.ColumnDefault;
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_BIND_RECORD")
@Api("产品绑定记录表")
public class MesProdBindRecord extends BaseBean {
@Column(name = "SERIAL_NUMBER")
@ApiParam(value = "产品条码")
private String serialNumber;
@Column(name="PART_NO")
@ApiParam("产品条码零件号")
private String partNo;
@Column(name="WORK_ORDER")
@ApiParam("工单号")
private String workOrder;
@Column(name = "WORK_CENTER_CODE")
@ApiParam(value = "工作中心")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam(value = "工作单元")
private String workCellCode;
@Column(name = "STEP_CODE")
@ApiParam(value = "工步代码")
private String stepCode;
@Column(name="ITEM_PART_NO")
@ApiParam("原材料零件号")
private String itemPartNo;
@Column(name="KP_SN")
@ApiParam("原材料条码")
private String kpSn;
@Column(name = "KP_QTY")
@ColumnDefault("0")
@ApiParam(value = "原材料数量", example = "0")
private Double kpQty;
@Column(name="SUPPLIER_CODE")
@ApiParam("供应商")
private String supplierCode;
@Column(name="VERSION")
@ApiParam("版本")
private String version;
@Column(name = "RESULT")
@ApiParam(value = "结果")
private String result;
public double getQtyVal() {
return this.kpQty == null ? 0.0d : this.kpQty;
}
}

@ -11,6 +11,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description:
@ -104,6 +105,10 @@ public class MesProduceSn extends BaseBean {
@ApiParam("包装条码")
private String packageSn;
@Transient
@ApiParam("返回信息")
private String resultMsg;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -0,0 +1,82 @@
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 : Crish
* @CreateDate : 2019-05-17
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_TORQUE_DETAIL")
@Api("扭矩信息记录表")
public class MesTorqueDetail extends BaseBean {
@Column(name="SN")
@ApiParam("过程条码")
private String serialNumber;
@Column(name="UPPER_LIMIT")
@ApiParam("最大值")
private Double upperLimit;
@Column(name="LOWER_LIMIT")
@ApiParam("最小值")
private Double lowerLimit;
@Column(name="TORQUE_DETAIL_VALUE")
@ApiParam("扭矩值")
private Double torqueValue;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元")
private String workCellCode;
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String areaCode;
@Column(name="ok")
@ApiParam("扭矩是否合格")
private String ok;
@Column(name="PART_NO")
@ApiParam("扭矩是否合格")
private String partNO;
@Column(name="p_set")
@ApiParam("螺丝枪PSET设置值")
private String deviceSetValue;
@Column(name="MAXANGLE")
@ApiParam("最大扭矩")
private String maxAngle;
@Column(name="MINANGLE")
@ApiParam("最小扭矩")
private String minAngel;
@Column(name="FINALANGLE")
@ApiParam("最终扭矩")
private Integer finalAngle;
}

@ -49,6 +49,9 @@ public class StationRequestBean implements Serializable {
@ApiParam("按钮编号")
private String buttonCode;
@ApiParam("工步代码")
private String stepCode;
/**
* doScan-doModule-,initModule-
*/

@ -0,0 +1,66 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class StepModel implements Serializable {
@ApiParam("工步代码")
private String stepCode;
@ApiParam("工步名称")
private String stepName;
@ApiParam("工步描述")
private String stepText;
@ApiParam("工步类型")
private String stepType;
@ApiParam("工步对象")
private String stepObject;
/**
* 使
*/
@ApiParam("流程代码")
private String routeCode;
/**
* 使
*/
@ApiParam("工序代码")
private String processCode;
/**
* 使
*/
@ApiParam("工步顺序")
private Integer stepSeq;
/**
* 使
*/
@ApiParam("工步执行完毕")
private boolean isComplete;
/**
* 使
*/
@ApiParam("工步是否跳过")
private boolean isJump;
public StepModel(String stepCode,String stepName,String stepText,String stepType,String stepObject,
String routeCode,String processCode,Integer stepSeq){
this.stepCode = stepCode;
this.stepName = stepName;
this.stepText = stepText;
this.stepType = stepType;
this.stepObject = stepObject;
this.routeCode = routeCode;
this.processCode = processCode;
this.stepSeq = stepSeq;
}
}

@ -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.MesArea;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesKpData;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : crish
* @CreateDate : 2019-05-15
* @Modify:
**/
@Repository
public interface MesKpDataRepository extends BaseRepository<MesKpData, 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.MesArea;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesPLCConfigureRepository extends BaseRepository<MesPLCConfigureRepository, 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.MesProdBindRecord;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesProdBindRecordRepository extends BaseRepository<MesProdBindRecord, 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.MesArea;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesTorqueDetail;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesTorqueDetailRepository extends BaseRepository<MesTorqueDetail, Long> {
}

@ -0,0 +1,84 @@
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.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;
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_BIND_RECORD")
@Api("产品绑定记录表")
public class MesProdBindRecord extends BaseBean {
@Column(name = "SERIAL_NUMBER")
@ApiParam(value = "产品条码")
private String serialNumber;
@Column(name="PART_NO")
@ApiParam("产品条码零件号")
private String partNo;
@Column(name="WORK_ORDER")
@ApiParam("工单号")
private String workOrder;
@Column(name = "WORK_CENTER_CODE")
@ApiParam(value = "工作中心")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam(value = "工作单元")
private String workCellCode;
@Column(name = "STEP_CODE")
@ApiParam(value = "工步代码")
private String stepCode;
@Column(name="ITEM_PART_NO")
@ApiParam("原材料零件号")
private String itemPartNo;
@Column(name="KP_SN")
@ApiParam("原材料条码")
private String kpSn;
@Column(name = "KP_QTY")
@ColumnDefault("0")
@ApiParam(value = "原材料数量", example = "0")
private Double kpQty;
@Column(name="SUPPLIER_CODE")
@ApiParam("供应商")
private String supplierCode;
@Column(name="VERSION")
@ApiParam("版本")
private String version;
@Column(name = "RESULT")
@ApiParam(value = "结果")
private String result;
public double getQtyVal() {
return this.kpQty == null ? 0.0d : this.kpQty;
}
}

@ -11,6 +11,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -51,10 +52,19 @@ public class MesProdRouteOptParam extends BaseBean {
@ApiParam("工步参数代码")
private String paramCode;
@Column(name = "PARAM_TYPE")
@ApiParam("工步参数类型")
private Integer paramType;
@Column(name = "PARAM_VALUE")
@ApiParam("工步参数值")
private String paramValue;
@Transient
@Column(name = "PARAM_ATTRIBUTE")
@ApiParam("参数属性")
private String paramAttribute;
public long getProdRouteCfgIdVal() {
return this.prodRouteCfgId == null ? 0l : this.prodRouteCfgId;
}
@ -62,4 +72,8 @@ public class MesProdRouteOptParam extends BaseBean {
public int getStepSeq() {
return this.stepSeq == null ? 0 : this.stepSeq;
}
public int getParamTypeVal() {
return this.paramType == null ? 0 : this.paramType;
}
}

@ -34,4 +34,8 @@ public class MesRoute extends BaseBean {
@Column(name = "ROUTE_NAME")
@ApiParam("流程名称")
private String routeName;
@Column(name = "POSITION")
@ApiParam("GOJS位置")
private String position;
}

@ -38,4 +38,9 @@ public class MesRouteProcessCell extends BaseBean {
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
}

@ -11,6 +11,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
@ -39,19 +40,32 @@ public class MesRouteProcessStep extends BaseBean {
@ApiParam("工步代码")
private String stepCode;
@Column(name = "STEP_SEQ")
@ApiParam("工步顺序")
private Integer stepSeq;
@Column(name = "SEQ")
@ApiParam("顺序")
private Integer seq;
@Column(name = "PARAM_CODE")
@ApiParam("工步参数代码")
private String paramCode;
@Column(name = "PARAM_TYPE")
@ApiParam("工步参数类型")
private Integer paramType;
@Column(name = "PARAM_VALUE")
@ApiParam("工步参数值")
private String paramValue;
@Transient
@Column(name = "PARAM_ATTRIBUTE")
@ApiParam("参数属性")
private String paramAttribute;
public int getStepSeqVal() {
return this.stepSeq == null ? 0 : this.stepSeq;
return this.seq == null ? 0 : this.seq;
}
public int getParamTypeVal() {
return this.paramType == null ? 0 : this.paramType;
}
}

@ -31,6 +31,10 @@ public class MesStepParam extends BaseBean {
@ApiParam("工步代码")
private String stepCode;
@Column(name = "PARAM_TYPE")
@ApiParam("参数类型")
private Integer paramType;
@Column(name = "PARAM_CODE")
@ApiParam("参数代码")
private String paramCode;

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesProdBindRecord;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesProdBindRecordRepository extends BaseRepository<MesProdBindRecord, Long> {
}

@ -19,6 +19,7 @@ public class MesHqlPack {
/**
*
*
* @param organizeCode
* @return
*/
@ -32,6 +33,7 @@ public class MesHqlPack {
/**
*
*
* @param mesPlanOrder
* @return
*/
@ -72,13 +74,14 @@ public class MesHqlPack {
"createDatetime", packBean, true);
// 排序
DdlPreparedPack.getOrderDefault(mesPlanOrder);
DdlPreparedPack.getOrderByPack(new Object[]{"2"},new String[]{mesPlanOrder.getOrderByParam()} , packBean);
DdlPreparedPack.getOrderDefault(mesPlanOrder);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{mesPlanOrder.getOrderByParam()}, packBean);
return packBean;
}
/**
*
*
* @param mesPart
* @return
*/
@ -105,12 +108,13 @@ public class MesHqlPack {
}
DdlPreparedPack.getOrderDefault(mesPart);
DdlPreparedPack.getOrderByPack(new Object[]{"2"},new String[]{mesPart.getOrderByParam()} , packBean);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{mesPart.getOrderByParam()}, packBean);
return packBean;
}
/**
*
*
* @param mesWorkOrder
* @return
*/
@ -151,12 +155,13 @@ public class MesHqlPack {
// mesWorkOrder.getEndTimeEnd(),
// "endTime", packBean, true);
DdlPreparedPack.getOrderDefault(mesWorkOrder);
DdlPreparedPack.getOrderByPack(new Object[]{"2"},new String[]{mesWorkOrder.getOrderByParam()} , packBean);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{mesWorkOrder.getOrderByParam()}, packBean);
return packBean;
}
/**
*
*
* @param mesQueueOrder
* @return
*/
@ -185,12 +190,13 @@ public class MesHqlPack {
// DdlPreparedPack.getOrderDefault(mesQueueOrder);
// 按照队列序列号倒序
DdlPreparedPack.getOrderByPack(new Object[]{"2"},new String[]{"seq"} , packBean);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{"seq"}, packBean);
return packBean;
}
/**
*
*
* @param organizeCode
* @return
*/
@ -204,6 +210,7 @@ public class MesHqlPack {
/**
* MES
*
* @param mesArea
* @return
*/
@ -218,6 +225,7 @@ public class MesHqlPack {
/**
* MES
*
* @param mesWorkCenter
* @return
*/
@ -226,7 +234,7 @@ public class MesHqlPack {
if (StringUtils.isNotEmpty(mesWorkCenter.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCenter.getWorkCenterCode(), "workCenterCode", packBean);
}
if (StringUtils.isNotEmpty(mesWorkCenter.getAreaCode())){
if (StringUtils.isNotEmpty(mesWorkCenter.getAreaCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCenter.getAreaCode(), "areaCode", packBean);
}
@ -235,6 +243,7 @@ public class MesHqlPack {
/**
* MES
*
* @param mesWorkCell
* @return
*/
@ -243,10 +252,10 @@ public class MesHqlPack {
if (StringUtils.isNotEmpty(mesWorkCell.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCell.getWorkCenterCode(), "workCenterCode", packBean);
}
if (StringUtils.isNotEmpty(mesWorkCell.getAreaCode())){
if (StringUtils.isNotEmpty(mesWorkCell.getAreaCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCell.getAreaCode(), "areaCode", packBean);
}
if (StringUtils.isNotEmpty(mesWorkCell.getWorkCellCode())){
if (StringUtils.isNotEmpty(mesWorkCell.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkCell.getWorkCellCode(), "workCellCode", packBean);
}
@ -271,6 +280,34 @@ public class MesHqlPack {
}
/**
*
*
* @param mesRoute
* @return
*/
public static DdlPackBean packHqlMesRoute(MesRoute mesRoute, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesRoute, organizeCode);
DdlPreparedPack.getStringLikerPack(mesRoute.getRouteCode(), "routeCode", packBean);
DdlPreparedPack.getStringLikerPack(mesRoute.getRouteName(), "routeName", packBean);
packBean.setOrderByStr(mesRoute.orderBy());
return packBean;
}
/**
*
*
* @param mesProdRouteCfg
* @param organizeCode
* @return
*/
public static DdlPackBean packHqlMesProdRouteCfg(MesProdRouteCfg mesProdRouteCfg, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesProdRouteCfg, organizeCode);
DdlPreparedPack.getStringEqualPack(mesProdRouteCfg.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(mesProdRouteCfg.getWorkCenterCode(), "workCenterCode", packBean);
packBean.setOrderByStr(mesProdRouteCfg.orderBy());
return packBean;
}
/**
* MES
* @param shift
* @return
@ -281,7 +318,7 @@ public class MesHqlPack {
DdlPreparedPack.getStringEqualPack(shift.getShiftCode(), "shiftCode", packBean);
}
if (StringUtils.isNotEmpty(shift.getShiftName())){
DdlPreparedPack.getStringEqualPack(shift.getShiftName(), "shiftName", packBean);
DdlPreparedPack.getStringLikerPack(shift.getShiftName(), "shiftName", packBean);
}
if (StringUtils.isNotEmpty(shift.getWorkCenterCode())){
DdlPreparedPack.getStringEqualPack(shift.getWorkCenterCode(), "workCenterCode", packBean);
@ -289,4 +326,81 @@ public class MesHqlPack {
return packBean;
}
/**
* MES
* @param process
* @return
*/
public static DdlPackBean getMesProcess(MesProcess process, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(process, organizeCode);
if (StringUtils.isNotEmpty(process.getProcessCode())){
DdlPreparedPack.getStringEqualPack(process.getProcessCode(), "processCode", packBean);
}
if (StringUtils.isNotEmpty(process.getProcessName())){
DdlPreparedPack.getStringLikerPack(process.getProcessName(), "processName", packBean);
}
return packBean;
}
/**
* MES
* @param step
* @return
*/
public static DdlPackBean getMesStep(MesStep step, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(step, organizeCode);
if (StringUtils.isNotEmpty(step.getStepCode())){
DdlPreparedPack.getStringEqualPack(step.getStepCode(), "stepCode", packBean);
}
if (StringUtils.isNotEmpty(step.getStepName())){
DdlPreparedPack.getStringLikerPack(step.getStepName(), "stepName", packBean);
}
return packBean;
}
/**
* MES
* @param stepParam
* @return
*/
public static DdlPackBean getMesStepParam(MesStepParam stepParam, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(stepParam, organizeCode);
if (StringUtils.isNotEmpty(stepParam.getStepCode())){
DdlPreparedPack.getStringEqualPack(stepParam.getStepCode(), "stepCode", packBean);
}
if (StringUtils.isNotEmpty(stepParam.getParamCode())){
DdlPreparedPack.getStringEqualPack(stepParam.getParamCode(), "paramCode", packBean);
}
if (StringUtils.isNotEmpty(stepParam.getParamName())){
DdlPreparedPack.getStringLikerPack(stepParam.getParamName(), "paramName", packBean);
}
return packBean;
}
/**
* MES
* @param routeProcessCell
* @return
*/
public static DdlPackBean getMesRouteProcessCell(MesRouteProcessCell routeProcessCell, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(routeProcessCell, organizeCode);
if (StringUtils.isNotEmpty(routeProcessCell.getRouteCode())){
DdlPreparedPack.getStringEqualPack(routeProcessCell.getRouteCode(), "routeCode", packBean);
}
if (StringUtils.isNotEmpty(routeProcessCell.getProcessCode())){
DdlPreparedPack.getStringEqualPack(routeProcessCell.getProcessCode(), "processCode", packBean);
}
if (StringUtils.isNotEmpty(routeProcessCell.getWorkCellCode())){
DdlPreparedPack.getStringEqualPack(routeProcessCell.getWorkCellCode(), "workCellCode", packBean);
}
if (StringUtils.isNotEmpty(routeProcessCell.getWorkCenterCode())){
DdlPreparedPack.getStringEqualPack(routeProcessCell.getWorkCenterCode(), "workCenterCode", packBean);
}
return packBean;
}
}

@ -0,0 +1,30 @@
package cn.estsh.i3plus.pojo.model.mes;
import cn.estsh.i3plus.pojo.mes.bean.MesRouteProcess;
import cn.estsh.i3plus.pojo.model.wms.WmsActionGroupDetailsModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description : Model
* @Reference :
* @Author : dragon.xu
* @CreateDate : 2019-05-15 13:27
* @Modify:
**/
@Data
@Api("流程Model")
public class MesRouteModel implements Serializable {
@ApiParam("流程代码")
public String routeCode;
@ApiParam("工厂代码")
public String organizeCode;
@ApiParam("GOJS位置")
public String position;
@ApiParam("流程明细Model集合")
public List<MesRouteProcessModel> mesRouteProcessModelList;
}

@ -0,0 +1,30 @@
package cn.estsh.i3plus.pojo.model.mes;
import cn.estsh.i3plus.pojo.mes.bean.MesProdRouteOptParam;
import cn.estsh.i3plus.pojo.mes.bean.MesRouteProcess;
import cn.estsh.i3plus.pojo.mes.bean.MesRouteProcessStep;
import cn.estsh.i3plus.pojo.wms.bean.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @Description : Model
* @Reference :
* @Author : dragon.xu
* @CreateDate : 2019-04-29 15:39
* @Modify:
**/
@Data
@Api("流程工序Model")
public class MesRouteProcessModel {
@ApiParam("流程工序")
public MesRouteProcess mesRouteProcess;
@ApiParam("流程工步参数配置表(根据Seq分组)")
public Map<String, List<MesRouteProcessStep>> mesRouteProcessStepMap;
@ApiParam("流程工步参数配置表(根据Seq分组)")
public Map<String, List<MesProdRouteOptParam>> mesProdRouteOptParamMap;
}

@ -77,7 +77,6 @@ public class SwebHqlPack {
DdlPreparedPack.getStringEqualPack(model.getVendorCode(), "vendorCode", result);
DdlPreparedPack.getNumEqualPack(model.getOrderType(), "orderType", result);
DdlPreparedPack.getStringEqualPack(model.getPartNo(), "partNo", result);
DdlPreparedPack.timeBuilder(model.getExpectedTimeStart(), model.getExpectedTimeEnd(), "expectedTime", result, false);
// 封装有效状态和删除状态
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", result);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), "isDeleted", result);

Loading…
Cancel
Save