소스 검색

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

liuj 6 달 전
부모
커밋
c2bca0414b

+ 3 - 1
build.gradle

@@ -5,7 +5,7 @@ plugins {
 }
 
 group = 'com.inkasso'
-version = '1.0.9-prod'
+version = '1.0.18-prod'
 sourceCompatibility = '1.8'
 
 configurations {
@@ -91,6 +91,8 @@ dependencies {
     implementation("com.itextpdf:itext-asian:5.1.1")
     implementation("org.jsoup:jsoup:1.12.1")
 
+    implementation("io.seata:seata-spring-boot-starter:1.8.0")
+
     /*code generated*/
 	testImplementation('com.baomidou:mybatis-plus-generator:3.4.0')
 

+ 35 - 0
src/main/java/com/inkasso/config/GlobalTransactionScannerConfig.java

@@ -0,0 +1,35 @@
+package com.inkasso.config;
+
+import io.seata.spring.annotation.GlobalTransactionScanner;
+import io.seata.spring.boot.autoconfigure.properties.SeataProperties;
+import io.seata.tm.api.DefaultGlobalTransaction;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.StringUtils;
+
+import javax.annotation.Resource;
+
+/**
+ * @description:
+ * @Author: wanglang
+ * @Date: 2024/4/3 16:10
+ * @Version: 1.0
+ */
+@Configuration
+public class GlobalTransactionScannerConfig {
+
+    private String applicationName = "factoring-trade-c";
+    @Resource
+    private SeataProperties seataProperties;
+    @Bean
+    public GlobalTransactionScanner globalTransactionScanner() {
+       String txServiceGroup = this.seataProperties.getTxServiceGroup();
+        if (StringUtils.isEmpty(txServiceGroup)) {
+            txServiceGroup = applicationName + "-fescar-service-group";
+            this.seataProperties.setTxServiceGroup(txServiceGroup);
+        }
+
+        return new GlobalTransactionScanner (applicationName, txServiceGroup);
+    }
+}

+ 5 - 0
src/main/java/com/inkasso/factoring/acceptanceManagement/service/impl/CAcceptanceBasicInfoServiceImpl.java

@@ -331,6 +331,11 @@ public class CAcceptanceBasicInfoServiceImpl extends ServiceImpl<CAcceptanceBasi
         if (acceptanceBasicInfo.getId() != null ) {
             //更新
             updateAcceptanceSheet(acceptanceBasicInfo,request);
+            //前端没有传验收单编号
+            CAcceptanceBasicInfo byId = this.getById(acceptanceBasicInfo.getId());
+            if(byId!=null){
+                acceptanceBasicInfo.setAcceptanceNumber(byId.getAcceptanceNumber());
+            }
             updateById(acceptanceBasicInfo);
         } else {
             //保存验收单信息

+ 11 - 1
src/main/java/com/inkasso/factoring/creditmanagement/service/impl/ProjectInformationServiceImpl.java

@@ -81,6 +81,9 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
     @Value("${trade.startProjectCoreEnterpriseProcessUrl}")
     private String startProjectCoreEnterpriseProcess;
 
+    @Value("${trade.startCreditResolutionOld}")
+    private String startCreditResolutionOld;
+
     @Autowired
     private RestTemplate restTemplate;
 
@@ -391,7 +394,14 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
                         projectCoreEnterprise.setOldCoreEnterpriseId(old.getId());
                         projectCoreEnterprise.setStatus(ProjectAndEnterpriseStatusEnums.CREDIT_SUCCESS.getCode());
                         projectCoreEnterpriseService.updateById(projectCoreEnterprise);
-                    } else {
+                        //更改项目状态
+                        if (projectInformation.getcEnterpriseId() == null) {
+                            projectInformation.setStatus(ProjectAndEnterpriseStatusEnums.CREDIT_SUCCESS.getCode());
+                            updateById(projectInformation);
+                            //开启授信决议
+                            restTemplate.getForObject(startCreditResolutionOld + "?id=" + projectInformation.getId() + "&oldCoreEnterpriseId=" + projectCoreEnterprise.getOldCoreEnterpriseId(), ResponseJson.class);
+                        }
+                    }else {
                         start = true;
                     }
                 } else {

+ 2 - 2
src/main/java/com/inkasso/factoring/creditmanagement/service/impl/SupplierInfoServiceImpl.java

@@ -791,11 +791,11 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
             if(CollectionUtil.isNotEmpty(list)){
                 String reason = null;
                 BusinessProcessingLog businessProcessingLog = list.get(0);
-                if(ConstantUtil.FIRST_REVIEW.equals(businessProcessingLog.getTaskDefKey())){
+                if(ConstantUtil.FIRST_REVIEW.equals(businessProcessingLog.getTaskDefKey()) && supplierInfo.getStatus().equals(SupplierStatusEnums.VOTE.getCode())){
                     SupplierApprovalFirst supplierApprovalFirst = supplierApprovalFirstService.getById(businessProcessingLog.getFormBusinessId());
                     reason = supplierApprovalFirst.getApprovalComment();
                 }
-                if(ConstantUtil.SECOND_REVIEW.equals(businessProcessingLog.getTaskDefKey())){
+                if(ConstantUtil.SECOND_REVIEW.equals(businessProcessingLog.getTaskDefKey()) && supplierInfo.getStatus().equals(SupplierStatusEnums.VOTE.getCode())){
                     SupplierApprovalSecond supplierApprovalSecond = supplierApprovalSecondService.getById(businessProcessingLog.getFormBusinessId());
                     reason = supplierApprovalSecond.getApprovalComment();
                 }

+ 17 - 0
src/main/resources/application-dev.yml

@@ -104,9 +104,25 @@ kafubao:
       - businessconsulting/businessconsulting #联系我们
       - system/fileStorage/preview #预览
       - department/findAll   #查询省市区
+      - flowable/processDefinition/viewImg
   authentication: true
   freeNum: 1
 
+seata:
+  enabled: true
+  application-id: seata-test-service
+  tx-service-group: seata-trade-c-test-service-group
+  service:
+    vgroup-mapping:
+      seata-trade-c-test-service-group: my_dev_group
+    grouplist:
+      my_dev_group: 139.224.194.150:8097
+  config:
+    type: file
+  registry:
+    type: file
+  enable-auto-data-source-proxy: true
+
 codegeneration:
   filePath: D:/codegeneration
 
@@ -204,4 +220,5 @@ trade:
   contractSignConfirmSubmitUrl: http://localhost:8888/api/financing/editContractSignConfirm
   doBusinessCHistoryViewUrl: http://localhost:8888/api/businessProcessingTask/doBusinessCHistoryView
   getAllPurchSignFileUrl: http://localhost:8888/api/purchManagement/getAllPurchSignFile
+  startCreditResolutionOld: http://localhost:8888/creditResolution/startProcessOld
   judgeCustomerExemptionMattersUrl: http://localhost:8888/api/judgeCustomerExemptionMatters

+ 18 - 0
src/main/resources/application-prod.yml

@@ -83,6 +83,22 @@ redis:
   #数据库索引号
   indexDB: 2
 
+seata:
+  enabled: true
+  application-id: seata-test-service
+  tx-service-group: seata-trade-c-service-group
+  service:
+    vgroup-mapping:
+      seata-trade-c-service-group: my_tx_group
+    grouplist:
+      my_tx_group: 139.224.194.150:8097
+  config:
+    type: file
+  registry:
+    type: file
+  enable-auto-data-source-proxy: true
+
+
 kafubao:
   rateLimiter: 50000
   limiterTime: 5
@@ -106,6 +122,7 @@ kafubao:
       - tradeV4/user/reSetPassword    #找回密码
       - tradeV4/businessconsulting/businessconsulting #联系我们
       - tradeV4/system/fileStorage/preview #预览
+      - tradeV4/flowable/processDefinition/viewImg
       - tradeV4/department/findAll   #查询省市区
   authentication: true
   freeNum: 1
@@ -208,4 +225,5 @@ trade:
   contractSignConfirmSubmitUrl: http://139.224.194.150:8868/tradeV4-backend/api/financing/editContractSignConfirm
   doBusinessCHistoryViewUrl: http://139.224.194.150:8868/tradeV4-backend/api/businessProcessingTask/doBusinessCHistoryView
   getAllPurchSignFileUrl: http://139.224.194.150:8868/tradeV4-backend/api/purchManagement/getAllPurchSignFile
+  startCreditResolutionOld: http://139.224.194.150:8868/tradeV4-backend/creditResolution/startProcessOld
   judgeCustomerExemptionMattersUrl: http://139.224.194.150:8868/tradeV4-backend/api/judgeCustomerExemptionMatters