Merge remote-tracking branch 'origin/dev' into dev

tags/yfai-pcn-ext-v1.9
jun 8 months ago
commit 5a6b1f1d2a

@ -283,6 +283,16 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
mesReworkTask.setStatus(MesExtEnumUtil.REWORK_TASK_STATUS.FINISH.getValue());
ConvertBean.serviceModelUpdate(mesReworkTask,requestModel.getUserName());
mesReworkTaskRepository.save(mesReworkTask);
if (!StringUtils.isEmpty(mesReworkTask.getId())){
DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesReworkTask.getOrganizeCode());
DdlPreparedPack.getNumEqualPack(mesReworkTask.getId(), "reworkTaskId", packBean);
MesPartInspection mesPartInspection = mesPartInspectionRepository.getByProperty(packBean);
if (!StringUtils.isEmpty(mesReworkTask.getId())){
mesPartInspection.setQmsSync(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
ConvertBean.serviceModelUpdate(mesPartInspection, requestModel.getUserName());
mesPartInspectionRepository.update(mesPartInspection);
}
}
}
@Override

@ -209,6 +209,9 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
MesProduceSn produceSn = getProduceSn(model.getSn(), org);
if(!StringUtils.isEmpty(model.getPartInspection())){
model.getPartInspection().setQmsSync(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
}
//零件检测详情为空,则代表本次校验为合格。
if (CollectionUtils.isEmpty(model.getPartInspectionDetailList())) {
MesPartInspection partInspection;
@ -354,7 +357,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
model.getPartInspection().setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue());
ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName());
partInspectionRepository.save(model.getPartInspection());
//查询当前单据明细
List<MesPartInspectionDetail> resultDetailList = queryResultDetailList(model, org);
@ -387,23 +390,9 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) {
checkProduceSn(produceSn, model.getSn());
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.SUSPICIOUS.getValue());
String defectTypeCode = MesEnumUtil.DEFECT_TYPE_CODE.DETERMIND.getValue();
String defectTypeCodeStr = configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE") == null ? "QX130" :configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE");
//根据页面上选择的位置 查询位置,若不存在则提示 位置不存在,请检查数据
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(defectTypeCodeStr, "defectTypeCode", packBean);
MesDefectType defectType = defectTypeRepository.getByProperty(packBean);
model.getPartInspection().setDefectTypeCode(defectType.getDefectTypeCode());
model.getPartInspection().setDefectTypeId(defectType.getId());
ConvertBean.serviceModelInitialize(produceSn, AuthUtil.getSessionUser().getUserName());
produceSnExtService.update(produceSn);
}
partInspectionRepository.save(model.getPartInspection());
partInspectionDetailRepository.saveAll(resultDetailList);
partInspectionDetailRepository.saveAll(model.getPartInspectionDetailList());

@ -324,7 +324,8 @@ public class MesNcProcessingService implements IMesNcProcessingService {
private void saveDate(MesNcProcessingInputModel model, MesPartSap part, Integer type, MesDefectType person, String org,String areaCode, boolean isOrder) {
String workCenterCode = null == model.getPartInspection() ? null : model.getPartInspection().getWorkCenterCode();
assert model.getPartInspection() != null;
model.getPartInspection().setQmsSync(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
MesProduceSn sn = getProduceSn(model.getSn(), org);
String source = configService.getCfgValue(org, "LGORT");

@ -118,7 +118,7 @@ public class MesRawPartChargingServiceImpl implements IMesRawPartChargingService
checkNotNull(mesRawPartChargingModel);
ValidatorBean.checkNotNull(mesRawPartChargingModel.getMesRawPackagePart(), "原材料容器零件关系不能为空");
ValidatorBean.checkNotNull(mesRawPartChargingModel.getSn(), "原料条码不能为空");
ValidatorBean.checkNotNull(mesRawPartChargingModel.getLotNo(), "批次号不能为空");
// ValidatorBean.checkNotNull(mesRawPartChargingModel.getLotNo(), "批次号不能为空");
//校验是否已扫描
List<MesRawPartCharging> mesRawPartCharging = findMesRawPartCharging(mesRawPartChargingModel);
if (!CollectionUtils.isEmpty(mesRawPartCharging)) {
@ -257,7 +257,7 @@ public class MesRawPartChargingServiceImpl implements IMesRawPartChargingService
mesRawPartCharging.setQty(mesRawPartChargingModel.getMesRawPackagePart().getQty());
}
mesRawPartCharging.setLoadPartTime(TimeTool.getNowTime(true));
mesRawPartCharging.setLotNo(mesRawPartChargingModel.getLotNo());
mesRawPartCharging.setLotNo(StringUtils.isEmpty(mesRawPartChargingModel.getLotNo())?"":mesRawPartChargingModel.getLotNo());
mesRawPartCharging.setParentPackageSn(mesRawPartChargingModel.getPackageSn());
mesRawPartCharging.setPackageId(mesRawPartChargingModel.getMesRawPackageModel().getMesRawPackage().getId());
mesRawPartCharging.setFid(UUID.randomUUID().toString());

@ -650,6 +650,12 @@ public class MesWorkOrderService implements IMesWorkOrderService {
oldMesWorkOrder.setModifyDatetime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")).format(new Date()));
workOrderExtService.update(oldMesWorkOrder);
//查询工作中心
DdlPackBean orderPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getNumEqualPack(oldMesWorkOrder.getId(), "id", orderPackBean);
workOrderRepository.updateByProperties(new String[]{"systemSyncStatus"},
new Object[]{CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue()}, orderPackBean);
//保存数据
List<MesProductOffLine> mesProductOffLineList = new ArrayList<>();
MesProductOffLine newMesProductOffLine;

@ -1,5 +1,6 @@
package cn.estsh.i3plus.ext.mes.pcn.pojo.context;
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesEquipmentLog;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
@ -108,7 +109,7 @@ public class MesEquipVariableCollectContext implements Serializable {
//读取信息赋值
public void copyValue(MesEquipmentLog equipmentLog) {
if (null == equipmentLog) return;
BeanUtils.copyProperties(equipmentLog, this);
BeanUtils.copyProperties(equipmentLog, this, MesPcnExtConstWords.CATEGORY_LEVEL_TWO);
this.messageSource = MesExtEnumUtil.CELL_MESSAGE_SOURCE.READ.getValue();
}

@ -213,7 +213,7 @@ public class MesPcnExtConstWords {
// 读取失败睡眠毫秒数[工步参数]
public static final String READ_FAILURE_SLEEP = "READ_FAILURE_SLEEP";
// 读取失败睡眠默认毫秒数
public static final Long READ_FAILURE_SLEEP_DEFAULT_TIME = 2000L;
public static final Long READ_FAILURE_SLEEP_DEFAULT_TIME = 500L;
// 最大重试次数[工步参数]
public static final String MAX_RETRY_TIMES = "MAX_RETRY_TIMES";
// 最大重试次数[工步参数]

Loading…
Cancel
Save