Start Task #1960 Cost:8h Left:8h

yun-zuoyi
joke.wang 5 years ago
parent 399c9c828e
commit a8241a1694

@ -6035,4 +6035,116 @@ public class MesEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CALIBRATION_STATUS {
UNEXECUTED(10, "UNEXECUTED", "待执行"),
EXECUTE(20, "EXECUTE", "执行中"),
CANCEL(30, "CANCEL", "取消"),
FINISH(40, "FINISH", "完成");
private int value;
private String code;
private String description;
CALIBRATION_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(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 int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum GUN_TYPE {
DL(10, "DL", "小枪"),
PF(20, "PF", "大枪");
private int value;
private String code;
private String description;
GUN_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(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 int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
}

@ -3791,7 +3791,6 @@ public class MesPcnEnumUtil {
return tmp;
}
}
/**
*
*/
@ -3827,4 +3826,116 @@ public class MesPcnEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CALIBRATION_STATUS {
UNEXECUTED(10, "UNEXECUTED", "待执行"),
EXECUTE(20, "EXECUTE", "执行中"),
CANCEL(30, "CANCEL", "取消"),
FINISH(40, "FINISH", "完成");
private int value;
private String code;
private String description;
CALIBRATION_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(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 int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum GUN_TYPE {
DL(10, "DL", "小枪"),
PF(20, "PF", "大枪");
private int value;
private String code;
private String description;
GUN_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(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 int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
}

@ -0,0 +1,81 @@
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.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/5/27 2:20
* @Modify:
*/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "IF_PACKAGE_DETAIL")
@Api("校枪记录表")
public class MesGunCalibrationRecord extends BaseBean implements Serializable {
private static final long serialVersionUID = -6166370020956801528L;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name = "GUN_CODE")
@ApiParam("枪号")
private String gunCode;
@Column(name = "CUN_TYPE")
@ApiParam("扭矩枪类型")
private String cunType;
@Column(name = "PSET_CODE")
@ApiParam("PSET号")
private String psetCode;
@Column(name = "EXPECT_COUNT")
@ApiParam("设定枪数")
private Integer expectCount;
@Column(name = "REAL_COUNT")
@ApiParam("实际枪叔")
private Integer realCount;
@Column(name = "CALIBRATION_STATUS")
@ApiParam("校枪状态")
private Integer calibrationStatus;
@Column(name = "START_TIME")
@ApiParam("开始校枪时间")
private String startTime;
@Column(name = "END_TIME")
@ApiParam("结束校枪时间")
private String endTime;
@Transient
@ApiParam("校枪状态名称")
private String calibrationStatusName;
@Transient
@ApiParam("界面编号")
private String windowNo;
}

@ -0,0 +1,13 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesGunCalibrationRecord;
/**
* @Description:
* @Author: jokelin
* @Date: 2020/5/27 2:39
* @Modify:
*/
public interface MesGunCalibrationRecordRepository extends BaseRepository<MesGunCalibrationRecord, Long> {
}

@ -2887,4 +2887,30 @@ public class MesHqlPack {
getStringBuilderPack(details, result);
return result;
}
/**
* MES
*
* @param gunCalibrationRecord
* @return
*/
public static DdlPackBean getMesGunCalibrationRecord(MesGunCalibrationRecord gunCalibrationRecord, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(gunCalibrationRecord, organizeCode);
if (!StringUtils.isEmpty(gunCalibrationRecord.getWorkCellCode())) {
DdlPreparedPack.getStringEqualPack(gunCalibrationRecord.getWorkCellCode(), "workCellCode", packBean);
}
if (!StringUtils.isEmpty(gunCalibrationRecord.getGunCode())) {
DdlPreparedPack.getStringEqualPack(gunCalibrationRecord.getGunCode(), "gunCode", packBean);
}
if (gunCalibrationRecord.getCalibrationStatus() != null) {
DdlPreparedPack.getNumEqualPack(gunCalibrationRecord.getCalibrationStatus(), "calibrationStatus", packBean);
}
if (!StringUtils.isEmpty(gunCalibrationRecord.getStartTime())) {
DdlPreparedPack.getStringBiggerPack(gunCalibrationRecord.getStartTime(), "startTime", packBean);
}
if (!StringUtils.isEmpty(gunCalibrationRecord.getStartTime())) {
DdlPreparedPack.getStringSmallerPack(gunCalibrationRecord.getEndTime(), "endTime", packBean);
}
return packBean;
}
}

@ -6,7 +6,7 @@ sonar.projectKey=i3plus.pojo:i3plus-pojo
# defaults to project key
sonar.projectName=i3plus-pojo
# defaults to 'not provided'
sonar.projectVersion=1.0-TEST-SNAPSHOT
sonar.projectVersion=1.0-DEV-SNAPSHOT
# Path is relative to the sonar-project.properties file. Defaults to .
#sonar.sources=./

Loading…
Cancel
Save