Lius
2025-08-07 f3a7d211a4a616d8ed2a08b103d8d162f06d389e
Merge remote-tracking branch 'origin/master'
已修改5个文件
32 ■■■■■ 文件已修改
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java
@@ -101,10 +101,15 @@
            ExceptionCast.cast(DocumentCode.DOC_CLASS_ERROR);
        String fileName = FileUtilS.getFilenameNonSuffix(file.getOriginalFilename());
        String fileNameAll = file.getOriginalFilename();
        DocInfo en = findByAttrAndDocName(fileName, uploadRequest.getAttributionType(), uploadRequest.getAttributionId());
        List<DocInfo> docInfoList = super.getBaseMapper().findByAttrAndDocName(fileName, uploadRequest.getAttributionType(), uploadRequest.getAttributionId());
        //针对存在的处理
        if(en != null)
            ExceptionCast.cast(DocumentCode.DOC_IS_EXIST);
        if(docInfoList != null){
            docInfoList.forEach(item->{
                if (item.getClassificationId().equals(docClass.getClassificationId())) {
                    ExceptionCast.cast(DocumentCode.DOC_IS_EXIST);
                }
            });
        }
        FileUploadResult fileUploadResult = FileUtilS.uploadFile(file);
        if(fileUploadResult == null)
            ExceptionCast.cast(DocumentCode.DOC_UPLOAD_ERROR);
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java
@@ -241,7 +241,7 @@
                                    .eq("data_id", guideCardBatch.getId())
                    );
                    if (businessList.isEmpty()) {
                        return Result.error("流程记录不存在");
                        return null;
                    }
                    FlowMyBusiness flowMyBusiness = businessList.get(0);
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java
@@ -240,9 +240,8 @@
     @AutoLog(value = "文档表-定型流程发起")
     @ApiOperation(value = "文档表-定型流程发起", notes = "文档表-定型流程发起")
     @PostMapping("/submitProccess")
     public ResponseResult submitProccess(@RequestBody DispatchFile dispatchFile) {
         dispatchFileService.submitProccess(dispatchFile);
         return new ResponseResult(CommonCode.SUCCESS);
     public Result<?> submitProccess(@RequestBody DispatchFile dispatchFile) {
         return dispatchFileService.submitProccess(dispatchFile);
     }
     @AutoLog(value = "文档表-信息查询")
     @ApiOperation(value = "文档表-信息查询", notes = "文档表-信息查询")
lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java
@@ -182,14 +182,13 @@
        validateParams(stream);
        DocInfo docInfo = getDocInfo(stream);
        MdcEquipment mdcEquipment = getMdcEquipment(stream);
        DocFile docFile = docFileService.getById(stream.getFileId());
        DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(stream.getDocId(), 7, stream.getDeviceId());
        if (deviceDoc != null) {
            handleExistingDeviceDoc(docFile, mdcEquipment, stream.getDeviceId());
            return Result.error("存在相同文档,不允许重复指派,请删除后指派");
        }
        deviceDoc = docInfoService.findByAttrAndDocName(docInfo.getDocName(), 7, stream.getDeviceId());
        if (deviceDoc != null) {
            handleExistingDeviceDoc(docFile, mdcEquipment, stream.getDeviceId());
            return Result.error("存在相同文档,不允许重复指派,请删除后指派");
        }
        PermissionStreamNew permissionStreams = getPermissionStreams(stream);
        if (permissionStreams==null){
@@ -199,7 +198,7 @@
        String userId = user.getId();
        saveBusinessObject(stream, userId);
        System.out.println("指派NC文档到设备流程:" + stream.getDocId());
        flowCommonService.initActBusiness("指派NC文档到设备流程:" +docInfo.getDocName()+"."+docInfo.getDocSuffix()+"到设备->"+mdcEquipment.getEquipmentName() ,
        flowCommonService.initActBusiness("指派NC文档到设备流程:" +docInfo.getDocName()+"."+docInfo.getDocSuffix()+"到设备->"+mdcEquipment.getEquipmentId() ,
                stream.getStreamId(), "IAssignFileStreamService", "assign_nc_to_device", null);
        Map<String, Object> variables = new HashMap<>();
        variables.put("dataId", stream.getStreamId());
@@ -532,16 +531,16 @@
    }
    //获取文件
    private void handleExistingDeviceDoc(DocFile docFile, MdcEquipment mdcEquipment, String deviceId) {
    private void handleExistingDeviceDoc(DocInfo docInfo,DocFile docFile, MdcEquipment mdcEquipment, String deviceId) {
        List<String> strings = iMdcProductionService.findListParentTreeAll(mdcEquipment.getId());
        if (strings != null && !strings.isEmpty()) {
            String path = StringUtils.join(strings.toArray(), "/");
            boolean copyFileNc = FileUtilS.copyFileNcToBak(path + "/" + mdcEquipment.getEquipmentId(),
                    docFile.getFileName(), docFile.getFileSuffix());
            if (!copyFileNc) {
                ExceptionCast.cast(ActivitiCode.ACT_FILE_ERROR);
                ExceptionCast.cast(ActivitiCode.ACT_DEVICE_DOC_ERROR);
            } else {
                DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(deviceId, 7, deviceId);
                DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(docInfo.getDocId(), 7, deviceId);
                boolean doc = docRelativeService.deleteDocByAttr(deviceDoc.getDocId(), 7, deviceId);
                if (!doc) {
                    ExceptionCast.cast(ActivitiCode.ACT_DOC_ERROR_DELEVE);
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java
@@ -367,6 +367,7 @@
                }
                entity.setUnsealApprovalUser(user.getUsername());
                entity.setUnsealApprovalComment(request.getUnsealApprovalComment());
                entity.setUnsealApprovalDealType(request.getUnsealApprovalDealType());
                entity.setUnsealApprovalTime(new Date());
                // 修改设备状态
                equipment.setAssetStatus(AssetStatusEnum.NORMAL.name());