yun-zuoyi
puxiao.liao 5 years ago
commit 277d2c851c

@ -17,7 +17,8 @@ public class MesEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_ACTION_MODULE { public enum MES_ACTION_MODULE {
WORK_ORDER_LANDED(10, "生产工单下达"); WORK_ORDER_LANDED(10, "生产工单下达"),
QUEUE_JIT_ACTUAL_LANDED(20, "客户JIT生产工单下达");
private int value; private int value;
private String description; private String description;
@ -2915,7 +2916,8 @@ public class MesEnumUtil {
STANDARD_ORDER(10, "标准工单"), STANDARD_ORDER(10, "标准工单"),
BTS_ORDER(20, "BTS工单"), BTS_ORDER(20, "BTS工单"),
ATTEMPT_ORDER(30, "试制工单"), ATTEMPT_ORDER(30, "试制工单"),
BH_ORDER(40, "B&H工单"); BH_ORDER(40, "B&H工单"),
JIT_ORDER(50, "JIT工单");
private int value; private int value;
private String description; private String description;
@ -4068,7 +4070,7 @@ public class MesEnumUtil {
* JIT * JIT
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_QUEUE_JIT_ACTUAL_STATUS { public enum QUEUE_JIT_ACTUAL_STATUS {
CREATE(10, "创建"), CREATE(10, "创建"),
LANDED(20, "下达"), LANDED(20, "下达"),
CANCEL(30, "取消"); CANCEL(30, "取消");
@ -4076,7 +4078,7 @@ public class MesEnumUtil {
private int value; private int value;
private String description; private String description;
MES_QUEUE_JIT_ACTUAL_STATUS(int value, String description) { QUEUE_JIT_ACTUAL_STATUS(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -4104,14 +4106,117 @@ public class MesEnumUtil {
* JIT * JIT
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_QUEUE_JIT_ACTUAL_SPECIAL_FLAG { public enum QUEUE_JIT_ACTUAL_SPECIAL_FLAG {
NORMAL(10, "正常"), NORMAL(10, "正常"),
EMPTYING(20, "放空"); EMPTYING(20, "放空");
private int value; private int value;
private String description; private String description;
MES_QUEUE_JIT_ACTUAL_SPECIAL_FLAG(int value, String description) { QUEUE_JIT_ACTUAL_SPECIAL_FLAG(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;
}
}
/**
* JIS
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUEUE_JIS_STATUS {
CREATE(10, "创建");
private int value;
private String description;
QUEUE_JIS_STATUS(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 QUEUE_ORDER_QUEUE_TYPE {
PRODUCT_QUEUE(10, "生产队列"),
PRELOAD_QUEUE(20, "预装队列");
private int value;
private String description;
QUEUE_ORDER_QUEUE_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;
}
}
/**
* JIS
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUEUE_JIS_DETAIL_STATUS {
CREATE(10, "创建");
private int value;
private String description;
QUEUE_JIS_DETAIL_STATUS(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }

@ -476,7 +476,7 @@ public class PtlEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SYNC_PATTERN { public enum SYNC_PATTERN {
UPDATE(1, "修改"), UPDATE(1, "新增或修改"),
INSERT(2, "新增"); INSERT(2, "新增");
private int value; private int value;

@ -1360,7 +1360,7 @@ public class PtlPcnEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SYNC_PATTERN { public enum SYNC_PATTERN {
UPDATE(1, "修改"), UPDATE(1, "新增或修改"),
INSERT(2, "新增"); INSERT(2, "新增");
private int value; private int value;

@ -6,6 +6,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean; import org.springframework.data.repository.NoRepositoryBean;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -378,4 +379,7 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
double findMinByProperty(String sumPropertyName,String groupByName,String propertyName, Object value); double findMinByProperty(String sumPropertyName,String groupByName,String propertyName, Object value);
double findMinByProperties(String sumPropertyName,String groupByName,String[] paramName,Object[] paramValue); double findMinByProperties(String sumPropertyName,String groupByName,String[] paramName,Object[] paramValue);
List<T> findByHqlWhereByClear(DdlPackBean packBean, String dateTime);
} }

@ -1548,4 +1548,23 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
} }
return num; return num;
} }
@Override
public List<T> findByHqlWhereByClear(DdlPackBean packBean, String dateTime) {
LOGGER.info("ptl_pcn数据清除查询");
StringBuffer queryString = new StringBuffer();
queryString.append("select model from " + persistentClass.getSimpleName()
+ " as model where 1=1 and model.createDatetime <= " + "'" + dateTime + "'" + " ");
if (packBean != null) {
queryString.append(packBean.getWhereAppend());
}
Query query = entityManager.createQuery(queryString.toString());
for (String key : packBean.getHqlPreparedMap().keySet()) {
query.setParameter("m_" + key,packBean.getHqlPreparedMap().get(key));
}
return query.getResultList();
}
} }

@ -14,7 +14,7 @@ import javax.persistence.Table;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @Description :MES_QUEUE_JIT_ACTUAL_DETAIL * @Description :
* @Reference : * @Reference :
* @Author : joke * @Author : joke
* @CreateDate : 2020-03-06 10:16 * @CreateDate : 2020-03-06 10:16

@ -64,6 +64,14 @@ public class MesQueueJis extends BaseBean implements Serializable {
@ApiParam("工作单元代码") @ApiParam("工作单元代码")
private String workCellCode; private String workCellCode;
@Column(name = "CUST_CODE")
@ApiParam("客户代码")
private String custCode;
@Column(name = "CUST_PLANT_CODE")
@ApiParam("客户产线代码")
private String custPlantCode;
@Transient @Transient
@ApiParam("颜色") @ApiParam("颜色")
private String color; private String color;

@ -59,4 +59,12 @@ public class MesQueueJisDetail extends BaseBean implements Serializable {
@ApiParam("产品条码") @ApiParam("产品条码")
private String serialNumber; private String serialNumber;
@Column(name = "QUEUE_GROUP_NO")
@ApiParam("分组队列编号")
private String queueGroupNo;
@Column(name = "GROUP_NO")
@ApiParam("组内编号")
private Integer groupNo;
} }

@ -88,4 +88,16 @@ public class MesQueueJitActual extends BaseBean implements Serializable {
@ApiParam("客户需求结束时间") @ApiParam("客户需求结束时间")
private String custPointEndDate; private String custPointEndDate;
@Transient
@ApiParam("产品配置名称")
private String prodCfgName;
@Transient
@ApiParam("状态名称")
private String statusName;
@Transient
@ApiParam("特殊标识名称")
private String specialFlagName;
} }

@ -31,9 +31,9 @@ public class MesQueueJitActualDetail extends BaseBean implements Serializable {
private static final long serialVersionUID = 1442091799346314190L; private static final long serialVersionUID = 1442091799346314190L;
@Column(name = "QGR_CODE") @Column(name = "JIS_ACTUAL_NO")
@ApiParam("分组规则代码") @ApiParam("队列编号")
private String qgrCode; private String jisActualNo;
@Column(name = "PROD_CFG_CODE") @Column(name = "PROD_CFG_CODE")
@ApiParam("配置代码") @ApiParam("配置代码")

@ -72,6 +72,26 @@ public class MesQueueOrder extends BaseBean implements Serializable {
@ApiParam("区域代码") @ApiParam("区域代码")
private String areaCode; private String areaCode;
@Column(name = "IS_LOCK")
@ApiParam("锁定标识")
private Integer isLock;
@Column(name = "CUST_CODE")
@ApiParam("客户代码")
private String custCode;
@Column(name = "WORK_TYPE")
@ApiParam("区域代码")
private String workType;
@Column(name = "QUEUE_TYPE")
@ApiParam("队列类型")
private Integer queueType;
@Column(name = "PG_CODE")
@ApiParam("生产组代码")
private String pgCode;
@Transient @Transient
@ApiParam("起始车号") @ApiParam("起始车号")
private String custFlagNoStart; private String custFlagNoStart;

@ -76,7 +76,13 @@ public class MesQueueOrderDetail extends BaseBean implements Serializable {
@ApiParam("产品类型名称") @ApiParam("产品类型名称")
private String pptCode; private String pptCode;
@Transient @Column(name = "QUEUE_GROUP_NO")
@ApiParam("分组队列编号")
private String queueGroupNo;
@Column(name = "GROUP_NO")
@ApiParam("组内编号")
private Integer groupNo; @Transient
@ApiParam("队列序号") @ApiParam("队列序号")
private Double queueSeq; private Double queueSeq;

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.mes.model; package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -79,6 +80,9 @@ public class StationRequestBean implements Serializable {
@ApiParam("工步列表") @ApiParam("工步列表")
private List<StepModel> stepList; private List<StepModel> stepList;
@ApiParam("生产主队列编号")
private String orderNo;
@Override @Override
public String toString() { public String toString() {
return "StationRequestBean{" + return "StationRequestBean{" +

@ -82,11 +82,11 @@ public class PtlBom extends BaseBean implements Serializable {
@Column(name = "EFF_START_TIME") @Column(name = "EFF_START_TIME")
@ApiParam("有效起始日期") @ApiParam("有效起始日期")
@DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.DATETIME) @DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.TEXT)
private Date effStartTime; private String effStartTime;
@Column(name = "EFF_END_TIME") @Column(name = "EFF_END_TIME")
@ApiParam("有效截止日期") @ApiParam("有效截止日期")
@DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.DATETIME) @DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.TEXT)
private Date effEndTime; private String effEndTime;
} }

@ -0,0 +1,58 @@
package cn.estsh.i3plus.pojo.ptl.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 java.io.Serializable;
import java.util.Date;
/**
* @author adair.song
* @date 2020/03/09 17:41
* @desc
*/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PTL_PCN_CLEAR")
@EqualsAndHashCode(callSuper = true)
@Api("PTL_PCN数据清理")
public class PtlPcnClear extends BaseBean implements Serializable {
private static final long serialVersionUID = -1596443273899197995L;
@Column(name = "PCN_CODE")
@ApiParam("PCN代码")
private String pcnCode;
@Column(name = "OBJECT_CODE")
@ApiParam("对象代码")
private String objectCode;
@Column(name = "OBJECT_NAME")
@ApiParam("对象名称")
private String objectName;
@Column(name = "EXTRACT_CONDITION")
@ApiParam("获取数据条件")
private String extractCondition;
@Column(name = "ACTION_FREQUENCY")
@ApiParam("执行频率")
private Integer actionFrequency;
@Column(name = "LAST_SYNC_TIME")
@ApiParam("上一执行时间")
private String lastSyncTime;
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.ptl.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.ptl.bean.PtlPcnClear;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: adair.song
* @CreateDate:2019-04-24-17:13
* @Modify:
**/
@Repository
public interface PtlPcnClearRepository extends BaseRepository<PtlPcnClear, Long> {
}
Loading…
Cancel
Save