Преглед изворни кода

Merge remote-tracking branch 'origin/dev1.0' into dev1.0

zhangc пре 7 месеци
родитељ
комит
cd03a53363
15 измењених фајлова са 279 додато и 55 уклоњено
  1. 2 0
      src/main/java/com/sunxung/factoring/dict/impl/FileModuleDict.java
  2. 10 0
      src/main/java/com/sunxung/factoring/entity/entprise/Enterprise.java
  3. 9 6
      src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractElectronicInfoServiceImpl.java
  4. 1 1
      src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractServiceImpl.java
  5. 8 0
      src/main/java/com/sunxung/factoring/service/salescontractmanagement/SalesContractService.java
  6. 145 25
      src/main/java/com/sunxung/factoring/service/salescontractmanagement/impl/SalesContractServiceImpl.java
  7. 5 0
      src/main/java/com/sunxung/factoring/service/supplier/impl/SupplierInfoServiceImpl.java
  8. 6 0
      src/main/java/com/sunxung/factoring/service/sys/ClientUserService.java
  9. 5 0
      src/main/java/com/sunxung/factoring/service/sys/impl/ClientUserServiceImpl.java
  10. 0 17
      src/main/java/com/sunxung/factoring/web/purchcontractmanagement/PurchContractConfirmController.java
  11. 19 0
      src/main/java/com/sunxung/factoring/web/purchcontractmanagement/PurchContractController.java
  12. 14 1
      src/main/java/com/sunxung/factoring/web/salescontractmanagement/SalesContractController.java
  13. 11 0
      src/main/java/com/sunxung/factoring/web/sys/ClientUserController.java
  14. 7 5
      src/main/java/com/sunxung/factoring/web/sys/FileStorageController.java
  15. 37 0
      src/main/resources/data/update/v1.0/20231117liutao.sql

+ 2 - 0
src/main/java/com/sunxung/factoring/dict/impl/FileModuleDict.java

@@ -58,6 +58,8 @@ public class FileModuleDict extends Dict {
         PROJECT_CORE_ENTERPRISE_FILE("projectCoreEnterpriseFile","项目核心企业历史合作资料"),
         PROJECT_CORE_ENTERPRISE_FILE_HISTORY("projectCoreEnterpriseFileHistory","项目核心企业历史合作资料历史"),
 
+        ENTERPRISE_CREDIT_AUTHORIZATION_LETTER_HISTORY("enterpriseCreditAuthorizationLetterHistory","企业征信授权书历史"),
+
         RECONSIDER_ADJUST_FILE("reconsiderAdjustFile","授信决议,福已调整文件"),
         /**
          * 招投标管理-招标文件

+ 10 - 0
src/main/java/com/sunxung/factoring/entity/entprise/Enterprise.java

@@ -261,6 +261,16 @@ public class Enterprise extends BaseEntity {
     @TableField(exist = false)
     private List<CAssociatedEnterpriseInfoHistory> associatedEnterpriseInfos;
 
+    @TableField(exist = false)
+    private FileStorageDO fileStorageDO;
+
+    public FileStorageDO getFileStorageDO() {
+        return fileStorageDO;
+    }
+
+    public void setFileStorageDO(FileStorageDO fileStorageDO) {
+        this.fileStorageDO = fileStorageDO;
+    }
 
     public String getCertificateTransactionId() {
         return certificateTransactionId;

+ 9 - 6
src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractElectronicInfoServiceImpl.java

@@ -664,7 +664,7 @@ public class PurchContractElectronicInfoServiceImpl extends ServiceImpl<PurchCon
         fileName = new String(fileName.getBytes("UTF-8"), "ISO8859-1");
         res.setContentType("application/zip");
         res.setHeader("Content-disposition", String.format("attachment; filename=" + fileName));
-        PurchContractManagement purchContractManagement = purchContractService.getById(managerId);
+        PurchContractManagement purchContractManagement = purchContractService.get(managerId);
         PurchContractBasicInfo purchContractBasicInfo = purchContractBasicInfoService.findByBusinessNumberAndSupplierId(purchContractManagement.getBusinessNumber(), purchContractManagement.getSupplierId());
         AttachmentDto attachmentDto = AttachmentDto.builder()
                 .setEntityId(purchContractBasicInfo.getId())
@@ -683,12 +683,15 @@ public class PurchContractElectronicInfoServiceImpl extends ServiceImpl<PurchCon
         for (AttachmentDto attachmentDtoChange : attachmentDtoChanges) {
             fileStorages.addAll(sysAttachmentRefService.getFiles(attachmentDtoChange));
         }
-        List<File> files = new ArrayList<>();
-        for (FileStorage fileStorage : fileStorages) {
-            File file = new File(fileStorage.getAbsolutePath());
-            files.add(file);
+
+        if (CollectionUtil.isEmpty(fileStorages)) {
+            throw new BusinessException(CodeUtil.FAIL, "为查询到出证文件!");
         }
-        ZipUtils.toZip(files, res.getOutputStream());
+        //文件名去重
+        fileStorageService.renameFileStorageList(fileStorages);
+        //打包下载文件
+        fileStorageService.downloadZipFile(fileStorages, FileModuleDict.ChildEnum.SALES_CONTRACT_ZIP_FILE.getCname(),
+                FileModuleDict.ChildEnum.SALES_CONTRACT_ZIP_FILE, res);
         return null;
     }
 

+ 1 - 1
src/main/java/com/sunxung/factoring/service/purchcontractmanagement/impl/PurchContractServiceImpl.java

@@ -600,7 +600,7 @@ public class PurchContractServiceImpl extends ServiceImpl<PurchContractMapper, P
                 .setEntityId(basicInfo.getId()).setChildEnum(FileModuleDict.ChildEnum.PURCHASE_CONTRACT_SIGN_FILE).build()));
 
         List<PurchContractSupplementInfo> contractSupplementInfos = purchContractSupplementInfoService
-                .list(new QueryWrapper<PurchContractSupplementInfo>().eq("purch_contract_management_id", id));
+                .list(new QueryWrapper<PurchContractSupplementInfo>().eq("c_purch_contract_management_id", id));
 
         if (CollectionUtil.isNotEmpty(contractSupplementInfos)) {
             contractSupplementInfos.stream().forEach(contractSupplementInfo -> {

+ 8 - 0
src/main/java/com/sunxung/factoring/service/salescontractmanagement/SalesContractService.java

@@ -10,6 +10,7 @@ import com.sunxung.factoring.entity.salescontractmanagement.vo.SalesContractBasi
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.List;
 
 /**
@@ -113,6 +114,13 @@ public interface SalesContractService extends IService<CSalesContract> {
      */
     void downloadAllSalesContractFile(Long id,HttpServletResponse response);
 
+    /**
+     * 出证下载
+     * @param id
+     * @param res
+     */
+    void downloadReportUrl(Long id, HttpServletResponse res) throws IOException;
+
     /**
      * 获取审核需要的信息
      * @param businessKey

+ 145 - 25
src/main/java/com/sunxung/factoring/service/salescontractmanagement/impl/SalesContractServiceImpl.java

@@ -8,8 +8,6 @@ import com.sunxung.factoring.component.exception.ValidatorException;
 import com.sunxung.factoring.component.util.*;
 import com.sunxung.factoring.dict.impl.FileModuleDict;
 import com.sunxung.factoring.dict.impl.ProjectInitiationStatusDict;
-import com.sunxung.factoring.dict.impl.SalesContractStatusDict;
-import com.sunxung.factoring.entity.project.BusinessAssignee;
 import com.sunxung.factoring.entity.project.BusinessProcessingLog;
 import com.sunxung.factoring.entity.project.ProjectInformation;
 import com.sunxung.factoring.entity.project.vo.BusinessProcessingTaskVo;
@@ -22,14 +20,12 @@ import com.sunxung.factoring.entity.sys.FileStorage;
 import com.sunxung.factoring.entity.sys.FileStorageDO;
 import com.sunxung.factoring.entity.sys.User;
 import com.sunxung.factoring.mapper.salescontractmanagement.SalesContractMapper;
-import com.sunxung.factoring.service.project.BusinessAssigneeService;
 import com.sunxung.factoring.service.project.BusinessProcessingLogService;
 import com.sunxung.factoring.service.project.IProjectInformationService;
 import com.sunxung.factoring.service.salescontractmanagement.*;
 import com.sunxung.factoring.service.sys.*;
 import com.sunxung.factoring.service.sys.dto.AttachmentDto;
 import com.sunxung.factoring.service.sys.flowable.FlowableService;
-import org.apache.commons.lang3.StringUtils;
 import org.flowable.engine.runtime.ProcessInstance;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.ClassPathResource;
@@ -66,9 +62,6 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, C
     @Autowired
     private DictionaryService dictService;
 
-    @Autowired
-    private BusinessAssigneeService assigneeService;
-
     @Autowired
     private FlowableService flowableService;
 
@@ -96,6 +89,21 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, C
     @Autowired
     private ISalesContractSupplementInfoService salesContractSupplementInfoService;
 
+    @Autowired
+    private ICSalesSignConfirmationService salesSignConfirmationService;
+
+    @Autowired
+    private ICSalesSignConfirmationElectronicInfoService signConfirmationElectronicInfoService;
+
+    @Autowired
+    private ICSalesContractSupplementBasicInfoService salesContractSupplementBasicInfoService;
+
+    @Autowired
+    private ICSalesSupplementSignConfirmationService salesSupplementSignConfirmationService;
+
+    @Autowired
+    private ICSalesSupplementSignConfirmationElectronicInfoService salesSupplementSignConfirmationElectronicInfoService;
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void doCreate(CSalesContract salesContractManagement) {
@@ -118,8 +126,8 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, C
             //开启流程
             startSalesContractProcess(salesContractManagement);
             //变更项目的是否已做销售合同标识
-            projectInformationService.lambdaUpdate().set(ProjectInformation::getSales,1)
-                    .eq(ProjectInformation::getBusinessNumber,salesContractManagement.getBusinessNumber())
+            projectInformationService.lambdaUpdate().set(ProjectInformation::getSales, 1)
+                    .eq(ProjectInformation::getBusinessNumber, salesContractManagement.getBusinessNumber())
                     .update();
         } else {
             updateById(salesContractManagement);
@@ -172,7 +180,6 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, C
     }
 
 
-
     @Override
     public List<BusinessProcessingTaskVo> findMyCompletedList(SearchBusinessProcessingTask search) {
         return baseMapper.findMyCompletedList(search);
@@ -187,11 +194,11 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, C
                 BusinessProcessingLog log = businessProcessingLogService.getByBusinessTypeBusinessKey(search.getSimpleClassName(), r.getId());
                 if (log != null && log.getEndTime() == null) {
                     String taskName = log.getTaskName();
-                    if (taskName.contains("创建") || taskName.contains("录入") || taskName.contains("签署确认")){
+                    if (taskName.contains("创建") || taskName.contains("录入") || taskName.contains("签署确认")) {
                         r.setExecutor("供应商");
-                    }else if (taskName.contains("初审") || taskName.contains("审核") || taskName.contains("签署确认审核")){
+                    } else if (taskName.contains("初审") || taskName.contains("审核") || taskName.contains("签署确认审核")) {
                         r.setExecutor("法务专员");
-                    } else if (taskName.contains("模板复审")){
+                    } else if (taskName.contains("模板复审")) {
                         r.setExecutor("法务经理");
                     }
                 }
@@ -369,24 +376,80 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, C
 
     @Override
     public void downloadAllSalesContractFile(Long id, HttpServletResponse response) {
-        List<FileStorage> salesContractAllFile = new ArrayList<>();
-
-        CSalesContractBasicInfo basicInfo = salesContractBasicInfoService
-                .lambdaQuery().eq(CSalesContractBasicInfo::getcSalesContractManagementId,id).one();
-        //销售合同文件
-        List<FileStorage> salesContractFile = attachmentRefService.getFiles(AttachmentDto.builder()
-                .setChildEnum(FileModuleDict.ChildEnum.SALES_CONTRACT_FILE).setEntityId(basicInfo.getId()).build());
-        salesContractAllFile.addAll(salesContractFile);
 
+        List<FileStorage> salesContractAllFile = new ArrayList<>();
+        CSalesContract salesContractManagement = get(id);
+        CSalesContractBasicInfo salesContractBasicInfo = salesContractBasicInfoService
+                .getOne(new QueryWrapper<CSalesContractBasicInfo>().eq("c_sales_contract_management_id", id));
+        //销售合同原件
+        //合同文件
+        List<FileStorageDO> fileStorageDOS = fileService.findByBusinessId(salesContractBasicInfo.getId(), FileModuleDict.ChildEnum.SALES_CONTRACT_FILE.getCode());
+        if (CollectionUtil.isNotEmpty(fileStorageDOS)) {
+            fileStorageDOS.forEach(fileStorageDO -> {
+                FileStorage fileStorage = new FileStorage();
+                fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
+                fileStorage.setName(fileStorageDO.getOriginalName());
+                fileStorage.setPath(fileStorageDO.getPath());
+                fileStorage.setId(fileStorageDO.getId());
+                fileStorage.setOriginalName(fileStorageDO.getOriginalName());
+                salesContractAllFile.add(fileStorage);
+            });
+        }
+        //已签署的文件
+        CSalesSignConfirmation salesSignConfirmation = salesSignConfirmationService
+                .lambdaQuery().eq(CSalesSignConfirmation::getcSalesContractManagementId, id).one();
+        if (salesSignConfirmation != null) {
+            List<CSalesSignConfirmationElectronicInfo> signElectronicInfos = signConfirmationElectronicInfoService
+                    .list(new QueryWrapper<CSalesSignConfirmationElectronicInfo>().eq("c_sales_sign_confirmation_id", salesSignConfirmation.getId()));
+            if (CollectionUtil.isNotEmpty(signElectronicInfos)) {
+                signElectronicInfos.forEach(signElectronicInfo -> {
+                    salesContractAllFile.addAll(attachmentRefService.getFiles(AttachmentDto.builder()
+                            .setChildEnum(FileModuleDict.ChildEnum.SIGN_CONFIRM_BACK_FILE).setEntityId(signElectronicInfo.getId()).build()));
+                });
+            }
+        }
         //销售合同补充文件
         List<CSalesContractSupplementInfo> salesContractSupplementInfos = salesContractSupplementInfoService
-                .lambdaQuery().eq(CSalesContractSupplementInfo::getcSalesContractManagementId,id).list();
+                .list(new QueryWrapper<CSalesContractSupplementInfo>().eq("c_sales_contract_management_id", salesContractManagement.getId()));
         if (CollectionUtil.isNotEmpty(salesContractSupplementInfos)) {
             salesContractSupplementInfos.stream().forEach(s -> {
-                List<FileStorage> salesContractSupplementFiles = attachmentRefService.getFiles(AttachmentDto.builder()
-                        .setChildEnum(FileModuleDict.ChildEnum.SALES_CONTRACT_SUPPLEMENT_FILE).setEntityId(s.getId()).build());
-                salesContractAllFile.addAll(salesContractSupplementFiles);
+                if (salesContractManagement.getContractStatus().equals(ProjectInitiationStatusDict.ChildEnum.COMPLETED.getCode())) {
+
+                    //补充合同原件
+                    CSalesContractSupplementBasicInfo salesContractSupplementBasicInfo = salesContractSupplementBasicInfoService.lambdaQuery()
+                            .eq(CSalesContractSupplementBasicInfo::getcSalesContractSupplementInfoId, s.getId())
+                            .one();
+                    List<FileStorageDO> SupplementFileStorageDOS = fileService.findByBusinessId(salesContractSupplementBasicInfo.getId(),
+                            FileModuleDict.ChildEnum.SALES_CONTRACT_SUPPLEMENT_CONTRACT_FILE.getCode());
+                    if (CollectionUtil.isNotEmpty(SupplementFileStorageDOS)) {
+                        SupplementFileStorageDOS.forEach(fileStorageDO -> {
+                            FileStorage fileStorage = new FileStorage();
+                            fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
+                            fileStorage.setName(fileStorageDO.getOriginalName());
+                            fileStorage.setPath(fileStorageDO.getPath());
+                            fileStorage.setId(fileStorageDO.getId());
+                            fileStorage.setOriginalName(fileStorageDO.getOriginalName());
+                            salesContractAllFile.add(fileStorage);
+                        });
+                    }
+
+                    CSalesSupplementSignConfirmation salesSupplementSignConfirmation = salesSupplementSignConfirmationService
+                            .lambdaQuery().eq(CSalesSupplementSignConfirmation::getcSalesContractSupplementInfoId, s.getId()).one();
+                    if (salesSupplementSignConfirmation != null) {
+                        List<CSalesSupplementSignConfirmationElectronicInfo> supplementSignConfirmationElectronicInfos = salesSupplementSignConfirmationElectronicInfoService
+                                .lambdaQuery().eq(CSalesSupplementSignConfirmationElectronicInfo::getcSalesSupplementSignConfirmationId, salesSupplementSignConfirmation.getId()).list();
+                        if (CollectionUtil.isNotEmpty(supplementSignConfirmationElectronicInfos)) {
+                            //获取销售合同补充签署的附件
+                            supplementSignConfirmationElectronicInfos.forEach(supplementSignConfirmationElectronicInfo -> {
+                                List<FileStorage> salesContractSupplementFiles = attachmentRefService.getFiles(AttachmentDto.builder()
+                                        .setChildEnum(FileModuleDict.ChildEnum.SALES_SUPPLEMENT_SIGN_CONFIRM_BACK_FILE)
+                                        .setEntityId(supplementSignConfirmationElectronicInfo.getId()).build());
+                                salesContractAllFile.addAll(salesContractSupplementFiles);
+                            });
+                        }
 
+                    }
+                }
             });
         }
 
@@ -397,5 +460,62 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, C
                 FileModuleDict.ChildEnum.SALES_CONTRACT_ZIP_FILE, response);
     }
 
+    @Override
+    public void downloadReportUrl(Long id, HttpServletResponse res) throws IOException {
+
+        List<FileStorage> salesReportFiles = new ArrayList<>();
+
+        CSalesContract cSalesContract = get(id);
+        CSalesSignConfirmation salesSignConfirmation = salesSignConfirmationService
+                .lambdaQuery().eq(CSalesSignConfirmation::getcSalesContractManagementId, id).one();
+        //销售合同 出证文件
+        if (salesSignConfirmation != null) {
+            List<CSalesSignConfirmationElectronicInfo> signElectronicInfos = signConfirmationElectronicInfoService
+                    .list(new QueryWrapper<CSalesSignConfirmationElectronicInfo>().eq("c_sales_sign_confirmation_id", salesSignConfirmation.getId()));
+            if (CollectionUtil.isNotEmpty(signElectronicInfos)) {
+                signElectronicInfos.forEach(signElectronicInfo -> {
+                    salesReportFiles.addAll(attachmentRefService.getFiles(AttachmentDto.builder()
+                            .setChildEnum(FileModuleDict.ChildEnum.SIGN_CONFIRM_BACK_FILE).setEntityId(signElectronicInfo.getId()).build()));
+                });
+            }
+        }
+
+        //销售合同变更 出证文件
+        List<CSalesContractSupplementInfo> salesContractSupplementInfos = salesContractSupplementInfoService
+                .list(new QueryWrapper<CSalesContractSupplementInfo>().eq("c_sales_contract_management_id", id));
+        if (CollectionUtil.isNotEmpty(salesContractSupplementInfos)) {
+            salesContractSupplementInfos.stream().forEach(s -> {
+                if (cSalesContract.getContractStatus().equals(ProjectInitiationStatusDict.ChildEnum.COMPLETED.getCode())) {
+
+                    CSalesSupplementSignConfirmation salesSupplementSignConfirmation = salesSupplementSignConfirmationService
+                            .lambdaQuery().eq(CSalesSupplementSignConfirmation::getcSalesContractSupplementInfoId, s.getId()).one();
+                    if (salesSupplementSignConfirmation != null) {
+                        List<CSalesSupplementSignConfirmationElectronicInfo> supplementSignConfirmationElectronicInfos = salesSupplementSignConfirmationElectronicInfoService
+                                .lambdaQuery().eq(CSalesSupplementSignConfirmationElectronicInfo::getcSalesSupplementSignConfirmationId, salesSupplementSignConfirmation.getId()).list();
+                        if (CollectionUtil.isNotEmpty(supplementSignConfirmationElectronicInfos)) {
+                            supplementSignConfirmationElectronicInfos.forEach(supplementSignConfirmationElectronicInfo -> {
+                                List<FileStorage> salesContractSupplementFiles = attachmentRefService.getFiles(AttachmentDto.builder()
+                                        .setChildEnum(FileModuleDict.ChildEnum.SSALES_SUPPLEMENT_SIGN_CONFIRM_BACK_REPORT_FILE)
+                                        .setEntityId(supplementSignConfirmationElectronicInfo.getId()).build());
+                                salesReportFiles.addAll(salesContractSupplementFiles);
+                            });
+                        }
+
+                    }
+                }
+            });
+        }
+
+        if (CollectionUtil.isEmpty(salesReportFiles)) {
+            throw new BusinessException(CodeUtil.FAIL, "为查询到出证文件!");
+        }
+
+        //文件名去重
+        fileStorageService.renameFileStorageList(salesReportFiles);
+        //打包下载文件
+        fileStorageService.downloadZipFile(salesReportFiles, FileModuleDict.ChildEnum.SALES_CONTRACT_ZIP_FILE.getCname(),
+                FileModuleDict.ChildEnum.SALES_CONTRACT_ZIP_FILE, res);
+    }
+
 }
 

+ 5 - 0
src/main/java/com/sunxung/factoring/service/supplier/impl/SupplierInfoServiceImpl.java

@@ -374,6 +374,11 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
         enterprise.setSalesDocumentsInfos(cSalesDocumentsInfoHistories);
         List<CAssociatedEnterpriseInfoHistory> cAssociatedEnterpriseInfoHistories = associatedEnterpriseInfoHistoryService.lambdaQuery().eq(CAssociatedEnterpriseInfoHistory::getcEnterpriseHistoryId, enterpriseHistory.getId()).list();
         enterprise.setAssociatedEnterpriseInfos(cAssociatedEnterpriseInfoHistories);
+        //征信授权书
+        List<FileStorageDO> fileStorageDOS = fileService.findByBusinessId(enterpriseHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_CREDIT_AUTHORIZATION_LETTER_HISTORY.getCode());
+        if(CollectionUtil.isNotEmpty(fileStorageDOS)){
+            enterprise.setFileStorageDO(fileStorageDOS.get(0));
+        }
     }
 
     @Override

+ 6 - 0
src/main/java/com/sunxung/factoring/service/sys/ClientUserService.java

@@ -32,4 +32,10 @@ public interface ClientUserService extends IService<ClientUserDO> {
   List<CommonVO> getRMs();
 
   void systemDistribute() throws ParseException;
+
+  /**
+   * 重置C端用户密码
+   * @param clientUserId
+   */
+    void resetPassword(Long clientUserId);
 }

+ 5 - 0
src/main/java/com/sunxung/factoring/service/sys/impl/ClientUserServiceImpl.java

@@ -257,4 +257,9 @@ public class ClientUserServiceImpl extends ServiceImpl<ClientUserMapper, ClientU
       }
     }
   }
+
+  @Override
+  public void resetPassword(Long clientUserId) {
+    lambdaUpdate().eq(ClientUserDO::getId,clientUserId).set(ClientUserDO::getPassword,"686650D2C058A32CA4990FF17362DE795051EF7CC60A8158BF986087").update();
+  }
 }

+ 0 - 17
src/main/java/com/sunxung/factoring/web/purchcontractmanagement/PurchContractConfirmController.java

@@ -205,23 +205,6 @@ public class PurchContractConfirmController {
         }
     }
 
-
-
-
-    /**
-     * 下载出证
-     *
-     * @param managerId
-     * @param res
-     * @return
-     */
-    @RequestMapping("/downloadReportUrl")
-    @ResponseBody
-    @OperationLog(operationModule = "采购合同",operationType = OperationTypeEnum.OTHER,description = "下载出证")
-    public ResponseEntity<Object> downloadReportUrl(Long managerId, HttpServletResponse res) throws IOException {
-        return purchContractElectronicInfoService.downloadReportUrl(managerId, res);
-    }
-
     /**
      * 获取认证信息
      *

+ 19 - 0
src/main/java/com/sunxung/factoring/web/purchcontractmanagement/PurchContractController.java

@@ -6,14 +6,17 @@ import com.sunxung.factoring.entity.GridPage;
 import com.sunxung.factoring.entity.ResponseJson;
 import com.sunxung.factoring.entity.purchcontractmanagement.vo.PurchContractVo;
 import com.sunxung.factoring.entity.purchcontractmanagement.vo.SearchGoods;
+import com.sunxung.factoring.service.purchcontractmanagement.PurchContractElectronicInfoService;
 import com.sunxung.factoring.service.purchcontractmanagement.PurchContractService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * @Description : 采购合同管理控制层
@@ -26,6 +29,8 @@ public class PurchContractController {
 
     @Autowired
     private PurchContractService purchContractService;
+    @Autowired
+    private PurchContractElectronicInfoService purchContractElectronicInfoService;
 
 
 //    /**
@@ -61,4 +66,18 @@ public class PurchContractController {
         purchContractService.downloadAllPurchFile(id,response);
     }
 
+    /**
+     * 下载出证
+     *
+     * @param id
+     * @param res
+     * @return
+     */
+    @GetMapping("/downloadReportUrl")
+    @ResponseBody
+    @OperationLog(operationModule = "采购合同",operationType = OperationTypeEnum.OTHER,description = "下载采购合同出证文件")
+    public ResponseEntity<Object> downloadPurchReport(Long id, HttpServletResponse res) throws IOException {
+        return purchContractElectronicInfoService.downloadReportUrl(id, res);
+    }
+
 }

+ 14 - 1
src/main/java/com/sunxung/factoring/web/salescontractmanagement/SalesContractController.java

@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * @Description : 销售合同管理控制层
@@ -121,12 +122,24 @@ public class SalesContractController {
      * @param id
      * @param response
      */
-    @GetMapping("/downloadAllSalesContractFile")
+    @GetMapping("/downloadAllSalesFile")
     @OperationLog(operationModule = "销售合同", operationType = OperationTypeEnum.OTHER, description = "下载所有销售合同文件")
     public void downloadAllSalesContractFile(Long id, HttpServletResponse response) {
         salesContractService.downloadAllSalesContractFile(id, response);
     }
 
+    /**
+     * 下载销售合同出证文件
+     *
+     * @param id
+     * @param response
+     */
+    @GetMapping("/downloadSalesReport")
+    @OperationLog(operationModule = "销售合同", operationType = OperationTypeEnum.OTHER, description = "下载所有销售合同出证文件")
+    public void downloadSalesReport(Long id, HttpServletResponse response) throws IOException {
+        salesContractService.downloadReportUrl(id, response);
+    }
+
     /**
      * 销售合同变更签署审核-详情
      * @param id

+ 11 - 0
src/main/java/com/sunxung/factoring/web/sys/ClientUserController.java

@@ -3,6 +3,7 @@ package com.sunxung.factoring.web.sys;
 
 import com.sunxung.factoring.entity.CommonVO;
 import com.sunxung.factoring.entity.GridPage;
+import com.sunxung.factoring.entity.ResponseJson;
 import com.sunxung.factoring.entity.sys.request.ClientUserQueryRequest;
 import com.sunxung.factoring.entity.sys.request.DistributePMRequest;
 import com.sunxung.factoring.entity.sys.request.DistributeRMRequest;
@@ -119,4 +120,14 @@ public class ClientUserController {
     return rMs;
   }
 
+  /**
+   * 重置密码 a123456
+   * @return
+   */
+  @GetMapping("resetPassword")
+  public ResponseJson resetPassword(@RequestParam Long clientUserId) {
+    clientUserService.resetPassword(clientUserId);
+    return new ResponseJson();
+  }
+
 }

+ 7 - 5
src/main/java/com/sunxung/factoring/web/sys/FileStorageController.java

@@ -77,7 +77,7 @@ public class FileStorageController {
 
     @RequestMapping(value = "/fileStorage/getUeconfig")
     @ResponseBody
-    public void ueditor(HttpServletResponse response) {
+    public String ueditor(HttpServletResponse response) {
         InputStream is = null;
         response.setHeader("Content-Type", "text/html");
         try {
@@ -90,9 +90,10 @@ public class FileStorageController {
             }
             String result = sb.toString().replaceAll("/\\*(.|[\\r\\n])*?\\*/", "");
             JSONObject json = JSON.parseObject(result);
-            System.out.println(json.toJSONString());
-            PrintWriter out = response.getWriter();
-            out.print(json.toString());
+            return json.toJSONString();
+//            System.out.println(json.toJSONString());
+//            PrintWriter out = response.getWriter();
+//            out.print(json.toString());
         } catch (IOException e) {
             e.printStackTrace();
         } finally {
@@ -102,7 +103,7 @@ public class FileStorageController {
                 e.printStackTrace();
             }
         }
-        // return result;
+        return null;
     }
 
     /**
@@ -310,6 +311,7 @@ public class FileStorageController {
 
     /**
      * 文件下载(预览)
+     *
      * @param absolutePath 文件路径
      * @param response
      */

+ 37 - 0
src/main/resources/data/update/v1.0/20231117liutao.sql

@@ -1261,3 +1261,40 @@ INSERT INTO `t_dictionary`(`name`, `parentId`, `code`, `value`, `gradation`, `gm
 VALUES ('增加或修改增信措施', (select t.id from t_dictionary t where t.code = 'reviewAndAdjustmentTypes'), 'reviewAndAdjustmentTypes_G', NULL, 6, now(), now());
 INSERT INTO `t_dictionary`(`name`, `parentId`, `code`, `value`, `gradation`, `gmt_create`, `gmt_modified`)
 VALUES ('其他', (select t.id from t_dictionary t where t.code = 'reviewAndAdjustmentTypes'), 'reviewAndAdjustmentTypes_H', NULL, 7, now(), now());
+
+delete from sys_user_org_rel
+where org_id in
+      (select id from sys_org where id = 26 or parent_id = 26);
+
+
+delete from sys_user_role_rel
+where role_id in
+      (select id from sys_role where id = 4 or parent_id = 4);
+
+
+delete from sys_role_permission_rel
+
+where role_id in
+
+      (select id from sys_role where id = 4 or parent_id = 4);
+
+
+delete from sys_user where id in
+                           (
+                               select user_id from sys_user_org_rel
+                               where org_id in
+                                     (select id from sys_org where id = 26 or parent_id = 26)
+                           );
+
+
+delete from sys_org where id = 26 or parent_id = 26;
+
+
+delete from sys_role where id = 4 or parent_id = 4;
+
+INSERT INTO `t_permission`( `parentId`, `type`, `cname`, `ename`, `gradation`, `moduleName`, `url`, `icon`, `user_create`, `user_modified`, `gmt_create`, `gmt_modified`)
+VALUES ( 145, 'button', '下载报告', 'downloadProjectReport', 1, '项目授信管理', '/project/downloadProjectReport', NULL, NULL, NULL, now(), now());
+
+INSERT INTO `t_permission`( `parentId`, `type`, `cname`, `ename`, `gradation`, `moduleName`, `url`, `icon`, `user_create`, `user_modified`, `gmt_create`, `gmt_modified`)
+VALUES ( 149, 'button', '下载报告', 'downloadSupplierInfoReport', 1, '供应商授信管理', '/supplier/downloadSupplierInfoReport', NULL, NULL, NULL,  now(), now());
+