lyh
2025-06-26 898dba8c4a14d5c9e50575e81350afcf1fe3479f
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java
@@ -98,15 +98,23 @@
    private String secretFolder;    //涉密网传输nc文件夹
    @Autowired
    private FileFerryService ferryService;
    @Autowired
    private IDocClassificationService iDocClassificationService;
    @Override
    @Transactional(rollbackFor = {Exception.class})
    public Result applyAssignFile(AssignFileStream stream) {
    public Result<?> applyAssignFile(AssignFileStream stream) {
        synchronized (this){
            //判断设备特殊字符
            String specialChar = getDeviceSpecialChar(stream.getDeviceId(),stream.getFileId());
            if (StrUtil.isNotEmpty(specialChar)){
                //抛出特殊字符异常
                return Result.error("文件名称存在设备特殊字符");
            }
            //查询文档的状态,批准状态才可以指派
            DocInfo docInfo=getDocInfo(stream);
            DocClassification docClassification=iDocClassificationService.getById(docInfo.getClassificationId());
            if (docInfo.getDocDispatchStatus()!=null&&docInfo.getDocDispatchStatus()!=3&&docClassification.getClassificationCode().equals("nc")){
                return Result.error("该文件状态不允许指派,请先完成审签流程");
            }
            if(flowableEnable) {
                return applyAssignFileActive(stream);
@@ -258,9 +266,9 @@
        }
        handleFileTransfer(mdcEquipment, docFile);
        //NC文件的拷贝
        handleFileProcessing(docFile, mdcEquipment, secretFolder);
//        handleFileProcessing(docFile, mdcEquipment, secretFolder);
        //对应产品结构树拷贝
        handleProductTree(docInfo,docRelativeList.get(0),mdcEquipment.getEquipmentId());
//        handleProductTree(docInfo,docRelativeList.get(0),mdcEquipment.getEquipmentId());
        synchronizedFlagService.updateFlag(2);
        return Result.OK("操作成功");
    }
@@ -397,9 +405,9 @@
            //涉密网进行NC文件的拷贝
            handleFileTransfer(mdcEquipment, docFile);
            //NC文件的拷贝
            handleFileProcessing(docFile, mdcEquipment, secretFolder);
//            handleFileProcessing(docFile, mdcEquipment, secretFolder);
            //对应产品结构树拷贝
            handleProductTree(docInfo,docRelativeList.get(0),mdcEquipment.getEquipmentId());
//            handleProductTree(docInfo,docRelativeList.get(0),mdcEquipment.getEquipmentId());
            return synchronizedFlagService.updateFlag(1);
        }else if(up.getStatus() == 3) {
            //拒绝操作 什么也不做