1、38151 23032—PC端【工单自动发布物料】导入功能,导入后,未存导入物料数据

2、38132 23032—PC端【出货检验项目】界面增加字段“欠点值”,位于“判定基准”之后,新增,编辑,导入都需增加相应字段
tags/yfai-mes-ext-v1.0
yxw 1 year ago
parent 3a778366da
commit efa8f3d48a

@ -12,43 +12,43 @@ import java.util.Map;
public interface IJxRepairJudgeTypeService {
/**
*
*
*
* @param oqcProject
* @param pager
* @return
* @return
*/
@ApiOperation(value = "分页查询出货检验项目", notes = "分页查询出货检验项目")
@ApiOperation(value = "分页查询维修判定类型", notes = "分页查询维修判定类型")
ListPager<MesRepairJudgeType> queryRepairJudgeTypePager(MesRepairJudgeType oqcProject, Pager pager);
/**
*
* @param model
*
* @param model
*/
@ApiOperation(value = "新增出货检验项目", notes = "新增出货检验项目")
@ApiOperation(value = "新增维修判定类型", notes = "新增维修判定类型")
MesRepairJudgeType insertRepairJudgeType(MesRepairJudgeType model);
/**
*
* @param model
*
* @param model
*/
@ApiOperation(value = "编辑出货检验项目", notes = "编辑出货检验项目")
@ApiOperation(value = "编辑维修判定类型", notes = "编辑维修判定类型")
void updateRepairJudgeType(MesRepairJudgeType model);
/**
* ID
* ID
* @param model
* @param userName
*/
@ApiOperation(value = "根据ID启用或禁用出货检验项目", notes = "根据ID启用或禁用出货检验项目")
@ApiOperation(value = "根据ID启用或禁用维修判定类型", notes = "根据ID启用或禁用维修判定类型")
int updateRepairJudgeTypeValidById(BatchIdModel model, String userName);
/**
* ID
* ID
* @param model
* @param userName
*/
@ApiOperation(value = "根据ID启用或禁用出货检验项目", notes = "根据ID启用或禁用出货检验项目")
@ApiOperation(value = "根据ID启用或禁用维修判定类型", notes = "根据ID启用或禁用维修判定类型")
int deleteRepairJudgeTypeValidById(BatchIdModel model, String userName);
/**

@ -7,6 +7,7 @@ import cn.estsh.i3plus.pojo.mes.bean.MesPartProduceType;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import java.util.Map;
public interface ISxPartExtService {
@ -52,4 +53,12 @@ public interface ISxPartExtService {
@ApiOperation(value = "获物料分类信息", notes = "获物料分类信息")
List<MesPartCategory> queryPartCategoryListByType(String organizeCode, String categoryType);
/**
*
* @param organizeCode
* @return
*/
@ApiOperation(value = "获物料分类信息", notes = "获物料分类信息")
Map<String, String> queryPartCategoryMapByType(String organizeCode, String categoryType);
}

@ -108,8 +108,9 @@ public class PartAutoLandedService implements IPartAutoLandedService {
throw new BaseImppException("物料不存在");
}
MesPartAutoLanded mesPartAutoLanded = new MesPartAutoLanded();
BeanUtils.copyProperties(excelPartAutoLanded,mesPartAutoLanded);
mesPartAutoLanded.setPartNameRdd(mesPart.getPartName());
mesPartAutoLanded.setPartNo(partNo);
mesPartAutoLanded.setWorkCenterCode(workCenterCode);
MesPartAutoLanded mesPartAutoLanded1 = partAutoLandedRepository.getByProperty(
new String[]{"partNo", "workCenterCode", "organizeCode", "isValid", "isDeleted"},

@ -1,6 +1,7 @@
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base.jx;
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxOqcProjectService;
import cn.estsh.i3plus.ext.mes.api.busi.bu3.ISxPartExtService;
import cn.estsh.i3plus.ext.mes.pojo.bean.MesOqcRuleNoteDetail;
import cn.estsh.i3plus.ext.mes.pojo.bean.MesOqcRuleNoteDetailTravel;
import cn.estsh.i3plus.ext.mes.pojo.model.jx.JxOqcProjectModel;
@ -19,6 +20,7 @@ import cn.estsh.i3plus.pojo.base.common.PagerHelper;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesPart;
import cn.estsh.i3plus.pojo.mes.bean.MesPartCategory;
import cn.estsh.i3plus.pojo.mes.repository.MesPartRepository;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import org.springframework.beans.BeanUtils;
@ -29,6 +31,7 @@ import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author yumingxing
@ -47,6 +50,9 @@ public class JxOqcProjectService implements IJxOqcProjectService {
@Autowired
private MesPartRepository partRepository;
@Autowired
private ISxPartExtService partExtService;
private static final String ONE = "1";
private static final String TWO = "2";
private static final String THREE = "3";
@ -60,11 +66,14 @@ public class JxOqcProjectService implements IJxOqcProjectService {
List<MesOqcRuleNoteDetail> oqcProjectList = oqcProjectDao.findByHqlWherePage(hqlPack, pager);
List<JxOqcProjectModel> oqcProjectModels = new ArrayList<>();
Map<String, String> partCategoryNameMap = partExtService.queryPartCategoryMapByType(oqcProject.getOrganizeCode(), "Category3");
oqcProjectList.stream().forEach(sxQmsBuOqcProject -> {
JxOqcProjectModel oqcProjectModel = new JxOqcProjectModel();
BeanUtils.copyProperties(sxQmsBuOqcProject, oqcProjectModel);
oqcProjectModel.setOqcNoTypeName(MesExtEnumUtil.OQC_CHECK_TYPE.valueOfDescription(oqcProjectModel.getOqcNoType()));
oqcProjectModel.setCheckTypeName(MesExtEnumUtil.CHECK_JUDGE_TYPE.valueOfDescription(oqcProjectModel.getCheckType()));
oqcProjectModel.setCategoryCode3Name(!StringUtils.isEmpty(sxQmsBuOqcProject) && !CollectionUtils.isEmpty(partCategoryNameMap) && partCategoryNameMap.containsKey(sxQmsBuOqcProject.getCategoryCode3()) ? partCategoryNameMap.get(sxQmsBuOqcProject.getCategoryCode3()) : "" );
oqcProjectModels.add(oqcProjectModel);
});
@ -114,10 +123,10 @@ public class JxOqcProjectService implements IJxOqcProjectService {
.build();
}
if(model.getCheckType() == MesExtEnumUtil.CHECK_JUDGE_TYPE.COMPARE_TYPE.getValue()){
if (model.getCheckType() == MesExtEnumUtil.CHECK_JUDGE_TYPE.COMPARE_TYPE.getValue()) {
if (model.getBaseType() == null) model.setBaseType(MesExtEnumUtil.OQC_BASE_TYPE.DECIMALISM.getBase());
checkCompareValueTypeIsValid(model);
}else if(model.getCheckType() == MesExtEnumUtil.CHECK_JUDGE_TYPE.EQUIVALENCE_TYPE.getValue() && StringUtils.isEmpty(model.getStandardValue())){
} else if(model.getCheckType() == MesExtEnumUtil.CHECK_JUDGE_TYPE.EQUIVALENCE_TYPE.getValue() && StringUtils.isEmpty(model.getStandardValue())){
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.QMS.getCode())
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION_DATA_EXIT.getCode())

@ -15,8 +15,11 @@ import cn.estsh.i3plus.pojo.mes.repository.MesPartProduceTypeRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Slf4j
@Service
@ -66,4 +69,10 @@ public class SxPartExtService implements ISxPartExtService {
new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), categoryType});
}
@Override
public Map<String, String> queryPartCategoryMapByType(String organizeCode, String categoryType) {
List<MesPartCategory> partCategoryList = queryPartCategoryListByType(organizeCode, categoryType);
return CollectionUtils.isEmpty(partCategoryList) ? null : partCategoryList.stream().collect(Collectors.toMap(MesPartCategory::getCategoryCode, MesPartCategory::getCategoryName));
}
}

@ -120,7 +120,7 @@ public class SxEquipmentCheckExcelService implements IExcelImportExtService {
.add(o.getWorkCenterCode()).add(o.getWorkCellCode()).add(o.getEquNo()).add(o.getProjectContent()).add(o.getCheckMethod()).add(o.getCheckType()).toString()));
//从excel表的第2行数据开始导入getFirstRowNum是从0行开始读取
for (int i = (sheetAt.getFirstRowNum() + 1); i < totalNumberOfRows; i ++) {
for (int i = (sheetAt.getFirstRowNum() + 4); i < totalNumberOfRows; i ++) {
Row row = sheetAt.getRow(i);
//空行跳过
if (null == row) {
@ -288,18 +288,20 @@ public class SxEquipmentCheckExcelService implements IExcelImportExtService {
errorInfo += "第A+B+C+F+G+H列数据跟第" + existMap.get(key) + "行的第A+B+C+F+G+H列数据重复;";
}
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(AuthUtil.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(equNo, "equNo", ddlPackBean);
DdlPreparedPack.getStringEqualPack(workCellCode, "workCellCode", ddlPackBean);
DdlPreparedPack.getStringEqualPack(workCenterCode, "workCenterCode", ddlPackBean);
DdlPreparedPack.getStringEqualPack(projectContent, "projectContent", ddlPackBean);
DdlPreparedPack.getStringEqualPack(checkMethod, "checkMethod", ddlPackBean);
DdlPreparedPack.getStringEqualPack(checkType, "checkType", ddlPackBean);
MesEquipmentCheck mesEquipmentCheck = equipmentCheckRepository.getByProperty(ddlPackBean);
if (!ObjectUtils.isEmpty(mesEquipmentCheck)) {
errorNum ++;
cellNum += "数据已存在;";
errorInfo += "数据已存在;";
if (errorNum == 0) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(equNo, "equNo", ddlPackBean);
DdlPreparedPack.getStringEqualPack(workCellCode, "workCellCode", ddlPackBean);
DdlPreparedPack.getStringEqualPack(workCenterCode, "workCenterCode", ddlPackBean);
DdlPreparedPack.getStringEqualPack(projectContent, "projectContent", ddlPackBean);
DdlPreparedPack.getStringEqualPack(checkMethod, "checkMethod", ddlPackBean);
DdlPreparedPack.getStringEqualPack(checkType, "checkType", ddlPackBean);
MesEquipmentCheck mesEquipmentCheck = equipmentCheckRepository.getByProperty(ddlPackBean);
if (!ObjectUtils.isEmpty(mesEquipmentCheck)) {
errorNum ++;
cellNum += "数据已存在;";
errorInfo += "数据已存在;";
}
}
//上下限值校验

@ -1,27 +1,22 @@
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.excel.jx;
import cn.estsh.i3plus.ext.mes.api.base.IExcelImportExtService;
import cn.estsh.i3plus.ext.mes.api.base.IPartExtDataService;
import cn.estsh.i3plus.ext.mes.api.busi.bu3.ISxPartExtService;
import cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base.CommonExtService;
import cn.estsh.i3plus.ext.mes.pojo.bean.MesOqcRuleNoteDetail;
import cn.estsh.i3plus.ext.mes.pojo.bean.MesOqcRuleNoteDetailTravel;
import cn.estsh.i3plus.ext.mes.pojo.model.ExcelImportErrorExtModel;
import cn.estsh.i3plus.ext.mes.pojo.model.ExcelImportResultExtModel;
import cn.estsh.i3plus.ext.mes.pojo.model.bu.PartCategoryModel;
import cn.estsh.i3plus.ext.mes.pojo.repository.MesOqcRuleNoteDetailRepository;
import cn.estsh.i3plus.ext.mes.pojo.repository.MesOqcRuleNoteDetailTravelRepository;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
import cn.estsh.i3plus.mes.apiservice.util.MesCommonUtil;
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesPart;
import cn.estsh.i3plus.pojo.mes.bean.MesPartCategory;
import cn.estsh.i3plus.pojo.mes.repository.MesPartRepository;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
@ -215,19 +210,27 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
} catch (Exception e) {
}
//欠点值
String defectValueStr = null;
try {
row.getCell(6).setCellType(CellType.STRING);
defectValueStr = row.getCell(6, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
//值类型
String valueTypeStr = null;
try {
row.getCell(6).setCellType(CellType.STRING);
valueTypeStr = row.getCell(6, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
row.getCell(7).setCellType(CellType.STRING);
valueTypeStr = row.getCell(7, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
//进制类型
String baseTypeStr = null;
try {
row.getCell(7).setCellType(CellType.STRING);
baseTypeStr = row.getCell(7, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
row.getCell(8).setCellType(CellType.STRING);
baseTypeStr = row.getCell(8, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
@ -235,40 +238,40 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
String standardValue = null;
try {
row.getCell(8).setCellType(CellType.STRING);
standardValue = row.getCell(8, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
row.getCell(9).setCellType(CellType.STRING);
standardValue = row.getCell(9, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
//下限值
String downLimit = null;
try {
row.getCell(9).setCellType(CellType.STRING);
downLimit = row.getCell(9, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
row.getCell(10).setCellType(CellType.STRING);
downLimit = row.getCell(10, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
//上限值
String upLimit = null;
try {
row.getCell(10).setCellType(CellType.STRING);
upLimit = row.getCell(10, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
row.getCell(11).setCellType(CellType.STRING);
upLimit = row.getCell(11, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
//启用器具
String appliance = null;
try {
row.getCell(11).setCellType(CellType.STRING);
appliance = row.getCell(11, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
row.getCell(12).setCellType(CellType.STRING);
appliance = row.getCell(12, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
//备注
String modifyRemark = null;
try {
row.getCell(12).setCellType(CellType.STRING);
modifyRemark = row.getCell(12, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
row.getCell(13).setCellType(CellType.STRING);
modifyRemark = row.getCell(13, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue().trim();
} catch (Exception e) {
}
@ -352,12 +355,22 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
errorInfo += "第F列数据必填;";
}
Integer defectValue = null;
if (!StringUtils.isEmpty(defectValueStr)) {
defectValue = MesExtEnumUtil.OQC_DEFECT_TYPE.descriptionOfValue(defectValueStr);
if (defectValue == null) {
errorNum++;
cellNum += "G;";
errorInfo += "欠点值无效;";
}
}
Integer baseType = MesExtEnumUtil.OQC_BASE_TYPE.DECIMALISM.getValue();
if (!StringUtils.isEmpty(baseTypeStr)) {
baseType = MesExtEnumUtil.OQC_BASE_TYPE.descriptionOfValue(baseTypeStr);
if (baseType == null) {
errorNum++;
cellNum += "H;";
cellNum += "I;";
errorInfo += "进制类型无效;";
}
}
@ -365,14 +378,14 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
Integer valueType = MesExtEnumUtil.CHECK_JUDGE_TYPE.descriptionOfValue(valueTypeStr);
if (StringUtils.isEmpty(valueTypeStr)) {
errorNum++;
cellNum += "G;";
errorInfo += "第G列数据必填;";
cellNum += "H;";
errorInfo += "第H列数据必填;";
}else{
if (valueType == null) {
errorNum++;
cellNum += "G;";
errorInfo += "第G列数据无效;";
}else if(valueType == (MesExtEnumUtil.CHECK_JUDGE_TYPE.COMPARE_TYPE.getValue())){
cellNum += "H;";
errorInfo += "第H列数据无效;";
} else if(valueType == (MesExtEnumUtil.CHECK_JUDGE_TYPE.COMPARE_TYPE.getValue())){
try{
//标准值
Double standardValueCheck = null;
@ -389,15 +402,15 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
standardValueCheck = baseConvertToDecimalism(standardValue, baseType);
} catch (Exception e) {
errorNum++;
cellNum += "I;";
errorInfo += "第I列数据无效,十进制最多3位小数,十六进制值无效;";
cellNum += "J;";
errorInfo += "第J列数据无效,十进制最多3位小数,十六进制值无效;";
}
String[] standardArray = standardValue.split(MesExtConstWords.DECIMAL_POINT);
if (null != standardArray && standardArray.length == 2 && standardArray[1].length() > 3) {
errorNum++;
cellNum += "I;";
errorInfo += "第I列数据无效,最多3位小数;";
cellNum += "J;";
errorInfo += "第J列数据无效,最多3位小数;";
}
}
@ -408,15 +421,15 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
upLimitCheck = baseConvertToDecimalism(upLimit, baseType);
} catch (Exception e) {
errorNum++;
cellNum += "K;";
errorInfo += "第K列数据无效,十进制最多3位小数,十六进制值无效;";
cellNum += "L;";
errorInfo += "第L列数据无效,十进制最多3位小数,十六进制值无效;";
}
String[] standardArray = upLimit.split(MesExtConstWords.DECIMAL_POINT);
if (null != standardArray && standardArray.length == 2 && standardArray[1].length() > 3) {
errorNum++;
cellNum += "K;";
errorInfo += "第K列数据无效,最多3位小数;";
cellNum += "L;";
errorInfo += "第L列数据无效,最多3位小数;";
}
}else{
num++;
@ -428,15 +441,15 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
downLimitCheck = baseConvertToDecimalism(downLimit, baseType);
} catch (Exception e) {
errorNum++;
cellNum += "J;";
errorInfo += "第J列数据无效,十进制最多3位小数,十六进制值无效;";
cellNum += "K;";
errorInfo += "第K列数据无效,十进制最多3位小数,十六进制值无效;";
}
String[] standardArray = downLimit.split(MesExtConstWords.DECIMAL_POINT);
if (null != standardArray && standardArray.length == 2 && standardArray[1].length() > 3) {
errorNum++;
cellNum += "J;";
errorInfo += "第J列数据无效,最多3位小数;";
cellNum += "K;";
errorInfo += "第K列数据无效,最多3位小数;";
}
}else{
num++;
@ -444,8 +457,8 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
if(num == 2){
errorNum++;
cellNum += "J+K;";
errorInfo += "第J+K列数据无效,需至少其中一个有值;";
cellNum += "K+L;";
errorInfo += "第K+L列数据无效,需至少其中一个有值;";
}
String computeType;
@ -465,39 +478,39 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
case ONE:
if(downLimitCheck > standardValueCheck || standardValueCheck > upLimitCheck || downLimitCheck > upLimitCheck){
errorNum++;
cellNum += "I;";
cellNum += "J;";
errorInfo += "比值范围输入不合理;";
}
break;
case TWO:
if(standardValueCheck < downLimitCheck){
errorNum++;
cellNum += "I;";
cellNum += "J;";
errorInfo += "标准值大于上限值;";
}
break;
case THREE:
if(standardValueCheck > upLimitCheck){
errorNum++;
cellNum += "I;";
cellNum += "J;";
errorInfo += "标准值大于上限值;";
}
break;
case FOUR:
if(downLimitCheck > upLimitCheck){
errorNum++;
cellNum += "K;";
cellNum += "L;";
errorInfo += "上限值小于下限值;";
}
}
}catch (Exception e){
errorNum++;
cellNum += "I+J+K;";
cellNum += "J+K+L;";
errorInfo += "不符合结果类型对应的请求参数类型;";
}
}else if(valueType == MesExtEnumUtil.CHECK_JUDGE_TYPE.EQUIVALENCE_TYPE.getValue() && StringUtils.isEmpty(standardValue)){
errorNum++;
cellNum += "I;";
cellNum += "J;";
errorInfo += "标准值不能为空;";
}
}
@ -544,6 +557,7 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
item.setCheckItem(oqcProject);
item.setBaseType(baseType);
item.setStandard(standard);
item.setDefectValue(defectValue);
item.setUpLimit(upLimit);
item.setDownLimit(downLimit);
item.setCheckTool(appliance);
@ -596,6 +610,9 @@ public class JxOqcProjectExcelService implements IExcelImportExtService {
}
private Double baseConvertToDecimalism(String value, int baseOfValue) {
if (MesExtEnumUtil.OQC_BASE_TYPE.DECIMALISM.getValue() == baseOfValue) return Double.valueOf(value);
return Double.valueOf(Integer.parseInt(value, MesExtEnumUtil.OQC_BASE_TYPE.baseOfValue(baseOfValue)));
}
}

@ -99,6 +99,11 @@ public class MesOqcRuleNoteDetail extends BaseBean implements Serializable {
@AnnoOutputColumn(refClass = MesExtEnumUtil.OQC_CHECK_TYPE.class, refForeignKey = "value", value = "description", hidden = true)
private Integer oqcNoType;
@Column(name = "DEFECT_VALUE")
@ApiParam("欠点值")
@AnnoOutputColumn(refClass = MesExtEnumUtil.OQC_DEFECT_TYPE.class, refForeignKey = "value", value = "description", hidden = true)
private Integer defectValue;
@Column(name = "BASE_TYPE")
@ApiParam("进制类型")
@ColumnDefault("10")

@ -22,7 +22,7 @@ public class ExcelPartAutoLanded {
@AnnoOutputColumn(required = false)
private String workCenterCode;
@ApiParam("物料编码")
@ApiParam("成品物料编码")
@AnnoOutputColumn
private String partNo;

@ -42,6 +42,9 @@ public class JxOqcProjectModel implements Serializable {
@ApiParam("产品类别")
private String categoryCode3;
@ApiParam("产品类别")
private String categoryCode3Name;
@ApiParam("物料编码")
private String partNo;
@ -51,6 +54,12 @@ public class JxOqcProjectModel implements Serializable {
@ApiParam("判断基准")
private String standard;
@ApiParam("欠点值")
private Integer defectValue;
@ApiParam("欠点值")
private String defectValueName;
@ApiParam("值类型")
private Integer checkType;

@ -5360,4 +5360,51 @@ public class MesExtEnumUtil {
return descOf(desc);
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OQC_DEFECT_TYPE {
MILD(10, "轻"),
MODERATE(20, "中"),
SERIOUS(30, "重");
private int value;
private String description;
OQC_DEFECT_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;
}
}
}

Loading…
Cancel
Save