lyh
2025-06-25 6d44fa56ae000ecc3b34c681e16d721789c1f49e
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/PartsInfoServiceImpl.java
@@ -48,6 +48,10 @@
    @Autowired
    private IProcessSpecVersionService processSpecVersionService;
    @Autowired
    private IProcessStreamService processStreamService;
    @Autowired
    private IWorkStepService workStepService;
    @Autowired
    private IDocRelativeService iDocRelativeService;
    @Autowired
    private IProductPermissionService productPermissionService;
@@ -147,8 +151,8 @@
        boolean b = super.updateById(partsInfo);
        //同步修改结构树
        ProductMix productMix = productMixService.getById(Long.parseLong(id));
        productMix.setName(partsInfo.getPartsName());
        productMix.setCode(partsInfo.getPartsCode());
        productMix.setTreeName(partsInfo.getPartsName());
        productMix.setTreeCode(partsInfo.getPartsCode());
        productMixService.updateById(productMix);
        if(!b)
            return false;
@@ -481,9 +485,33 @@
            List<String> id =new ArrayList<>();
            id.add(treeInfoRequest.getAttributionId());
            treeInfoRequest.setPartsIds(id);
            //工艺规程版本
            List<DocInfo> processSpecVersions = processSpecVersionService.getByProcessSpecVersion(treeInfoRequest);
            docInfos.addAll(processSpecVersions);
            //工序
            List<DocInfo> processStreams = processStreamService.getByProcessStreamOtherFile(treeInfoRequest);
            docInfos.addAll(processStreams);
            //工步
            List<DocInfo> workSteps = workStepService.getByWorkStepOtherFile(treeInfoRequest);
            docInfos.addAll(workSteps);
        }
        return docInfos;
    }
    @Override
    public boolean assignPermission(Object entity, Collection<SysUser> userList, boolean isAdd){
        if (isAdd) {
            return assignAddUser((PartsInfo) entity, userList);
        } else {
            return assignRemoveUser((PartsInfo) entity, userList);
        }
    }
    @Override
    public boolean assignDepartPermission(Object entity, Collection<MdcProduction> departments, boolean isAdd) {
        if (isAdd) {
            return assignAddDepart((PartsInfo) entity, departments);
        } else {
            return assignRemoveDepart((PartsInfo) entity, departments);
        }
    }
}