Finish Task #2153 Cost:24h

yun-zuoyi
joke.wang 5 years ago
parent 0c0d43cd96
commit 3dda15e00a

@ -4164,4 +4164,50 @@ public class MesPcnEnumUtil {
return tmp;
}
}
/**
* MES_
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_OPTION_TYPE {
OPTION_PART(1, "选配件"),
BOM_DISASSEMBLY(2, "BOM拆解");
private int value;
private String description;
MES_OPTION_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;
}
public static Integer descriptionOfValue(String description) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
}

@ -81,14 +81,13 @@ public class MesDefectRecord extends BaseBean implements Serializable {
@ApiParam("备注")
private String memo;
// @Column(name = "WORK_ORDER_NO")
// @ApiParam("工单号")
// private String workOrderNo;
@Transient
private List<MesDefect> mesDefectList;
@Transient
@ApiParam("后移数量")
private Integer backwardNum;
public int getRepairStatusVal() {
return this.repairStatus == null ? 0 : this.repairStatus;
}

@ -26,7 +26,7 @@ import java.io.Serializable;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PRODUCE_CATEGORY")
@Api("系统业务动作")
@Api("MES_产品位置")
public class MesProduceCategory extends BaseBean implements Serializable {
private static final long serialVersionUID = -992595557921651448L;
@ -37,4 +37,8 @@ public class MesProduceCategory extends BaseBean implements Serializable {
@Column(name = "PRODUCE_CTGY_NAME")
@ApiParam("产品类型名称")
private String produceCategoryName;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
}

@ -130,6 +130,14 @@ public class MesStationBom extends BaseBean implements Serializable {
@ApiParam("主任务编号")
private String orderNo;
@Transient
@ApiParam("产品类型代码")
private String produceCategoryCode;
@Transient
@ApiParam("产品类型名称")
private String produceCategoryName;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -0,0 +1,53 @@
package cn.estsh.i3plus.pojo.mes.bean.template;
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;
import java.io.Serializable;
/**
* @Description:
* @Author: jokelin
* @Date: 2020/6/17 8:39
* @Modify:
*/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WORK_CELL_DEFECT")
@Api("MES_工位缺陷")
public class MesWorkCellDefect extends BaseBean implements Serializable {
private static final long serialVersionUID = -528051790747923632L;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码")
private String defectCode;
@Column(name = "PART_ASSEMBLE")
@ApiParam("物料集")
private String partAssemble;
@Transient
@ApiParam("缺陷名称")
private String defectCodeName;
}

@ -101,4 +101,11 @@ public class StepPrintSnModel extends MesProduceSn {
@ApiParam("包装数量")
private Integer pgCodeNum;
@ApiParam("批次")
private String lotNo;
@ApiParam("备注")
private String memo;
@ApiParam("产品配置名称")
private String prodCfgCodeName;
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.template.MesWorkCellDefect;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Author: jokelin
* @Date: 2020/6/17 8:46
* @Modify:
*/
@Repository
public interface MesWorkCellDefectRepository extends BaseRepository<MesWorkCellDefect, Long> {
}

@ -9,6 +9,7 @@ import cn.estsh.i3plus.pojo.base.util.StringUtil;
import cn.estsh.i3plus.pojo.mes.bean.*;
import cn.estsh.i3plus.pojo.mes.bean.template.BasImportTemplate;
import cn.estsh.i3plus.pojo.mes.bean.template.BasImportTemplateDetails;
import cn.estsh.i3plus.pojo.mes.bean.template.MesWorkCellDefect;
import cn.estsh.i3plus.pojo.mes.dbinterface.MesInterfaceDataMapper;
import org.springframework.util.StringUtils;
@ -1524,7 +1525,6 @@ public class MesHqlPack {
}
/**
* <<<<<<< Updated upstream
* MES
*
* @param mesDefect
@ -3001,4 +3001,25 @@ public class MesHqlPack {
}
return packBean;
}
/**
* MES
*
* @param workCellDefect
* @param organizeCode
* @return
*/
public static DdlPackBean getMesWorkCellDefect(MesWorkCellDefect workCellDefect, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(workCellDefect, organizeCode);
if (!StringUtils.isEmpty(workCellDefect.getDefectCode())) {
DdlPreparedPack.getStringLikerPack(workCellDefect.getDefectCode(), "defectCode", packBean);
}
if (!StringUtils.isEmpty(workCellDefect.getWorkCellCode())) {
DdlPreparedPack.getStringLikerPack(workCellDefect.getWorkCellCode(), "workCellCode", packBean);
}
if (!StringUtils.isEmpty(workCellDefect.getWorkCenterCode())) {
DdlPreparedPack.getStringLikerPack(workCellDefect.getWorkCenterCode(), "workCenterCode", packBean);
}
return packBean;
}
}

Loading…
Cancel
Save