Explorar el Código

Merge branch 'dev1.0' of http://192.168.0.200:3000/liuj/factoring-trade-backend into dev1.0

Wangyafan hace 9 meses
padre
commit
6824936a38

+ 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;

+ 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();
+  }
 }

+ 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();
+  }
+
 }

+ 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());
+

+ 2 - 2
src/main/resources/mapper/sys/PermissionMapper.xml

@@ -88,8 +88,8 @@
 	</select>
 	
 	<select id="findAllByUserId" resultMap="permissionResult">
-		select <include refid="fields"/>  from sys_role_permission_rel pl 
-		left join t_permission on pl.permission_id = id
+		select distinct <include refid="fields"/>   from   t_permission
+		join sys_role_permission_rel  pl on pl.permission_id = id
 		where pl.role_id  in
 			(
 			select ul.role_id from sys_user_role_rel ul