Browse Source

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

zhangc 9 months ago
parent
commit
1f483a3451

+ 11 - 0
src/main/java/com/sunxung/factoring/service/customerinformation/impl/CustomerServiceImpl.java

@@ -16,6 +16,7 @@ import com.sunxung.factoring.entity.customerinformation.Customer;
 import com.sunxung.factoring.entity.customerinformation.SupplierBankCardInfo;
 import com.sunxung.factoring.entity.entprise.Enterprise;
 import com.sunxung.factoring.entity.sys.*;
+import com.sunxung.factoring.entity.tradingPlatform.Platform;
 import com.sunxung.factoring.entity.vo.ConditionVo;
 import com.sunxung.factoring.mapper.customerinformation.CustomerMapper;
 import com.sunxung.factoring.mapper.sys.UserMapper;
@@ -26,6 +27,7 @@ import com.sunxung.factoring.service.sys.OrgService;
 import com.sunxung.factoring.service.sys.RoleService;
 import com.sunxung.factoring.service.sys.UserOrgRelService;
 import com.sunxung.factoring.service.sys.UserService;
+import com.sunxung.factoring.service.tradingPlatform.PlatformService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.PropertySource;
@@ -77,6 +79,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
     @Autowired
     private IEnterpriseService iEnterpriseService;
 
+    @Autowired
+    private PlatformService platformService;
+
     @Override
     public GridPage<Customer> findList(ConditionVo conditionVo) {
         QueryWrapper<Customer> queryWrapper = new QueryWrapper<>();
@@ -411,6 +416,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
             }
             iEnterpriseService.updateById(enterprise);
         }
+        Platform platform = platformService.getOne(new QueryWrapper<Platform>().eq("fdd_customer_id", code)
+                .orderByDesc("gmt_create").last("limit 1"));
+        if (platform != null && type == 1){
+            platform.setAutoSignStatus(true);
+            platformService.updateById(platform);
+        }
     }
 
     /**

+ 36 - 10
src/main/java/com/sunxung/factoring/service/supplier/impl/SupplierApprovalFirstServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sunxung.factoring.component.util.CollectionUtil;
 import com.sunxung.factoring.component.util.ConstantConversionUtil;
 import com.sunxung.factoring.component.util.ConstantUtil;
+import com.sunxung.factoring.component.util.StringUtil;
 import com.sunxung.factoring.dict.impl.FileModuleDict;
 import com.sunxung.factoring.entity.ResponseJson;
 import com.sunxung.factoring.entity.credit.CreditDetail;
@@ -308,8 +309,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
                     if(creditInfo != null){
                         List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
                         if(CollectionUtil.isNotEmpty(creditDetails)){
-                            List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                            creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
+                            CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                            if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                                List<FileStorage> list = new ArrayList<>();
+                                FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                                list.add(creditDetailFiles);
+                                creditInvestigationInfoHistory.setCreditDetailFiles(list);
+                            }
                         }
                     }
                     List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
@@ -339,8 +345,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
                         if(creditInfo != null){
                             List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
                             if(CollectionUtil.isNotEmpty(creditDetails)){
-                                List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                                creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
+                                CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                                if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                                    List<FileStorage> list = new ArrayList<>();
+                                    FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                                    list.add(creditDetailFiles);
+                                    creditInvestigationInfoHistory.setCreditDetailFiles(list);
+                                }
                             }
                         }
                         creditSituation.setCreditInvestigationInfoHistory(creditInvestigationInfoHistory);
@@ -362,8 +373,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
         if(creditInfo != null){
             List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
             if(CollectionUtil.isNotEmpty(creditDetails)){
-                List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                corporateGoodwill.setCreditDetailFiles(creditDetailFiles);
+                CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                    List<FileStorage> list = new ArrayList<>();
+                    FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                    list.add(creditDetailFiles);
+                    corporateGoodwill.setCreditDetailFiles(list);
+                }
             }
         }
         enterprise.setCorporateGoodwill(corporateGoodwill);
@@ -742,8 +758,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
                     if(creditInfo != null){
                         List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
                         if(CollectionUtil.isNotEmpty(creditDetails)){
-                            List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                            creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
+                            CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                            if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                                List<FileStorage> list = new ArrayList<>();
+                                FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                                list.add(creditDetailFiles);
+                                creditInvestigationInfoHistory.setCreditDetailFiles(list);
+                            }
                         }
                     }
                     List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
@@ -761,8 +782,13 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
         if(creditInfo != null){
             List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
             if(CollectionUtil.isNotEmpty(creditDetails)){
-                List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                corporateGoodwill.setCreditDetailFiles(creditDetailFiles);
+                CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                    List<FileStorage> list = new ArrayList<>();
+                    FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                    list.add(creditDetailFiles);
+                    corporateGoodwill.setCreditDetailFiles(list);
+                }
             }
         }
         enterprise.setCorporateGoodwill(corporateGoodwill);

+ 28 - 8
src/main/java/com/sunxung/factoring/service/supplier/impl/SupplierInfoServiceImpl.java

@@ -483,8 +483,13 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
             if(creditInfo != null){
                 List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
                 if(CollectionUtil.isNotEmpty(creditDetails)){
-                    List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                    corporateGoodwill.setCreditDetailFiles(creditDetailFiles);
+                    CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                    if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                        List<FileStorage> list = new ArrayList<>();
+                        FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                        list.add(creditDetailFiles);
+                        corporateGoodwill.setCreditDetailFiles(list);
+                    }
                 }
             }
             //视频尽调的企业信誉
@@ -506,8 +511,13 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
                 if(creditInfo1 != null){
                     List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo1.getId());
                     if(CollectionUtil.isNotEmpty(creditDetails)){
-                        List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                        creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
+                        CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                        if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                            List<FileStorage> list = new ArrayList<>();
+                            FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                            list.add(creditDetailFiles);
+                            creditInvestigationInfoHistory.setCreditDetailFiles(list);
+                        }
                     }
                 }
                 List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
@@ -666,8 +676,13 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
                 if(creditInfo != null){
                     List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
                     if(CollectionUtil.isNotEmpty(creditDetails)){
-                        List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                        creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
+                        CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                        if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                            List<FileStorage> list = new ArrayList<>();
+                            FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                            list.add(creditDetailFiles);
+                            creditInvestigationInfoHistory.setCreditDetailFiles(list);
+                        }
                     }
                 }
                 List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
@@ -683,8 +698,13 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
             if(creditInfo != null){
                 List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
                 if(CollectionUtil.isNotEmpty(creditDetails)){
-                    List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                    corporateGoodwill.setCreditDetailFiles(creditDetailFiles);
+                    CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                    if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())) {
+                        List<FileStorage> list = new ArrayList<>();
+                        FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                        list.add(creditDetailFiles);
+                        corporateGoodwill.setCreditDetailFiles(list);
+                    }
                 }
             }
             AttachmentDto attachmentDto = AttachmentDto.builder()

+ 15 - 4
src/main/java/com/sunxung/factoring/service/supplier/impl/VideoDueDiligenceServiceImpl.java

@@ -8,6 +8,7 @@ import com.sunxung.factoring.component.enums.ProjectAndEnterpriseStatusEnums;
 import com.sunxung.factoring.component.enums.SupplierStatusEnums;
 import com.sunxung.factoring.component.util.CollectionUtil;
 import com.sunxung.factoring.component.util.ConstantUtil;
+import com.sunxung.factoring.component.util.StringUtil;
 import com.sunxung.factoring.dict.impl.FileModuleDict;
 import com.sunxung.factoring.entity.ResponseJson;
 import com.sunxung.factoring.entity.credit.CreditDetail;
@@ -273,8 +274,13 @@ public class VideoDueDiligenceServiceImpl extends ServiceImpl<VideoDueDiligenceM
             if (creditInfo != null) {
                 List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
                 if (CollectionUtil.isNotEmpty(creditDetails)) {
-                    List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                    creditInvestigationInfoHistory.setCreditDetailFiles(creditDetailFiles);
+                    CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                    if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                        List<FileStorage> fileList = new ArrayList<>();
+                        FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                        fileList.add(creditDetailFiles);
+                        creditInvestigationInfoHistory.setCreditDetailFiles(fileList);
+                    }
                 }
             }
             List<FileStorageDO> cardFiles = fileService.findByBusinessId(creditInvestigationInfoHistory.getId(), FileModuleDict.ChildEnum.ENTERPRISE_IDCARD_FILES_HISTORY.getCode());
@@ -300,8 +306,13 @@ public class VideoDueDiligenceServiceImpl extends ServiceImpl<VideoDueDiligenceM
         if (creditInfo != null) {
             List<CreditDetail> creditDetails = creditDetailService.getByCreditId(creditInfo.getId());
             if (CollectionUtil.isNotEmpty(creditDetails)) {
-                List<FileStorage> creditDetailFiles = creditDetails.stream().map(r -> fileStorageService.get(Long.valueOf(r.getCreditAddress()))).collect(Collectors.toList());
-                corporateGoodwill.setCreditDetailFiles(creditDetailFiles);
+                CreditDetail creditDetail = creditDetails.get(creditDetails.size() - 1);
+                if(StringUtil.isNotEmpty(creditDetail.getCreditAddress())){
+                    List<FileStorage> fileList = new ArrayList<>();
+                    FileStorage creditDetailFiles = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                    fileList.add(creditDetailFiles);
+                    corporateGoodwill.setCreditDetailFiles(fileList);
+                }
             }
         }
         corporateGoodwill.setQuestion("有无其他融资渠道?融资缺口有多少?");

+ 79 - 38
src/main/java/com/sunxung/factoring/service/tradingPlatform/Impl/PlatformServiceImpl.java

@@ -14,15 +14,19 @@ import com.sunxung.factoring.entity.tradingPlatform.Platform;
 import com.sunxung.factoring.entity.vo.ConditionVo;
 import com.sunxung.factoring.mapper.tradingPlatform.PlatformMapper;
 import com.sunxung.factoring.service.businessmanagement.BusinessBasicInfoService;
+import com.sunxung.factoring.service.sys.UserService;
 import com.sunxung.factoring.service.tradingPlatform.PlatformService;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.client.RestTemplate;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author liutao yaFan
@@ -31,6 +35,15 @@ import java.util.List;
 public class PlatformServiceImpl extends ServiceImpl<PlatformMapper,Platform> implements PlatformService {
 
 
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Value("${sop.getFlushUrl}")
+    private String flushUrl;
+
+    @Value("${sop.getEnterpriseInfoUrl}")
+    private String enterpriseInfoUrl;
+
     private static Logger logger = LogManager.getLogger(PlatformServiceImpl.class);
 
     @Override
@@ -41,27 +54,43 @@ public class PlatformServiceImpl extends ServiceImpl<PlatformMapper,Platform> im
         if(!list.isEmpty()){
             return new ResponseJson("500","企业已添加,勿重复操作");
         }
+
+        ResponseJson forObject = restTemplate.getForObject(enterpriseInfoUrl+"?code="+platform.getSocialCreditCode(), ResponseJson.class);
+        Map<String,Object> data = (Map) forObject.getData();
+
+
+        platform.setAuthUrl(data.get("authUrl").toString());
+        platform.setShortAuthUrl(data.get("shortAuthUrl").toString());
+        platform.setAuthStatus(0);
+        platform.setFddCustomerId(data.get("fddCustomerId").toString());
+        platform.setAutoSignUrl(data.get("autoSignUrl").toString());
+        platform.setShortAutoSignUrl(data.get("shortAutoSignUrl").toString());
+        platform.setShortAutoSignUrlCreate(new Date());
+        Integer autoSignStatus = (Integer) data.get("autoSignStatus");
+        platform.setAutoSignStatus(autoSignStatus == 1?true:false);
+        save(platform);
+
         //电子签章获取认证地址
 //        String customerId = ElectronicSignatureUtil.registerAccount(platform.getSocialCreditCode(), "2");
-        String authResult = ElectronicSignatureUtil.getAuthUrl("2",platform.getSocialCreditCode(),null);
-        JSONObject authJson = (JSONObject) JSONObject.parse(authResult);
-        String authUrl = authJson.getString("authUrl");
-        String customerId = authJson.getString("customerId");
-        String shortAuthUrl = ElectronicSignatureUtil.shortUrl(null, authUrl);
-        platform.setShortAuthUrl(shortAuthUrl);
-        platform.setShortAuthUrlCreate(new Date());
-        platform.setFddCustomerId(customerId);
-        platform.setAuthUrl(authUrl);
-        save(platform);
-        String transactionId = "platformFDD" + platform.getId()+"FDD"+ DateUtil.getCurrentDate().replace("-","").replace(" ","").replace(":","");
-        logger.error("transactionId:"+transactionId);
-        String beforeAutoSignUrl = ElectronicSignatureUtil.beforeAutoSign(transactionId,customerId,customerId);
-        String shortAutoSignUrl = ElectronicSignatureUtil.shortUrl(null, beforeAutoSignUrl);
-        platform.setShortAutoSignUrl(shortAutoSignUrl);
-        platform.setShortAutoSignUrlCreate(new Date());
-        platform.setAutoSignUrl(beforeAutoSignUrl);
-        platform.setAuthStatus(0);
-        updateById(platform);
+//        String authResult = ElectronicSignatureUtil.getAuthUrl("2",platform.getSocialCreditCode(),null);
+//        JSONObject authJson = (JSONObject) JSONObject.parse(authResult);
+//        String authUrl = authJson.getString("authUrl");
+//        String customerId = authJson.getString("customerId");
+//        String shortAuthUrl = ElectronicSignatureUtil.shortUrl(null, authUrl);
+//        platform.setShortAuthUrl(shortAuthUrl);
+//        platform.setShortAuthUrlCreate(new Date());
+//        platform.setFddCustomerId(customerId);
+//        platform.setAuthUrl(authUrl);
+//        save(platform);
+//        String transactionId = "platformFDD" + platform.getId()+"FDD"+ DateUtil.getCurrentDate().replace("-","").replace(" ","").replace(":","");
+//        logger.error("transactionId:"+transactionId);
+//        String beforeAutoSignUrl = ElectronicSignatureUtil.beforeAutoSign(transactionId,customerId,customerId);
+//        String shortAutoSignUrl = ElectronicSignatureUtil.shortUrl(null, beforeAutoSignUrl);
+//        platform.setShortAutoSignUrl(shortAutoSignUrl);
+//        platform.setShortAutoSignUrlCreate(new Date());
+//        platform.setAutoSignUrl(beforeAutoSignUrl);
+//        platform.setAuthStatus(0);
+//        updateById(platform);
         return new ResponseJson("新增成功");
     }
 
@@ -112,27 +141,39 @@ public class PlatformServiceImpl extends ServiceImpl<PlatformMapper,Platform> im
     @Override
     public void flushUrl(Long id) {
         Platform platform = getById(id);
-        //删除中间服务的认证信息
-        ElectronicSignatureUtil.removeAuthInfo(platform.getSocialCreditCode());
-        //刷新认证信息
-        String authResult = ElectronicSignatureUtil.getAuthUrl("2",platform.getSocialCreditCode(),null);
-        JSONObject authJson = (JSONObject) JSONObject.parse(authResult);
-        String authUrl = authJson.getString("authUrl");
-        String customerId = authJson.getString("customerId");
-        String shortAuthUrl = ElectronicSignatureUtil.shortUrl(null, authUrl);
-        platform.setShortAuthUrl(shortAuthUrl);
-        platform.setShortAuthUrlCreate(new Date());
-        platform.setFddCustomerId(customerId);
-        platform.setAuthUrl(authUrl);
-        String transactionId = "platformFDD" + platform.getId()+"FDD"+ DateUtil.getCurrentDate().replace("-","").replace(" ","").replace(":","");
-        logger.error("transactionId:"+transactionId);
-        String beforeAutoSignUrl = ElectronicSignatureUtil.beforeAutoSign(transactionId,customerId,customerId);
-        String shortAutoSignUrl = ElectronicSignatureUtil.shortUrl(null, beforeAutoSignUrl);
-        platform.setShortAutoSignUrl(shortAutoSignUrl);
-        platform.setShortAutoSignUrlCreate(new Date());
-        platform.setAutoSignUrl(beforeAutoSignUrl);
+
+        ResponseJson forObject = restTemplate.getForObject(flushUrl+"?code="+platform.getSocialCreditCode(), ResponseJson.class);
+        Map<String,String> data = (Map) forObject.getData();
+        platform.setAuthUrl(data.get("authUrl"));
+        platform.setShortAuthUrl(data.get("shortAuthUrl"));
         platform.setAuthStatus(0);
+        platform.setFddCustomerId(data.get("fddCustomerId"));
+        //更新自动签链接
+        platform.setAutoSignUrl(data.get("autoSignUrl"));
+        platform.setShortAutoSignUrl(data.get("shortAutoSignUrl"));
         platform.setAutoSignStatus(false);
+
+//        //删除中间服务的认证信息
+//        ElectronicSignatureUtil.removeAuthInfo(platform.getSocialCreditCode());
+//        //刷新认证信息
+//        String authResult = ElectronicSignatureUtil.getAuthUrl("2",platform.getSocialCreditCode(),null);
+//        JSONObject authJson = (JSONObject) JSONObject.parse(authResult);
+//        String authUrl = authJson.getString("authUrl");
+//        String customerId = authJson.getString("customerId");
+//        String shortAuthUrl = ElectronicSignatureUtil.shortUrl(null, authUrl);
+//        platform.setShortAuthUrl(shortAuthUrl);
+//        platform.setShortAuthUrlCreate(new Date());
+//        platform.setFddCustomerId(customerId);
+//        platform.setAuthUrl(authUrl);
+//        String transactionId = "platformFDD" + platform.getId()+"FDD"+ DateUtil.getCurrentDate().replace("-","").replace(" ","").replace(":","");
+//        logger.error("transactionId:"+transactionId);
+//        String beforeAutoSignUrl = ElectronicSignatureUtil.beforeAutoSign(transactionId,customerId,customerId);
+//        String shortAutoSignUrl = ElectronicSignatureUtil.shortUrl(null, beforeAutoSignUrl);
+//        platform.setShortAutoSignUrl(shortAutoSignUrl);
+//        platform.setShortAutoSignUrlCreate(new Date());
+//        platform.setAutoSignUrl(beforeAutoSignUrl);
+//        platform.setAuthStatus(0);
+//        platform.setAutoSignStatus(false);
         updateById(platform);
     }
 

+ 6 - 3
src/main/resources/application-dev.yml

@@ -21,7 +21,7 @@ spring:
     master:
       continueOnError: true
       type: com.alibaba.druid.pool.DruidDataSource
-      url: jdbc:mysql://192.168.3.6:3106/factoring_trade_v2_20230918?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
+      url: jdbc:mysql://192.168.3.6:3106/factoring_trade_v2_online?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
       username: root
       password: root
       driver-class-name: com.mysql.jdbc.Driver
@@ -46,7 +46,7 @@ spring:
       password: pd6VOeuCmzP3CcRy
       driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
   jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
+    date-format: yyyy-MM-dd
     time-zone: GMT+8
   http:
     multipart:
@@ -130,8 +130,9 @@ sop:
   getProjectCoreEnterpriseScoreUrl: http://localhost:8868/api/trade/getProjectCoreEnterpriseScore
   reviewResolutionReportUrl: http://localhost:8868/api/trade/reviewResolution/report
   getEnterpriseAreaUrl: http://localhost:8868/api/trade/getEnterpriseArea
-  getBusinessByKeyWordUrl: http://localhost:8868/api/trade/findBusinessName
+  getBusinessByKeyWordUrl: http://192.168.3.6:8868/api/trade/findBusinessName
   getFlushUrl: http://192.168.3.6:8868/sys/customer/flushByTrade/url
+  getEnterpriseInfoUrl: http://192.168.3.6:8868/sys/customer/getEnterpriseInfoByTrade
 
 fdd:
   contractUrl: "http://192.168.125.194:8888/#/register"
@@ -186,5 +187,7 @@ auth:
       - businessProcessingTask/doBusinessHistoryView
       - saleInvoice/doAdd
       - saleInvoice/c_doUpdate
+      - customer/flushUrlByCompany
+      - customer/flushStatusBySop
       - fileStorage/getUeconfig
       - fileStorage/imgUpload

+ 2 - 1
src/main/resources/application-prod.yml

@@ -22,7 +22,7 @@ spring:
     master:
       continueOnError: true
       type: com.alibaba.druid.pool.DruidDataSource
-      url: jdbc:mysql://localhost:3306/factoring_trade_online?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
+      url: jdbc:mysql://localhost:3306/factoring_trade_v4?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
       username: root
       password: factoring_trade_20121210
       driver-class-name: com.mysql.jdbc.Driver
@@ -133,6 +133,7 @@ sop:
   getEnterpriseAreaUrl: http://222.90.211.174:18868/api/trade/getEnterpriseArea
   getBusinessByKeyWordUrl: http://222.90.211.174:18868/api/trade/findBusinessName
   getFlushUrl: http://222.90.211.174:18868/sys/customer/flushByTrade/url
+  getEnterpriseInfoUrl: http://222.90.211.174:18868/sys/customer/getEnterpriseInfoByTrade
 
 fdd:
   contractUrl: "http://192.168.125.194:8888/#/register"

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

@@ -1298,3 +1298,12 @@ VALUES ( 145, 'button', '下载报告', 'downloadProjectReport', 1, '项目授
 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());
 
+INSERT INTO `t_permission`( `parentId`, `type`, `cname`, `ename`, `gradation`, `moduleName`, `url`, `icon`, `user_create`, `user_modified`, `gmt_create`, `gmt_modified`)
+VALUES ( 145, 'button', '查看', 'viewProject', 2, '项目授信管理', '/project/viewProject', 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', '查看', 'viewSupplierInfo', 2, '供应商授信管理', '/supplier/viewSupplierInfo', 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 (143, 'button', '查看', 'viewCreditResolution', 1, '授信决议管理', '/credit/resolution/viewCreditResolution', NULL, NULL, NULL,  now(), now());
+