lyh
2025-06-16 24e0bdd24a10449c98013cdb5bcc5e37735f5a91
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java
@@ -19,6 +19,8 @@
import org.jeecg.modules.dnc.response.*;
import org.jeecg.modules.dnc.service.*;
import org.jeecg.modules.dnc.utils.ValidateUtil;
import org.jeecg.modules.mdc.entity.MdcEquipment;
import org.jeecg.modules.mdc.service.IMdcEquipmentService;
import org.jeecg.modules.system.entity.MdcProduction;
import org.jeecg.modules.system.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
@@ -39,8 +41,7 @@
    @Autowired
    private IProcessSpecVersionService processSpecVersionService;
    @Autowired
    @Lazy
    private IDeviceInfoService deviceInfoService;
    private IMdcEquipmentService mdcEquipmentService;
    @Autowired
    private IPermissionStreamNewService permissionStreamNewService;
    @Autowired
@@ -60,7 +61,6 @@
    private IDocInfoService docInfoService;
    @Autowired
    private IDeviceTypeService deviceTypeService;
    @Override
    @Transactional(rollbackFor = {Exception.class})
    public boolean addProcessStream(ProcessStream stream) {
@@ -176,8 +176,8 @@
        boolean b = super.updateById(stream);
        //同步修改结构树
        ProductMix productMix = productMixService.getById(Long.parseLong(id));
        productMix.setName(stream.getProcessName());
        productMix.setCode(stream.getProcessCode());
        productMix.setTreeName(stream.getProcessName());
        productMix.setTreeCode(stream.getProcessCode());
        productMixService.updateById(productMix);
        if(!b)
            ExceptionCast.cast(CommonCode.FAIL);
@@ -259,8 +259,8 @@
    public List<ProcessStream> validateDeviceProcessInfo(String pnCode, String deviceNo) {
        if(!ValidateUtil.validateString(pnCode) || !ValidateUtil.validateString(deviceNo))
            ExceptionCast.cast(CommonCode.INVALID_PARAM);
        DeviceInfo deviceInfo = deviceInfoService.getByDeviceNo(deviceNo);
        if(deviceInfo == null)
        MdcEquipment mdcEquipment = mdcEquipmentService.findEquipmentNameByEquipmentId(deviceNo);
        if(mdcEquipment == null)
            ExceptionCast.cast(DeviceCode.DEVICE_NOT_EXIST);
        PermissionStream stream = componentInfoService.validateComponentOrPartsPnCode(pnCode);
        if(stream == null)