Browse Source

20220510 ====

linjinyu 3 years ago
parent
commit
49f8901dbb
40 changed files with 1429 additions and 146 deletions
  1. 1 0
      .gitignore
  2. 2 0
      pom.xml
  3. 1 1
      superdesk-uniorder-common/src/main/java/cn/superdesk/uniorder/common/bizScene/invoice/common/InvoiceTypeScene.java
  4. 37 4
      superdesk-uniorder-common/src/main/java/cn/superdesk/uniorder/common/bizScene/invoice/customer/InvoiceApplyCustomerScene.java
  5. 0 1
      superdesk-uniorder-dubbo-provider/pom.xml
  6. 3 1
      superdesk-uniorder-dubbo-provider/src/main/resources/logback-spring.xml
  7. 1 0
      superdesk-uniorder-executor/pom.xml
  8. 172 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-instance/pom.xml
  9. 40 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/java/cn/superdesk/uniorder/executor/ExecutorInstanceApplication.java
  10. 189 25
      superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/resources/application-dev.properties
  11. 81 18
      superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/resources/application.properties
  12. 208 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/resources/logback-spring.xml
  13. 8 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/init.sh
  14. 33 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/pom.xml
  15. 85 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/QchjcStatementEventPublisher.java
  16. 1 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/package-info.java
  17. 23 1
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/pom.xml
  18. 8 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/customer/QchjcCustomerStatementHandler.java
  19. 37 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/customer/biz/QchjcCustomerStatementHandleService.java
  20. 9 1
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/supplier/QchjcSupplierStatementHandler.java
  21. 36 0
      superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/supplier/biz/QchjcSupplierStatementHandleService.java
  22. 1 1
      superdesk-uniorder-openapi/src/main/resources/logback-spring.xml
  23. 1 1
      superdesk-uniorder-openapicall/src/main/resources/logback-spring.xml
  24. 14 10
      superdesk-uniorder-service/pom.xml
  25. 16 1
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/invoice/customer/impl/InvoiceApplyCustomerFieldMakeInvoiceStatusOpOngoingSzhtxxElectronicInvoiceServiceImpl.java
  26. 26 9
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/invoice/customer/impl/InvoiceApplyFieldBackAccountStatusServiceImpl.java
  27. 40 10
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/invoice/customer/impl/InvoiceApplyFieldReceiveInvoiceStatusServiceImpl.java
  28. 4 0
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/SzhtxxElectronicInvoiceFptxxExtendInfoService.java
  29. 4 0
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/SzhtxxElectronicInvoiceFptxxService.java
  30. 39 7
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/impl/SzhtxxElectronicInvoiceFptxxExtendInfoServiceImpl.java
  31. 40 1
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/impl/SzhtxxElectronicInvoiceFptxxServiceImpl.java
  32. 20 1
      superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/paperInvoice/impl/SzhtxxPaperInvoiceFptxxServiceImpl.java
  33. 5 5
      superdesk-uniorder-service/src/main/resources/application.properties
  34. 1 1
      superdesk-uniorder-service/src/main/resources/logback-spring.xml
  35. 143 37
      superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/controller/invoice/customer/state/InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller.java
  36. 1 0
      superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/controller/invoice/customer/state/InvoiceApplyCustomerScoreFieldMakeInvoiceStatusController.java
  37. 96 7
      superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/controller/invoice/customer/state/InvoiceApplyCustomerScoreFieldReceiveInvoiceStatusController.java
  38. 1 1
      superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/dubbo/consumer/invoice/customer/InvoiceApplyFieldReceiveInvoiceStatusDubboConsumerService.java
  39. 1 1
      superdesk-uniorder-web/src/main/resources/logback-spring.xml
  40. 1 1
      superdesk-uniorder-xxl-job-admin/src/main/resources/logback-spring.xml

+ 1 - 0
.gitignore

@@ -6,6 +6,7 @@ test-output/
 .project
 .settings/
 logs
+.logs
 tmp
 temp
 #*.log

+ 2 - 0
pom.xml

@@ -39,6 +39,8 @@
         <module>superdesk-uniorder-openapicall-thirdpart-szhtxx-paperInvoice-dto</module>
 
         <module>superdesk-uniorder-xxl-job-admin</module>
+
+        <module>superdesk-uniorder-executor</module>
     </modules>
 
 

+ 1 - 1
superdesk-uniorder-common/src/main/java/cn/superdesk/uniorder/common/bizScene/invoice/common/InvoiceTypeScene.java

@@ -44,7 +44,7 @@ public class InvoiceTypeScene {
 
         String[] invoiceTypeMoudelXMode = {
                 InvoiceTypeMoudelXModeEnum.线下开票.getKey(),
-//                InvoiceTypeMoudelXModeEnum.深圳航信电子发票.getKey(),// 无需
+//                InvoiceTypeMoudelXModeEnum.深圳航信电子发票.getKey(),// 无需
                 InvoiceTypeMoudelXModeEnum.深圳航信纸质发票.getKey()
         };
 

+ 37 - 4
superdesk-uniorder-common/src/main/java/cn/superdesk/uniorder/common/bizScene/invoice/customer/InvoiceApplyCustomerScene.java

@@ -2,6 +2,7 @@ package cn.superdesk.uniorder.common.bizScene.invoice.customer;
 
 import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerBackAccountStatusEnum;
 import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerInvoiceProgressingStatusEnum;
+import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerMakeInvoiceStatusEnum;
 import lombok.RequiredArgsConstructor;
 
 import java.util.Arrays;
@@ -20,6 +21,8 @@ import java.util.List;
 public class InvoiceApplyCustomerScene {
 
 
+    /**************************************** 申请状态 start ****************************************/
+
     /**
      * ArrayUtil.contains
      *
@@ -58,13 +61,13 @@ public class InvoiceApplyCustomerScene {
 //    };
 
 
-    /**************************************** 发票单 开票申请 start ****************************************/
+    /**************************************** |---- 发票单 开票申请 start ****************************************/
 
 
-    /**************************************** 发票单 开票申请   end ****************************************/
+    /**************************************** |---- 发票单 开票申请   end ****************************************/
 
 
-    /**************************************** 发票单 发票管理 start ****************************************/
+    /**************************************** |---- 发票单 发票管理 start ****************************************/
 
     public static List<Integer> statusV2_0Last_List_InvoiceProgressingSceneManagerList() {
 
@@ -84,7 +87,37 @@ public class InvoiceApplyCustomerScene {
         );
     }
 
-    /**************************************** 发票单 发票管理   end ****************************************/
+    /**
+     * op确认领票
+     * https://docs.qq.com/doc/DYUZOREhreVhiVlZL
+     * ·该对账单下所有开票申请的申请状态为“待领票/待回款”,否则不允许确认领票,1.5s提示“该对账单的开票申请数据发生变更,请返回检查”;【20220510去掉此判断】
+     *
+     * @return
+     */
+    public static Integer[] statusV2_1_Array_InvoiceProgressingSceneOpReceiveStateCheck() {
+
+        Integer[] invoiceProgressingStatusContains = {
+                InvoiceApplyCustomerInvoiceProgressingStatusEnum.待领票.getKey(),
+                InvoiceApplyCustomerInvoiceProgressingStatusEnum.待回款.getKey()
+        };
+
+        return invoiceProgressingStatusContains;
+    }
+
+    public static Integer[] statusV2_1_Array_MakeInvoiceSceneOpReceiveStateCheck() {
+
+        Integer[] makeInvoiceStatusContains = {
+                InvoiceApplyCustomerMakeInvoiceStatusEnum.待开票.getKey(),
+                InvoiceApplyCustomerMakeInvoiceStatusEnum.开票中.getKey()
+        };
+
+        return makeInvoiceStatusContains;
+    }
+
+    /**************************************** |---- 发票单 发票管理   end ****************************************/
+
+
+    /**************************************** 申请状态 start ****************************************/
 
 
 }

+ 0 - 1
superdesk-uniorder-dubbo-provider/pom.xml

@@ -100,7 +100,6 @@
             <version>1.1.21</version>
         </dependency>
 
-
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>

+ 3 - 1
superdesk-uniorder-dubbo-provider/src/main/resources/logback-spring.xml

@@ -9,7 +9,7 @@
 
     <contextName>logback</contextName>
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
-    <property name="log.path" value="./logs/superdesk-uniorder-service"/>
+    <property name="log.path" value="./.logs/superdesk-uniorder-service"/>
 
     <!-- 彩色日志 -->
     <!-- 彩色日志依赖的渲染类 -->
@@ -144,6 +144,8 @@
         </filter>
     </appender>
 
+
+
     <!--
         <logger>用来设置某一个包或者具体的某一个类的日志打印级别、
                 以及指定<appender><logger>仅有一个name属性,

+ 1 - 0
superdesk-uniorder-executor/pom.xml

@@ -17,6 +17,7 @@
     <modules>
         <module>superdesk-uniorder-executor-instance</module>
         <module>superdesk-uniorder-executor-scheduler-kafka</module>
+        <module>superdesk-uniorder-executor-scheduler-kafka-provider</module>
         <module>superdesk-uniorder-executor-scheduler-kafka-constants</module>
         <module>superdesk-uniorder-executor-scheduler-xxl-job</module>
         <module>superdesk-uniorder-executor-scheduler-xxl-job-constants</module>

+ 172 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-instance/pom.xml

@@ -11,4 +11,176 @@
 
     <artifactId>superdesk-uniorder-executor-instance</artifactId>
 
+    <dependencies>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <!-- Dubbo Spring Boot Starter -->
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba.boot</groupId>-->
+<!--            <artifactId>dubbo-spring-boot-starter</artifactId>-->
+<!--            <version>0.2.1.RELEASE</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba</groupId>-->
+<!--            <artifactId>dubbo</artifactId>-->
+<!--            <version>${dubbo.version}</version>-->
+<!--        </dependency>-->
+
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-all</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.1.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+
+
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>${druid.version}</version>
+            <!--			<exclusions>-->
+            <!--				<exclusion>-->
+            <!--					<groupId>com.alibaba</groupId>-->
+            <!--					<artifactId>tools</artifactId>-->
+            <!--				</exclusion>-->
+            <!--			</exclusions>-->
+        </dependency>
+
+        <!-- druid -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+
+        <!-- pagehelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.2.3</version>
+        </dependency>
+
+        <!-- kafka -->
+        <dependency>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka</artifactId>
+        </dependency>
+
+
+        <dependency>
+            <groupId>cn.superdesk.uniorder</groupId>
+            <artifactId>superdesk-uniorder-executor-scheduler-kafka</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.superdesk.uniorder</groupId>
+            <artifactId>superdesk-uniorder-executor-scheduler-kafka-constants</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+
+
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <!-- 本地开发环境 -->
+            <id>dev</id>
+            <properties>
+                <profiles.active>dev</profiles.active>
+            </properties>
+            <!--默认启用的是dev环境配置-->
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+        <profile>
+            <!-- 测试环境 -->
+            <id>test</id>
+            <properties>
+                <profiles.active>test</profiles.active>
+            </properties>
+        </profile>
+        <profile>
+            <!-- UAT环境 -->
+            <id>uat</id>
+            <properties>
+                <profiles.active>uat</profiles.active>
+            </properties>
+        </profile>
+        <profile>
+            <!-- 生产环境 -->
+            <id>prod</id>
+            <properties>
+                <profiles.active>prod</profiles.active>
+            </properties>
+        </profile>
+        <profile>
+            <!-- 生产环境 侨城汇 -->
+            <id>qch</id>
+            <properties>
+                <profiles.active>qch</profiles.active>
+            </properties>
+        </profile>
+    </profiles>
+
+    <build>
+        <!--		<finalName>${project.artifactId}</finalName>-->
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
 </project>

+ 40 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/java/cn/superdesk/uniorder/executor/ExecutorInstanceApplication.java

@@ -0,0 +1,40 @@
+package cn.superdesk.uniorder.executor;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.annotation.PostConstruct;
+import java.util.TimeZone;
+
+/**
+ * @Description: Java类作用描述
+ * @Author: linjinyu
+ * @CreateDate: 2022/5/10 1:02 下午
+ * @UpdateUser: linjinyu
+ * @UpdateDate: 2022/5/10 1:02 下午
+ * @UpdateRemark: 修改内容
+ * @Version: 1.0
+ */
+@SpringBootApplication
+@EnableTransactionManagement
+@MapperScan("cn.superdesk.uniorder.dao.mapper.*")
+@ComponentScan(value = {
+        "cn.superdesk.uniorder",
+        "cn.superdesk.uniorder.service",
+        "cn.superdesk.uniorder.executor.scheduler.kafka"
+})
+public class ExecutorInstanceApplication {
+
+    public static void main(String[] args) {
+        ApplicationContext ctx = SpringApplication.run(ExecutorInstanceApplication.class, args);
+    }
+
+    @PostConstruct
+    void setDefaultTimezone() {
+        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
+    }
+}

+ 189 - 25
superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/resources/application-dev.properties

@@ -2,35 +2,16 @@
 
 # embedded server
 
+# ######################################## [mysql] start ########################################
 
-# mysql
 spring.datasource.url=jdbc:mysql://120.77.47.114:8089/uniorder_test_20211018?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&tinyInt1isBit=false&useSSL=false&serverTimezone=Asia/Shanghai
 spring.datasource.username=root
 spring.datasource.password=9gB2Qrmo
 
+# ######################################## [mysql]   end ########################################
 
-# dubbo && zookeeper
-dubbo.registry.protocol=zookeeper
-dubbo.registry.address=127.0.0.1:2181
+# ######################################## [redis] start ########################################
 
-# Dubbo Protocol
-dubbo.application.name=consumer
-
-dubbo.protocol.name=dubbo
-dubbo.protocol.port=20880
-dubbo.protocol.payload=52428800
-dubbo.provider.retries=0
-dubbo.provider.timeout=30000
-
-# Zookeeper
-zookeeper.servers=127.0.0.1:2181
-zookeeper.lock_path=/lock/
-zookeeper.session_timeout_ms=60000
-zookeeper.connection_timeout_ms=5000
-zookeeper.retry_count=5
-zookeeper.elapsed_time_ms=1000
-
-# redis
 spring.redis.host=127.0.0.1
 spring.redis.port=6379
 spring.redis.database=0
@@ -42,8 +23,58 @@ spring.redis.jedis.pool.maxIdle=8
 spring.redis.jedis.pool.maxWait=-1
 spring.redis.jedis.pool.maxActive=8
 
-env.output.enabled=true
+# ######################################## [redis]   end ########################################
+
+# ######################################## [zookeeper] start ########################################
 
+zookeeper.servers=127.0.0.1:2181
+zookeeper.lock_path=/lock/
+zookeeper.session_timeout_ms=60000
+zookeeper.connection_timeout_ms=5000
+zookeeper.retry_count=5
+zookeeper.elapsed_time_ms=1000
+
+# ######################################## [zookeeper]   end ########################################
+
+# ######################################## [dubbo] start ########################################
+
+#dubbo.registry.protocol=zookeeper
+#dubbo.registry.address=127.0.0.1:2181
+#
+## Dubbo Protocol
+#dubbo.application.name=consumer
+#
+#dubbo.protocol.name=dubbo
+#dubbo.protocol.port=20880
+#dubbo.protocol.payload=52428800
+#dubbo.provider.retries=0
+#dubbo.provider.timeout=30000
+
+# ######################################## [dubbo]   end ########################################
+
+# ######################################## [kafka] start ########################################
+
+# 指定kafka 代理地址,可以多个
+#本地开发
+spring.kafka.bootstrap-servers=127.0.0.1:9092
+spring.kafka.listener.missing-topics-fatal=false
+#测试服务器
+#spring.kafka.bootstrap-servers=47.107.240.183:9092,112.74.48.214:9092,120.79.80.138:9092
+#正式
+#spring.kafka.bootstrap-servers=39.108.55.24:9092
+
+#=============== consumer  =======================
+#### kafka配置消费者 start ####
+# 指定kafka 默认消费者group id --> 由于在kafka中,同一组中的consumer不会读取到同一个消息,依靠groud.id设置组名
+spring.kafka.consumer.group-id=superdesk-uniorder-executor-instance
+#### kafka配置消费者   end ####
+
+# ######################################## [kafka]   end ########################################
+
+
+# ######################################## [xxl-job] start ########################################
+
+env.output.enabled=true
 ### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
 xxl.job.admin.addresses=http://127.0.0.1:18168/jobadmin
 ### xxl-job, access token
@@ -56,6 +87,139 @@ xxl.job.executor.address=
 xxl.job.executor.ip=
 xxl.job.executor.port=28888
 ### xxl-job executor log-path
-xxl.job.executor.logpath=/Users/story/data/applogs/xxl-job/jobhandler
+#xxl.job.executor.logpath=
 ### xxl-job executor log-retention-days
-xxl.job.executor.logretentiondays=30
+xxl.job.executor.logretentiondays=30
+
+# ######################################## [xxl-job]   end ########################################
+
+
+
+excel.export.enabled=true
+excel.export.path.root=/Users/linjinyu/tmp
+excel.export.path.template=/template
+excel.export.path.storage=/_storage
+
+
+goods.transport.fiscal_code=3040409030000000000
+goods.transport.tax_code=3040409030000000000
+goods.transport.tax_rate=6
+
+
+
+
+# 关于调用第三方Api
+retrofit.pool.test1.max-idle-connections=3
+retrofit.pool.test1.keep-alive-second=100
+retrofit.disable-void-return-type=false
+retrofit.global-converter-factories[0]=com.github.lianjiatech.retrofit.spring.boot.core.BasicTypeConverterFactory
+retrofit.global-converter-factories[1]=retrofit2.converter.jackson.JacksonConverterFactory
+retrofit.global-call-adapter-factories[0]=com.github.lianjiatech.retrofit.spring.boot.core.BodyCallAdapterFactory
+retrofit.global-call-adapter-factories[1]=com.github.lianjiatech.retrofit.spring.boot.core.ResponseCallAdapterFactory
+retrofit.log.enable=true
+retrofit.log.logging-interceptor=com.github.lianjiatech.retrofit.spring.boot.interceptor.DefaultLoggingInterceptor
+retrofit.log.global-log-level=info
+retrofit.log.global-log-strategy=body
+retrofit.retry.enable-global-retry=true
+retrofit.retry.global-interval-ms=1
+retrofit.retry.global-max-retries=1
+retrofit.retry.global-retry-rules[0]=response_status_not_2xx
+retrofit.retry.global-retry-rules[1]=occur_io_exception
+retrofit.retry.retry-interceptor=com.github.lianjiatech.retrofit.spring.boot.retry.DefaultRetryInterceptor
+retrofit.degrade.enable=true
+retrofit.degrade.degrade-type=sentinel
+retrofit.degrade.resource-name-parser=com.github.lianjiatech.retrofit.spring.boot.degrade.DefaultResourceNameParser
+retrofit.global-connect-timeout-ms=5000
+retrofit.global-read-timeout-ms=5000
+retrofit.global-write-timeout-ms=5000
+retrofit.global-call-timeout-ms=0
+
+
+# push message url & h5 url
+pushMessage.orgId=627
+pushMessage.url=http://wx.palmnest.com/super_service/wechat/pushmsgout/phonemsg
+h5.url=http://119.23.39.237/avicfile/ordermanger/h5/#/
+
+
+# 超级前台 福利商城 生产环境
+test.superdeskmall.flsc.baseUrl=https://fm.superdesk.cn/
+test.superdeskmall.flsc.accessToken=fp3PTngM5vdvLupZVRHkE2UeWl2u8a2V
+test.superdeskmall.flsc.accessKeyId=root
+test.superdeskmall.flsc.accessKeySecret=123456
+
+# 侨城汇 福利商城 生产环境
+test.superdeskmall.flscqch.baseUrl=https://welfarepre.octlife.cn/
+test.superdeskmall.flscqch.accessToken=fp3PTngM5vdvLupZVRHkE2UeWl2u8a2V
+test.superdeskmall.flscqch.accessKeyId=root
+test.superdeskmall.flscqch.accessKeySecret=123456
+
+# 超级前台 企业内购 生产环境
+test.superdeskmall.qyng.baseUrl=https://bm.superdesk.cn/
+test.superdeskmall.qyng.accessToken=fp3PTngM5vdvLupZVRHkE2UeWl2u8a2V
+test.superdeskmall.qyng.accessKeyId=root
+test.superdeskmall.qyng.accessKeySecret=123456
+
+# 侨城汇 统一订单 生产环境
+test.superdesk.uniorder.octlife.baseUrl=https://uniorderapi.octlife.cn/
+#test.superdesk.uniorder.octlife.baseUrl=https://ordertest.octlife.cn/
+#test.superdesk.uniorder.octlife.baseUrl=http://192.168.6.223:8089/
+test.superdesk.uniorder.octlife.accessToken=fp3PTngM5vdvLupZVRHkE2UeWl2u8a2V
+# Native/ASCII
+# 45 广州康柏特贸易有限公司 \u5e7f\u5dde\u5eb7\u67cf\u7279\u8d38\u6613\u6709\u9650\u516c\u53f8
+# 1 前台优选 \u524d\u53f0\u4f18\u9009
+test.superdesk.uniorder.octlife.accessKeyId=1
+test.superdesk.uniorder.octlife.accessKeySecret=\u524d\u53f0\u4f18\u9009
+#test.superdesk.uniorder.octlife.accessKeyId=45
+#test.superdesk.uniorder.octlife.accessKeySecret=\u5e7f\u5dde\u5eb7\u67cf\u7279\u8d38\u6613\u6709\u9650\u516c\u53f8
+
+# 超级前台 服务之窗 测试环境
+test.superdesk.cloud.opendata.baseUrl=http://wx.palmnest.com/
+test.superdesk.cloud.opendata.accessToken=fp3PTngM5vdvLupZVRHkE2UeWl2u8a2V
+test.superdesk.cloud.opendata.accessKeyId=fwzcFiCI7Ulg854dOufU
+test.superdesk.cloud.opendata.accessKeySecret=b8c4d9d706c71a08e2230d30f4b713720cb1be0f
+
+# 超级前台 服务之窗 生产环境
+#test.superdesk.cloud.opendata.baseUrl=http://superdesk.avic-s.com/
+#test.superdesk.cloud.opendata.accessToken=fp3PTngM5vdvLupZVRHkE2UeWl2u8a2V
+#test.superdesk.cloud.opendata.accessKeyId=fwzcFiCI7Ulg854dOufU
+#test.superdesk.cloud.opendata.accessKeySecret=b8c4d9d706c71a08e2230d30f4b713720cb1be0f
+
+
+#https://eitest.szhtxx.com/dzfpTest/electronicInvoiceFunction
+#https://eitest.szhtxx.com:10443/dzfpTest/electronicInvoiceFunction
+
+# szhtxx.electronicInvoice 测试环境
+#openapi.call.thirdpart.szhtxx.electronicInvoice.enabled=true
+#openapi.call.thirdpart.szhtxx.electronicInvoice.baseUrl=https://eitest.szhtxx.com/dzfpTest/
+#openapi.call.thirdpart.szhtxx.electronicInvoice.accessToken=1031530698uNeAnogkN8kkbppABrnF+Q==
+#openapi.call.thirdpart.szhtxx.electronicInvoice.accessKeyId=440301999999980
+#openapi.call.thirdpart.szhtxx.electronicInvoice.accessKeySecret=1031530698uNeAnogkN8kkbppABrnF+Q==
+
+openapi.call.thirdpart.szhtxx.electronicInvoice.enabled=true
+openapi.call.thirdpart.szhtxx.electronicInvoice.baseUrl=https://eitest.szhtxx.com:10443/dzfpTest/
+openapi.call.thirdpart.szhtxx.electronicInvoice.accessToken=1031530698uNeAnogkN8kkbppABrnF+Q==
+openapi.call.thirdpart.szhtxx.electronicInvoice.accessKeyId=440301999999980
+openapi.call.thirdpart.szhtxx.electronicInvoice.accessKeySecret=1031530698uNeAnogkN8kkbppABrnF+Q==
+
+
+qchjc.domain=http://139.9.216.19:8826
+qchjc.customer.makeInvoiceStatusSyncApi=/mall/reconciliationBuyerInvoice/InvoiceStatusSync
+qchjc.customer.receivePaymentStatusSyncApi=/mall/reconciliationBuyerInvoice/recPaymentStatusSync
+qchjc.customer.statementCancelApi=/mall/reconciliationBuyerInvoice/cancel
+qchjc.customer.receiveInvoiceStatusSyncApi=/mall/receiveInvoiceStatusSyncApi
+
+qchjc.supplier.receiveInvoiceStatusSyncApi=/mall/reconciliationSupplier/recInvoiceStatusSync
+qchjc.supplier.paymentStatusSyncApi=/mall/reconciliationSupplier/paymentStatusSync
+qchjc.supplier.statementCancelApi=/mall/reconciliationSupplier/cancel
+qchjc.push.enable=true
+
+
+
+
+
+
+
+
+
+
+

+ 81 - 18
superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/resources/application.properties

@@ -2,7 +2,7 @@
 #spring.profiles.active=dev
 spring.profiles.active=@profiles.active@
 
-spring.application.name=superdesk-uniorder-xxl-job-executor
+spring.application.name=superdesk-uniorder-executor-instance
 
 
 spring.http.encoding.charset=UTF-8
@@ -11,27 +11,12 @@ spring.http.encoding.force=true
 
 # embedded server
 server.port=8067
-server.servlet.context-path=/jobExecutor
+server.servlet.context-path=/executor
 server.servlet.session.timeout=60
 
 server.tomcat.max-threads=800
 server.tomcat.uri-encoding=utf-8
 
-# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
-# 不要设置过大,如果过大,启动项目会报错:打开文件数过多
-# CPU有几核,就填写几。
-server.undertow.io-threads=32
-# 阻塞任务线程池, 当执行类似servlet请求阻塞IO操作, undertow会从这个线程池中取得线程
-# 它的值设置取决于系统线程执行任务的阻塞系数,默认值是IO线程数*8
-server.undertow.worker-threads=2000
-# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
-# 每块buffer的空间大小,越小的空间被利用越充分,不要设置太大,以免影响其他应用,合适即可
-server.undertow.buffer-size=1024
-# 每个区分配的buffer数量 , 所以pool的大小是buffer-size * buffers-per-region
-server.undertow.buffers-per-region=1024
-# 是否分配的直接内存(NIO直接分配的堆外内存)
-server.undertow.direct-buffers=true
-
 #开发环境下,关闭Thymeleaf缓存;生产环境需开启增强并发能力
 spring.thymeleaf.cache=false
 
@@ -39,6 +24,7 @@ spring.thymeleaf.cache=false
 #日期格式化
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
 spring.jackson.time-zone=GMT+8
+spring.jackson.time-zone=Asia/Shanghai
 spring.jackson.serialization.write-dates-as-timestamps=true
 
 swagger.enable=true
@@ -52,6 +38,15 @@ spring.mail.properties.mail.smtp.starttls.enable=true
 spring.mail.properties.mail.smtp.starttls.required=true
 
 
+#### kafka配置公共的 begin ####
+# sasl
+#spring.kafka.properties.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="java_connect_kafka" password="java_connect_kafka_pwd";
+#spring.kafka.properties.sasl.mechanism=PLAIN
+#spring.kafka.properties.security.protocol=SASL_PLAINTEXT
+#
+#### kafka配置公共的 begin ####
+
+
 #### kafka配置生产者 begin ####
 # 写入失败时,重试次数。当leader节点失效,一个repli节点会替代成为leader节点,此时可能出现写入失败,
 # 当retris为0时,produce不会重复。retirs重发,此时repli节点完全成为leader节点,不会产生消息丢失。
@@ -69,6 +64,13 @@ spring.kafka.producer.acks=1
 # 指定消息key和消息体的编解码方式
 spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
 spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
+
+# sasl
+#spring.kafka.producer.properties.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="java_connect_kafka" password="java_connect_kafka_pwd";
+#spring.kafka.producer.properties.sasl.mechanism=PLAIN
+#spring.kafka.producer.properties.security.protocol=SASL_PLAINTEXT
+#
+
 #### kafka配置生产者 end ####
 
 #### kafka配置消费者 start ####
@@ -85,4 +87,65 @@ spring.kafka.consumer.auto-commit-interval=1000
 spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
 # value的解码方式
 spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer
-#### kafka配置消费者 end ####
+
+# sasl
+#spring.kafka.consumer.properties.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="java_connect_kafka" password="java_connect_kafka_pwd";
+#spring.kafka.consumer.properties.sasl.mechanism=PLAIN
+#spring.kafka.consumer.properties.security.protocol=SASL_PLAINTEXT
+#
+
+#### kafka配置消费者 end ####
+
+
+spring.kafka.listener.missing-topics-fatal=false
+
+
+env.output.enabled=true
+env.output.path.root=/Users/linjinyu/tmp
+env.output.path.template=/template
+env.output.path.storage=/_storage
+
+
+
+# datasource
+spring.datasource.druid.initial-size=5
+spring.datasource.druid.min-idle=5
+spring.datasource.druid.max-active=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.validation-query=select 'x'
+
+# redis
+spring.redis.pool.maxActive=8
+spring.redis.pool.maxWait=-1
+spring.redis.pool.maxIdle=8
+spring.redis.pool.minIdle=0
+spring.redis.timeout=0
+
+
+# mybatis & pagehelper
+mybatis.type-aliases-package=cn.superdesk.uniorder.dao.entity
+#mybatis.mapper-locations=classpath*:mappers/*/*.xml,mappers/*/*/*.xml,mappers/*/*/*/*.xml
+mybatis.mapper-locations=classpath*:mappers/**/*.xml
+#mybatis.configuration.map-underscore-to-camel-case=true
+#mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+mybatis.configuration.log-impl=cn.superdesk.uniorder.config.mybatis.SlefLog
+#mybatis.configuration.lazy-loading-enabled=true
+#mybatis.configuration.use-generated-keys=true
+#mybatis.configuration.default-executor-type=reuse
+#mybatis.configuration.default-statement-timeout=30
+mybatis.configuration.map-underscore-to-camel-case=true
+#mybatis.configuration.auto-mapping-behavior=full
+
+# 配置mybaits自定义类型转换类所在的包
+#mybatis.type-handlers-package=cn.superdesk.uniorder.common.msyql.JSONFiled
+#配置mybaits自定义类型转换类所在的包
+mybatis.type-handlers-package=cn.superdesk.uniorder.dao.typehandler
+
+# mybatis plugins
+pagehelper.helper-dialect=mysql
+pagehelper.reasonable=false
+pagehelper.support-methods-arguments=true
+pagehelper.params=count=countSql
+
+# logger debug
+logging.level.cn.superdesk.uniorder.dao.mapper=info

+ 208 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-instance/src/main/resources/logback-spring.xml

@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
+<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
+<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
+<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
+<configuration scan="true" scanPeriod="10 seconds">
+
+	<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
+
+	<contextName>logback</contextName>
+	<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
+	<property name="log.path" value="./.logs/superdesk-uniorder-executor-instance"/>
+
+	<!-- 彩色日志 -->
+	<!-- 彩色日志依赖的渲染类 -->
+	<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
+	<conversionRule conversionWord="wex"
+	                converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
+	<conversionRule conversionWord="wEx"
+	                converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
+	<!-- 彩色日志格式 -->
+	<property name="CONSOLE_LOG_PATTERN"
+	          value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
+
+
+	<!--输出到控制台-->
+	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+		<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
+		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+			<level>info</level>
+		</filter>
+		<encoder>
+			<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
+			<!-- 设置字符集 -->
+			<charset>UTF-8</charset>
+		</encoder>
+	</appender>
+
+
+	<!--输出到文件-->
+
+	<!-- 时间滚动输出 level为 DEBUG 日志 -->
+	<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<!-- 正在记录的日志文件的路径及文件名 -->
+		<file>${log.path}/log_debug.log</file>
+		<!--日志文件输出格式-->
+		<encoder>
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+			<charset>UTF-8</charset> <!-- 设置字符集 -->
+		</encoder>
+		<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<!-- 日志归档 -->
+			<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+			<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<maxFileSize>100MB</maxFileSize>
+			</timeBasedFileNamingAndTriggeringPolicy>
+			<!--日志文件保留天数-->
+			<maxHistory>15</maxHistory>
+		</rollingPolicy>
+		<!-- 此日志文件只记录debug级别的 -->
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+			<level>debug</level>
+			<onMatch>ACCEPT</onMatch>
+			<onMismatch>DENY</onMismatch>
+		</filter>
+	</appender>
+
+	<!-- 时间滚动输出 level为 INFO 日志 -->
+	<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<!-- 正在记录的日志文件的路径及文件名 -->
+		<file>${log.path}/log_info.log</file>
+		<!--日志文件输出格式-->
+		<encoder>
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+			<charset>UTF-8</charset>
+		</encoder>
+		<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<!-- 每天日志归档路径以及格式 -->
+			<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+			<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<maxFileSize>100MB</maxFileSize>
+			</timeBasedFileNamingAndTriggeringPolicy>
+			<!--日志文件保留天数-->
+			<maxHistory>15</maxHistory>
+		</rollingPolicy>
+		<!-- 此日志文件只记录info级别的 -->
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+			<level>info</level>
+			<onMatch>ACCEPT</onMatch>
+			<onMismatch>DENY</onMismatch>
+		</filter>
+	</appender>
+
+	<!-- 时间滚动输出 level为 WARN 日志 -->
+	<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<!-- 正在记录的日志文件的路径及文件名 -->
+		<file>${log.path}/log_warn.log</file>
+		<!--日志文件输出格式-->
+		<encoder>
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+			<charset>UTF-8</charset> <!-- 此处设置字符集 -->
+		</encoder>
+		<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+			<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<maxFileSize>100MB</maxFileSize>
+			</timeBasedFileNamingAndTriggeringPolicy>
+			<!--日志文件保留天数-->
+			<maxHistory>15</maxHistory>
+		</rollingPolicy>
+		<!-- 此日志文件只记录warn级别的 -->
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+			<level>warn</level>
+			<onMatch>ACCEPT</onMatch>
+			<onMismatch>DENY</onMismatch>
+		</filter>
+	</appender>
+
+
+	<!-- 时间滚动输出 level为 ERROR 日志 -->
+	<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<!-- 正在记录的日志文件的路径及文件名 -->
+		<file>${log.path}/log_error.log</file>
+		<!--日志文件输出格式-->
+		<encoder>
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+			<charset>UTF-8</charset> <!-- 此处设置字符集 -->
+		</encoder>
+		<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+			<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+				<maxFileSize>100MB</maxFileSize>
+			</timeBasedFileNamingAndTriggeringPolicy>
+			<!--日志文件保留天数-->
+			<maxHistory>15</maxHistory>
+		</rollingPolicy>
+		<!-- 此日志文件只记录ERROR级别的 -->
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+			<level>ERROR</level>
+			<onMatch>ACCEPT</onMatch>
+			<onMismatch>DENY</onMismatch>
+		</filter>
+	</appender>
+
+	<!--
+		<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
+				以及指定<appender><logger>仅有一个name属性,
+				一个可选的level和一个可选的addtivity属性。
+		name:用来指定受此logger约束的某一个包或者具体的某一个类。
+		level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
+			  还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
+			  如果未设置此属性,那么当前logger将会继承上级的级别。
+		addtivity:是否向上级logger传递打印信息。默认是true。
+	-->
+	<!--<logger name="org.springframework.web" level="info"/>-->
+	<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
+	<!--
+		使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
+		第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
+		第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
+	 -->
+
+
+	<!--
+		root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
+		level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
+		不能设置为INHERITED或者同义词NULL。默认是DEBUG
+		可以包含零个或多个元素,标识这个appender将会添加到这个logger。
+	-->
+
+	<!--开发环境:打印控制台-->
+<!--	<springProfile name="dev">-->
+<!--		<logger name="cn.superdesk.app.transfer.mq.receive.consumer" level="debug"/>-->
+<!--	</springProfile>-->
+
+	<root level="info">
+		<appender-ref ref="CONSOLE"/>
+		<appender-ref ref="DEBUG_FILE"/>
+		<appender-ref ref="INFO_FILE"/>
+		<appender-ref ref="WARN_FILE"/>
+		<appender-ref ref="ERROR_FILE"/>
+	</root>
+
+	<!--	生产环境:输出到文件-->
+	<springProfile name="uat">
+		<root level="info">
+			<appender-ref ref="CONSOLE"/>
+			<appender-ref ref="DEBUG_FILE"/>
+			<appender-ref ref="INFO_FILE"/>
+			<appender-ref ref="ERROR_FILE"/>
+			<appender-ref ref="WARN_FILE"/>
+		</root>
+	</springProfile>
+	<springProfile name="pro">
+		<root level="info">
+			<appender-ref ref="CONSOLE"/>
+			<appender-ref ref="DEBUG_FILE"/>
+			<appender-ref ref="INFO_FILE"/>
+			<appender-ref ref="ERROR_FILE"/>
+			<appender-ref ref="WARN_FILE"/>
+		</root>
+	</springProfile>
+
+</configuration>

+ 8 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/init.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+touch pom.xml
+
+mkdir src
+mkdir ./src/main
+mkdir ./src/main/java
+mkdir ./src/main/resources

+ 33 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/pom.xml

@@ -0,0 +1,33 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>cn.superdesk.uniorder</groupId>
+        <artifactId>superdesk-uniorder-executor</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>superdesk-uniorder-executor-scheduler-kafka-provider</artifactId>
+
+
+    <dependencies>
+
+
+        <!-- kafka -->
+        <dependency>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka</artifactId>
+            <!-- <version>2.1.6.RELEASE</version>-->
+        </dependency>
+
+        <dependency>
+            <groupId>cn.superdesk.uniorder</groupId>
+            <artifactId>superdesk-uniorder-executor-scheduler-kafka-constants</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+    </dependencies>
+
+
+</project>

+ 85 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/QchjcStatementEventPublisher.java

@@ -0,0 +1,85 @@
+package cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc;
+
+import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc._constants.TopicChannelConstants;
+import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc._constants.enums.QchjcCustomerStatementEventEnum;
+import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc._constants.enums.QchjcSupplierStatementEventEnum;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 集采账单状态推送 QchjcStatementEventPublisher
+ * @Author: linjinyu
+ * @CreateDate: 2022/5/10 2:31 下午
+ * @UpdateUser: linjinyu
+ * @UpdateDate: 2022/5/10 2:31 下午
+ * @UpdateRemark: 修改内容
+ * @Version: 1.0
+ */
+@Slf4j
+@Service
+public class QchjcStatementEventPublisher {
+
+    @Autowired
+    private KafkaTemplate<String, String> kafkaTemplate;
+
+    /****************************************  start ****************************************/
+
+    public void customerStatementEventMakeInvoiceStatusSync(String messageBody) {
+        kafkaTemplate.send(
+                TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_CUSTOMER_STATEMENT,
+                QchjcCustomerStatementEventEnum.开票状态同步.getKey(),
+                messageBody
+        );
+    }
+
+    public void customerStatementEventReceivePaymentStatusSync(String messageBody) {
+        kafkaTemplate.send(
+                TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_CUSTOMER_STATEMENT,
+                QchjcCustomerStatementEventEnum.收款状态同步.getKey(),
+                messageBody
+        );
+    }
+
+    public void customerStatementEventStatementCancelSync(String messageBody) {
+        kafkaTemplate.send(
+                TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_CUSTOMER_STATEMENT,
+                QchjcCustomerStatementEventEnum.账单作废同步.getKey(),
+                messageBody
+        );
+    }
+
+    /****************************************  start ****************************************/
+
+
+    /****************************************  start ****************************************/
+
+    public void supplierStatementEventReceiveInvoiceStatusSync(String messageBody) {
+        kafkaTemplate.send(
+                TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_SUPPLIER_STATEMENT,
+                QchjcSupplierStatementEventEnum.收票状态同步.getKey(),
+                messageBody
+        );
+    }
+
+    public void supplierStatementEventPaymentStatusSync(String messageBody) {
+        kafkaTemplate.send(
+                TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_SUPPLIER_STATEMENT,
+                QchjcSupplierStatementEventEnum.付款状态同步.getKey(),
+                messageBody
+        );
+    }
+
+    public void supplierStatementEventStatementCancelSync(String messageBody) {
+        kafkaTemplate.send(
+                TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_SUPPLIER_STATEMENT,
+                QchjcSupplierStatementEventEnum.账单作废同步.getKey(),
+                messageBody
+        );
+    }
+
+
+    /****************************************  start ****************************************/
+
+}

+ 1 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka-provider/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/package-info.java

@@ -0,0 +1 @@
+package cn.superdesk.uniorder.executor.scheduler.kafka;

+ 23 - 1
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/pom.xml

@@ -22,7 +22,6 @@
         <dependency>
             <groupId>org.springframework.kafka</groupId>
             <artifactId>spring-kafka</artifactId>
-            <!-- <version>2.1.6.RELEASE</version>-->
         </dependency>
 
         <dependency>
@@ -31,6 +30,29 @@
             <version>${project.parent.version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>cn.superdesk.uniorder</groupId>
+            <artifactId>superdesk-uniorder-dto</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.superdesk.uniorder</groupId>
+            <artifactId>superdesk-uniorder-common</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.superdesk.uniorder</groupId>
+            <artifactId>superdesk-uniorder-dao</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.superdesk.uniorder</groupId>
+            <artifactId>superdesk-uniorder-service</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+
+
     </dependencies>
 
 </project>

+ 8 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/customer/QchjcCustomerStatementHandler.java

@@ -2,9 +2,11 @@ package cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc.accounti
 
 import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc._constants.TopicChannelConstants;
 import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc._constants.enums.QchjcCustomerStatementEventEnum;
+import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc.accounting.customer.biz.QchjcCustomerStatementHandleService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.kafka.annotation.KafkaListener;
 import org.springframework.stereotype.Component;
 
@@ -23,6 +25,9 @@ import java.util.Optional;
 @Component
 public class QchjcCustomerStatementHandler {
 
+    @Autowired
+    private QchjcCustomerStatementHandleService qchjcCustomerStatementHandleService;
+
 
     @KafkaListener(topics = {TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_CUSTOMER_STATEMENT})
     public void listenQchjcCustomerStatement(ConsumerRecord<?, ?> record) {
@@ -37,10 +42,13 @@ public class QchjcCustomerStatementHandler {
 
                 switch (QchjcCustomerStatementEventEnum.get(String.valueOf(record.key()))) {
                     case 开票状态同步:
+                        qchjcCustomerStatementHandleService.makeInvoiceStatusSyncHandle(String.valueOf(message));
                         break;
                     case 收款状态同步:
+                        qchjcCustomerStatementHandleService.receivePaymentStatusSyncHandle(String.valueOf(message));
                         break;
                     case 账单作废同步:
+                        qchjcCustomerStatementHandleService.statementCancelSyncHandle(String.valueOf(message));
                         break;
                     default:
                         break;

+ 37 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/customer/biz/QchjcCustomerStatementHandleService.java

@@ -0,0 +1,37 @@
+package cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc.accounting.customer.biz;
+
+
+import cn.superdesk.uniorder.service.thirdpart.qchjc.account.QchjcCustomerStatementService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: Java类作用描述
+ * @Author: linjinyu
+ * @CreateDate: 2022/5/10 2:42 下午
+ * @UpdateUser: linjinyu
+ * @UpdateDate: 2022/5/10 2:42 下午
+ * @UpdateRemark: 修改内容
+ * @Version: 1.0
+ */
+@Slf4j
+@Service
+public class QchjcCustomerStatementHandleService {
+
+    @Autowired
+    private QchjcCustomerStatementService qchjcCustomerStatementService;
+
+    public int makeInvoiceStatusSyncHandle(String messageBody) {
+        return 0;
+    }
+
+    public int receivePaymentStatusSyncHandle(String messageBody) {
+        return 0;
+    }
+
+    public int statementCancelSyncHandle(String messageBody) {
+        return 0;
+    }
+
+}

+ 9 - 1
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/supplier/QchjcSupplierStatementHandler.java

@@ -2,9 +2,11 @@ package cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc.accounti
 
 import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc._constants.TopicChannelConstants;
 import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc._constants.enums.QchjcSupplierStatementEventEnum;
+import cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc.accounting.supplier.biz.QchjcSupplierStatementHandleService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.kafka.annotation.KafkaListener;
 import org.springframework.stereotype.Component;
 
@@ -23,9 +25,12 @@ import java.util.Optional;
 @Component
 public class QchjcSupplierStatementHandler {
 
+    @Autowired
+    private QchjcSupplierStatementHandleService qchjcSupplierStatementHandleService;
+
 
     @KafkaListener(topics = {TopicChannelConstants.TOPIC_EVENT_CHANNEL_QCHJC_SUPPLIER_STATEMENT})
-    public void listenQchjcCustomerStatement(ConsumerRecord<?, ?> record) {
+    public void listenQchjcSupplierStatement(ConsumerRecord<?, ?> record) {
 
         Optional<?> kafkaMessage = Optional.ofNullable(record.value());
 
@@ -37,10 +42,13 @@ public class QchjcSupplierStatementHandler {
 
                 switch (QchjcSupplierStatementEventEnum.get(String.valueOf(record.key()))) {
                     case 收票状态同步:
+                        qchjcSupplierStatementHandleService.receiveInvoiceStatusSyncHandle(String.valueOf(message));
                         break;
                     case 付款状态同步:
+                        qchjcSupplierStatementHandleService.paymentStatusSyncHandle(String.valueOf(message));
                         break;
                     case 账单作废同步:
+                        qchjcSupplierStatementHandleService.statementCancelSyncHandle(String.valueOf(message));
                         break;
                     default:
                         break;

+ 36 - 0
superdesk-uniorder-executor/superdesk-uniorder-executor-scheduler-kafka/src/main/java/cn/superdesk/uniorder/executor/scheduler/kafka/_thirdpart/qchjc/accounting/supplier/biz/QchjcSupplierStatementHandleService.java

@@ -0,0 +1,36 @@
+package cn.superdesk.uniorder.executor.scheduler.kafka._thirdpart.qchjc.accounting.supplier.biz;
+
+import cn.superdesk.uniorder.service.thirdpart.qchjc.account.QchjcSupplierStatementService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: Java类作用描述
+ * @Author: linjinyu
+ * @CreateDate: 2022/5/10 2:43 下午
+ * @UpdateUser: linjinyu
+ * @UpdateDate: 2022/5/10 2:43 下午
+ * @UpdateRemark: 修改内容
+ * @Version: 1.0
+ */
+@Slf4j
+@Service
+public class QchjcSupplierStatementHandleService {
+
+
+    @Autowired
+    private QchjcSupplierStatementService qchjcSupplierStatementService;
+
+    public int receiveInvoiceStatusSyncHandle(String messageBody) {
+        return 0;
+    }
+
+    public int paymentStatusSyncHandle(String messageBody) {
+        return 0;
+    }
+
+    public int statementCancelSyncHandle(String messageBody) {
+        return 0;
+    }
+}

+ 1 - 1
superdesk-uniorder-openapi/src/main/resources/logback-spring.xml

@@ -9,7 +9,7 @@
 
 	<contextName>logback</contextName>
 	<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
-	<property name="log.path" value="./logs/superdesk-uniorder-openapi"/>
+	<property name="log.path" value="./.logs/superdesk-uniorder-openapi"/>
 
 	<!-- 彩色日志 -->
 	<!-- 彩色日志依赖的渲染类 -->

+ 1 - 1
superdesk-uniorder-openapicall/src/main/resources/logback-spring.xml

@@ -9,7 +9,7 @@
 
 	<contextName>logback</contextName>
 	<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
-	<property name="log.path" value="./logs/superdesk-uniorder-openapicall"/>
+	<property name="log.path" value="./.logs/superdesk-uniorder-openapicall"/>
 
 	<!-- 彩色日志 -->
 	<!-- 彩色日志依赖的渲染类 -->

+ 14 - 10
superdesk-uniorder-service/pom.xml

@@ -176,16 +176,20 @@
             <artifactId>superdesk-uniorder-dao</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
-        <dependency>
-            <groupId>cn.superdesk.uniorder</groupId>
-            <artifactId>superdesk-uniorder-dubbo-facade</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>cn.superdesk.uniorder</groupId>
-            <artifactId>superdesk-uniorder-dubbo-consumer</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
+
+        <!-- 见鬼了,忘记为什么这里要加这个,先屏再看有什么问题 start -->
+<!--        <dependency>-->
+<!--            <groupId>cn.superdesk.uniorder</groupId>-->
+<!--            <artifactId>superdesk-uniorder-dubbo-facade</artifactId>-->
+<!--            <version>${project.parent.version}</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>cn.superdesk.uniorder</groupId>-->
+<!--            <artifactId>superdesk-uniorder-dubbo-consumer</artifactId>-->
+<!--            <version>${project.parent.version}</version>-->
+<!--        </dependency>-->
+        <!-- 见鬼了,忘记为什么这里要加这个,先屏再看有什么问题   end -->
+
 
 
         <dependency>

+ 16 - 1
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/invoice/customer/impl/InvoiceApplyCustomerFieldMakeInvoiceStatusOpOngoingSzhtxxElectronicInvoiceServiceImpl.java

@@ -515,7 +515,22 @@ public class InvoiceApplyCustomerFieldMakeInvoiceStatusOpOngoingSzhtxxElectronic
 
                 xmxx.add(plus);
 
-                if (goodsItemDiffAmount.compareTo(BigDecimal.ZERO) != 0) {
+                log.info("观 扣减项 {} 比 {} => {}", goodsItemDiffAmount, new BigDecimal(0.00), goodsItemDiffAmount.compareTo(new BigDecimal(0.00)));
+
+                /**************************************** 特殊数据 start ****************************************/
+
+//                总数项::金额(含税):100.00 总数项::金额(不含税):88.50 总数项::税额:11.50 累计税额:0 税率: 1.13
+//                正常项::金额(含税):0.4080 正常项::金额(不含税):0.36 正常项::税额:0.0480 累计税额:0.0500 税率: 1.13 订单号: ME20220419174838242473 订单id: 313491 商品id: 1043135 流水Id: 718281
+//                扣减项::金额(含税):0.0020 扣减项::金额(不含税):0.00 扣减项::税额:0.0020 累计税额:0.0500 税率: 1.13
+//                正常项::金额(含税):198.0000 正常项::金额(不含税):175.22 正常项::税额:22.7800 累计税额:11.5100 税率: 1.13 订单号: ME20220419174838230483 订单id: 313492 商品id: 1043139 流水Id: 718285
+//                扣减项::金额(含税):-98.4100 扣减项::金额(不含税):-87.09 扣减项::税额:-11.3200 累计税额:11.5100 税率: 1.13
+
+//                观 扣减项 -0.0020 比 0 => -1
+//                观 扣减项 98.4100 比 0 => 1
+
+                /**************************************** 特殊数据 start ****************************************/
+
+                if (goodsItemDiffAmount.compareTo(new BigDecimal(0.00)) > 0) {
 
                     plus.setFphxz("2");
 

+ 26 - 9
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/invoice/customer/impl/InvoiceApplyFieldBackAccountStatusServiceImpl.java

@@ -16,6 +16,7 @@ import cn.superdesk.uniorder.service.base.UnifiedOrderCreditService;
 import cn.superdesk.uniorder.service.invoice.customer.InvoiceApplyCustomerService;
 import cn.superdesk.uniorder.service.invoice.customer.InvoiceApplyCustomerFieldBackAccountStatusService;
 import cn.superdesk.uniorder.service.invoice.customer.InvoiceApplyXGoodsService;
+import cn.superdesk.uniorder.service.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfoService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -43,6 +44,9 @@ public class InvoiceApplyFieldBackAccountStatusServiceImpl implements InvoiceApp
     private InvoiceApplyXGoodsService   invoiceApplyXGoodsService;
 
     @Autowired
+    private SzhtxxElectronicInvoiceFptxxExtendInfoService szhtxxElectronicInvoiceFptxxExtendInfoService;
+
+    @Autowired
     private UnifiedOrderCreditService unifiedOrderCreditService;
 
     /****************************************** 状态机 公共方法 机内使用 实际流转 重用 start ******************************************/
@@ -209,6 +213,8 @@ public class InvoiceApplyFieldBackAccountStatusServiceImpl implements InvoiceApp
          */
         Map<Long, OpChangeStatusBaseItem> shortcut = form.getSubmitList().stream().collect(Collectors.toMap(OpChangeStatusBaseItem::getInvoiceApplyId, v -> v, (k, v) -> v));
 
+        DateTime now = DateUtil.date();
+
         entitys.forEach(entity -> {
 
             InvoiceApply forUpdate = new InvoiceApply();
@@ -217,15 +223,15 @@ public class InvoiceApplyFieldBackAccountStatusServiceImpl implements InvoiceApp
             // TODO 更新状态逻辑...
             forUpdate.setInvoiceStatus(InvoiceApplyCustomerInvoiceProgressingStatusEnum.已完成.getKey());
             forUpdate.setInvoiceProgressingUserId(loginSysUser.getSysUserId());
-            forUpdate.setInvoiceProgressingTime(DateUtil.date());
+            forUpdate.setInvoiceProgressingTime(now);
 
 
             forUpdate.setBackAccountStatus(InvoiceApplyCustomerBackAccountStatusEnum.已回款.getKey());
             forUpdate.setBackAccountUserId(loginSysUser.getSysUserId());
-            forUpdate.setBackAccountTime(DateUtil.date());
+            forUpdate.setBackAccountTime(now);
 
             forUpdate.setUpdateUserId(loginSysUser.getSysUserId());
-            forUpdate.setUpdateTime(DateUtil.date());
+            forUpdate.setUpdateTime(now);
 
             invoiceApplyCustomerService.updateInvoiceApplyByPrimaryKeySelective(forUpdate);
 
@@ -234,14 +240,15 @@ public class InvoiceApplyFieldBackAccountStatusServiceImpl implements InvoiceApp
 
         // BeRelated 联级更新 trigger
         // 1. 更新 流水's 回款状态
-        processTailRelatedUpdate(entitys);
+        // 2. 更新 金税盘发票 扩展信息中的 更新人 更新时间 (不会吧,不会要求与回款登记时间一致吧?怕了,还是一致吧)
+        processTailRelatedUpdate(entitys, loginSysUser, now);
     }
 
-    public int processTailRelatedUpdate(List<InvoiceApply> entitysFromDb) {
+    public int processTailRelatedUpdate(List<InvoiceApply> entitysFromDb, LoginSysUser loginSysUser, DateTime now) {
 
         entitysFromDb.forEach(entityFromDb -> {
 
-            int ret = processTailRelatedUpdate(entityFromDb);
+            int ret = processTailRelatedUpdate(entityFromDb, loginSysUser, now);
         });
 
         return 1;
@@ -251,14 +258,24 @@ public class InvoiceApplyFieldBackAccountStatusServiceImpl implements InvoiceApp
      * 关联更新 单个状态 - 更新 流水's 回款状态
      *
      * @param entityFromDb
+     * @param loginSysUser
+     * @param now
      * @return
      */
-    public int processTailRelatedUpdate(InvoiceApply entityFromDb) {
+    public int processTailRelatedUpdate(InvoiceApply entityFromDb, LoginSysUser loginSysUser, DateTime now) {
+
+        int retUnifiedOrderCreditFieldBackAccountStatus = 0;
+
+        int retUpdateUpdateUserInfo = 0;
+
 
         List<Long> processUnifiedOrderCreditIds = invoiceApplyXGoodsService.findCreditSetByInvoicApplyId(entityFromDb.getId());
 
-        // 更新 流水's 回款状态
-        unifiedOrderCreditService.updateFieldBackAccountStatusByUnifiedOrderCreditIds(processUnifiedOrderCreditIds, UnifiedOrderCreditBackAccountStatusEnum.已回款);
+        // 1. 更新 流水's 回款状态
+        retUnifiedOrderCreditFieldBackAccountStatus = unifiedOrderCreditService.updateFieldBackAccountStatusByUnifiedOrderCreditIds(processUnifiedOrderCreditIds, UnifiedOrderCreditBackAccountStatusEnum.已回款);
+
+        // 2. 更新 金税盘发票 扩展信息中的 更新人 更新时间
+        retUpdateUpdateUserInfo = szhtxxElectronicInvoiceFptxxExtendInfoService.updateUpdateUserInfo(entityFromDb.getInvoiceApplySn(), loginSysUser, now);
 
         return 1;
     }

+ 40 - 10
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/invoice/customer/impl/InvoiceApplyFieldReceiveInvoiceStatusServiceImpl.java

@@ -3,7 +3,9 @@ package cn.superdesk.uniorder.service.invoice.customer.impl;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.superdesk.uniorder.common.bizScene.invoice.common.InvoiceTypeScene;
 import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerInvoiceProgressingStatusEnum;
 import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerReceiveInvoiceStatusEnum;
 import cn.superdesk.uniorder.common.numerical.AnStringUtils;
@@ -100,22 +102,50 @@ public class InvoiceApplyFieldReceiveInvoiceStatusServiceImpl implements Invoice
             InvoiceApply forUpdate = new InvoiceApply();
             forUpdate.setId(invoiceApplyCustomerEntity.getId());
 
-            // 此处为前端提交的
-            InvoiceApplyCustomerOpReceiveInvoiceStatusFormInnerListItem formTmp = shortcut.get(invoiceApplyCustomerEntity.getId());
+            /**************************************** 逻辑优化 20220510 start ****************************************/
 
-            if (ObjectUtil.isNotNull(formTmp) && CollUtil.isNotEmpty(formTmp.getInvoiceNumber())) {
-                forUpdate.setInvoiceNumber(AnStringUtils.stringListConvertToString(formTmp.getInvoiceNumber()));
+            // 原本逻辑为 op运营领票 深圳航信电子发票 前端是不会传发票号的 shortcut 是为了 保证 entitys与submit的对上
+            // 优化逻辑为 在原本基础上添加 是否需求领票登记[发票号]判定
+
+            if (ArrayUtil.contains(
+                    InvoiceTypeScene.modesV2_1_Array_SceneNeedOpReceive(),
+                    invoiceApplyCustomerEntity.getInvoiceMode())
+            ) {
+                // 此处为前端提交的 是为了 保证 entitys与submit的对上
+                InvoiceApplyCustomerOpReceiveInvoiceStatusFormInnerListItem formTmp = shortcut.get(invoiceApplyCustomerEntity.getId());
+
+                if (ObjectUtil.isNotNull(formTmp) && CollUtil.isNotEmpty(formTmp.getInvoiceNumber())) {
+                    forUpdate.setInvoiceNumber(AnStringUtils.stringListConvertToString(formTmp.getInvoiceNumber()));
+                }
             }
 
+            /**************************************** 逻辑优化 20220510  end ****************************************/
+
             // TODO 更新状态逻辑...
 
-            forUpdate.setReceiveInvoiceStatus(InvoiceApplyCustomerReceiveInvoiceStatusEnum.已领票.getKey());
-            forUpdate.setReceiveInvoiceUserId(loginSysUser.getSysUserId());
-            forUpdate.setReceiveInvoiceTime(now);
 
-            forUpdate.setInvoiceStatus(InvoiceApplyCustomerInvoiceProgressingStatusEnum.待寄票.getKey());
-            forUpdate.setInvoiceProgressingUserId(loginSysUser.getSysUserId());
-            forUpdate.setInvoiceProgressingTime(now);
+            /**************************************** 逻辑冲突解决 20220510 start ****************************************/
+
+//            【【结算中心-测试环境】积分结算-发票管理-CAA2022051094482432-混合开票-线下寄票后-电子票申请状态错误】
+//            https://www.tapd.cn/33003868/bugtrace/bugs/view?bug_id=1133003868001005105
+
+            // 解决办法 添加 op运营领票 是否需求领票登记判定 需领票登记的为 [线下开票][深圳航信纸质发票]
+            if (ArrayUtil.contains(
+                    InvoiceTypeScene.modesV2_1_Array_SceneNeedOpReceive(),
+                    invoiceApplyCustomerEntity.getInvoiceMode())
+            ) {
+
+                forUpdate.setReceiveInvoiceStatus(InvoiceApplyCustomerReceiveInvoiceStatusEnum.已领票.getKey());
+                forUpdate.setReceiveInvoiceUserId(loginSysUser.getSysUserId());
+                forUpdate.setReceiveInvoiceTime(now);
+
+                forUpdate.setInvoiceStatus(InvoiceApplyCustomerInvoiceProgressingStatusEnum.待寄票.getKey());
+                forUpdate.setInvoiceProgressingUserId(loginSysUser.getSysUserId());
+                forUpdate.setInvoiceProgressingTime(now);
+
+            }
+
+            /**************************************** 逻辑冲突解决 20220510  end ****************************************/
 
             forUpdate.setUpdateUserId(loginSysUser.getSysUserId());
             forUpdate.setUpdateTime(now);

+ 4 - 0
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/SzhtxxElectronicInvoiceFptxxExtendInfoService.java

@@ -1,7 +1,9 @@
 package cn.superdesk.uniorder.service.thirdpart.szhtxx.electronicInvoice;
 
 
+import cn.hutool.core.date.DateTime;
 import cn.superdesk.uniorder.common.rest.response.R;
+import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
 import cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfo;
 import cn.superdesk.uniorder.dto.param.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfoQueryCriteria;
 import cn.superdesk.uniorder.service.base.BaseService;
@@ -56,6 +58,8 @@ public interface SzhtxxElectronicInvoiceFptxxExtendInfoService extends BaseServi
 
     int updateByPrimaryKeySelectiveWithRet(SzhtxxElectronicInvoiceFptxxExtendInfo entity);
 
+    int updateUpdateUserInfo(String fpqqlsh, LoginSysUser loginSysUser, DateTime now);
+
     int deleteSzhtxxElectronicInvoiceFptxxExtendInfo(Long id);
 
     SzhtxxElectronicInvoiceFptxxExtendInfo findSzhtxxElectronicInvoiceFptxxExtendInfoById(Long id);

+ 4 - 0
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/SzhtxxElectronicInvoiceFptxxService.java

@@ -60,6 +60,8 @@ public interface SzhtxxElectronicInvoiceFptxxService extends BaseService<SzhtxxE
 
     void updateSzhtxxElectronicInvoiceFptxx(SzhtxxElectronicInvoiceFptxx entity);
 
+    int updateSzhtxxElectronicInvoiceFptxxByPrimaryKeySelective(SzhtxxElectronicInvoiceFptxx entity);
+
     int opUpdateLogicalTemp2Normal(String batchId, String fpqqlsh, LoginSysUser loginSysUser);
 
     void deleteSzhtxxElectronicInvoiceFptxx(Long id);
@@ -68,6 +70,8 @@ public interface SzhtxxElectronicInvoiceFptxxService extends BaseService<SzhtxxE
 
     SzhtxxElectronicInvoiceFptxx findByFpqqlsh(String fpqqlsh);
 
+    SzhtxxElectronicInvoiceFptxx findByFpqqlshAndBatchId(String fpqqlsh, String batchId);
+
     R<List<SzhtxxElectronicInvoiceFptxx>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize);
 
     R<List<SzhtxxElectronicInvoiceFptxxListItemVo>> pageQueryGenericParam(SzhtxxElectronicInvoiceFptxxQueryCriteria criteria, LoginSysUser loginSysUser);

+ 39 - 7
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/impl/SzhtxxElectronicInvoiceFptxxExtendInfoServiceImpl.java

@@ -1,8 +1,10 @@
 package cn.superdesk.uniorder.service.thirdpart.szhtxx.electronicInvoice.impl;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateTime;
 import cn.hutool.core.util.ObjectUtil;
 import cn.superdesk.uniorder.common.rest.response.R;
+import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
 import cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfo;
 import cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfoExample;
 import cn.superdesk.uniorder.dao.mapper.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfoMapper;
@@ -58,7 +60,7 @@ public class SzhtxxElectronicInvoiceFptxxExtendInfoServiceImpl implements Szhtxx
     @Override
     public SzhtxxElectronicInvoiceFptxxExtendInfo findByFpqqlsh(String fpqqlsh) {
 
-        SzhtxxElectronicInvoiceFptxxExtendInfoExample example = new SzhtxxElectronicInvoiceFptxxExtendInfoExample();
+        SzhtxxElectronicInvoiceFptxxExtendInfoExample          example  = new SzhtxxElectronicInvoiceFptxxExtendInfoExample();
         SzhtxxElectronicInvoiceFptxxExtendInfoExample.Criteria criteria = example.createCriteria();
 
         criteria.andFpqqlshEqualTo(fpqqlsh);
@@ -116,6 +118,36 @@ public class SzhtxxElectronicInvoiceFptxxExtendInfoServiceImpl implements Szhtxx
         return szhtxxElectronicInvoiceFptxxExtendInfoMapper.updateByPrimaryKeySelective(entity);
     }
 
+    /**
+     * 【【结算中心-测试环境】积分结算-金税盘发票-CAA2022051097499392-回款登记后更新时间未变化】
+     * https://www.tapd.cn/33003868/bugtrace/bugs/view?bug_id=1133003868001005099
+     *
+     * @param loginSysUser
+     * @param now
+     * @return
+     */
+    public int updateUpdateUserInfo(String fpqqlsh, LoginSysUser loginSysUser, DateTime now) {
+
+        int ret = 0;
+
+        SzhtxxElectronicInvoiceFptxxExtendInfo entityExistDb = findByFpqqlsh(fpqqlsh);
+
+        if (ObjectUtil.isNotNull(entityExistDb)) {
+            ret = updateSzhtxxElectronicInvoiceFptxxExtendInfo(
+                    SzhtxxElectronicInvoiceFptxxExtendInfo
+                            .builder()
+                            .id(entityExistDb.getId())
+
+                            .updateTime(now)
+                            .updateUserId(loginSysUser.getSysUserId())
+                            .updateUserName(loginSysUser.getFullName())
+                            .build()
+            );
+        }
+
+        return ret;
+    }
+
     public int deleteSzhtxxElectronicInvoiceFptxxExtendInfo(Long id) {
         return szhtxxElectronicInvoiceFptxxExtendInfoMapper.deleteByPrimaryKey(id);
     }
@@ -127,15 +159,15 @@ public class SzhtxxElectronicInvoiceFptxxExtendInfoServiceImpl implements Szhtxx
 
     public R<List<SzhtxxElectronicInvoiceFptxxExtendInfo>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {
 
-        SzhtxxElectronicInvoiceFptxxExtendInfoExample example = new SzhtxxElectronicInvoiceFptxxExtendInfoExample();
+        SzhtxxElectronicInvoiceFptxxExtendInfoExample          example  = new SzhtxxElectronicInvoiceFptxxExtendInfoExample();
         SzhtxxElectronicInvoiceFptxxExtendInfoExample.Criteria criteria = example.createCriteria();
 
         // TODO 喜欢用Map 还是 Bean 自己喜欢... 后期添加 转 SzhtxxElectronicInvoiceFptxxExtendInfoExample.Criteria
         // SzhtxxElectronicInvoiceFptxxExtendInfo szhtxxElectronicInvoiceFptxxExtendInfoConditions = BeanUtils.mapToBean(conditions,SzhtxxElectronicInvoiceFptxxExtendInfo.class);
 
         PageHelper.startPage(pageNun, pageSize);
-        List<SzhtxxElectronicInvoiceFptxxExtendInfo> resultList = szhtxxElectronicInvoiceFptxxExtendInfoMapper.selectByExample(example);
-        PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo> page = new PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo>(resultList);
+        List<SzhtxxElectronicInvoiceFptxxExtendInfo>     resultList = szhtxxElectronicInvoiceFptxxExtendInfoMapper.selectByExample(example);
+        PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo> page       = new PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo>(resultList);
         PageHelper.clearPage();
 
         return new R<List<SzhtxxElectronicInvoiceFptxxExtendInfo>>(page.getPageNum(), page.getPageSize(), (int) page.getTotal(), resultList);
@@ -144,14 +176,14 @@ public class SzhtxxElectronicInvoiceFptxxExtendInfoServiceImpl implements Szhtxx
 
     public R<List<SzhtxxElectronicInvoiceFptxxExtendInfo>> pageQueryGenericParam(SzhtxxElectronicInvoiceFptxxExtendInfoQueryCriteria queryCriteria) {
 
-        SzhtxxElectronicInvoiceFptxxExtendInfoExample example = new SzhtxxElectronicInvoiceFptxxExtendInfoExample();
+        SzhtxxElectronicInvoiceFptxxExtendInfoExample          example  = new SzhtxxElectronicInvoiceFptxxExtendInfoExample();
         SzhtxxElectronicInvoiceFptxxExtendInfoExample.Criteria criteria = example.createCriteria();
 
         // TODO 添加条件... 后期添加 queryCriteria 转 SzhtxxElectronicInvoiceFptxxExtendInfoExample.Criteria
 
         PageHelper.startPage(queryCriteria.getPageNumber(), queryCriteria.getPageSize());
-        List<SzhtxxElectronicInvoiceFptxxExtendInfo> resultList = szhtxxElectronicInvoiceFptxxExtendInfoMapper.selectByExample(example);
-        PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo> page = new PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo>(resultList);
+        List<SzhtxxElectronicInvoiceFptxxExtendInfo>     resultList = szhtxxElectronicInvoiceFptxxExtendInfoMapper.selectByExample(example);
+        PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo> page       = new PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo>(resultList);
         PageHelper.clearPage();
 
         return new R<List<SzhtxxElectronicInvoiceFptxxExtendInfo>>(page.getPageNum(), page.getPageSize(), (int) page.getTotal(), resultList);

+ 40 - 1
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/electronicInvoice/impl/SzhtxxElectronicInvoiceFptxxServiceImpl.java

@@ -185,6 +185,11 @@ public class SzhtxxElectronicInvoiceFptxxServiceImpl implements SzhtxxElectronic
         szhtxxElectronicInvoiceFptxxMapper.updateByPrimaryKeySelective(originEntity);
     }
 
+    public int updateSzhtxxElectronicInvoiceFptxxByPrimaryKeySelective(SzhtxxElectronicInvoiceFptxx entity) {
+
+        return szhtxxElectronicInvoiceFptxxMapper.updateByPrimaryKeySelective(entity);
+    }
+
     public void deleteSzhtxxElectronicInvoiceFptxx(Long id) {
         szhtxxElectronicInvoiceFptxxMapper.deleteByPrimaryKey(id);
     }
@@ -245,13 +250,21 @@ public class SzhtxxElectronicInvoiceFptxxServiceImpl implements SzhtxxElectronic
         return entity;
     }
 
+    /**
+     * 场景用于 深圳航信电子发票
+     *
+     * @param fpqqlsh
+     * @return
+     */
     @Override
     public SzhtxxElectronicInvoiceFptxx findByFpqqlsh(String fpqqlsh) {
 
         SzhtxxElectronicInvoiceFptxxExample          example  = new SzhtxxElectronicInvoiceFptxxExample();
         SzhtxxElectronicInvoiceFptxxExample.Criteria criteria = example.createCriteria();
 
-        criteria.andFpqqlshEqualTo(fpqqlsh).andDeletedEqualTo(CommonSoftDeleteEnum.正常.getKey());
+        criteria
+                .andFpqqlshEqualTo(fpqqlsh)
+                .andDeletedEqualTo(CommonSoftDeleteEnum.正常.getKey());
 
         List<SzhtxxElectronicInvoiceFptxx> resultList = szhtxxElectronicInvoiceFptxxMapper.selectByExample(example);
 
@@ -263,6 +276,32 @@ public class SzhtxxElectronicInvoiceFptxxServiceImpl implements SzhtxxElectronic
 
     }
 
+    /**
+     * 场景用于 深圳航信纸质发票
+     *
+     * @param fpqqlsh
+     * @param batchId
+     * @return
+     */
+    @Override
+    public SzhtxxElectronicInvoiceFptxx findByFpqqlshAndBatchId(String fpqqlsh, String batchId) {
+
+        SzhtxxElectronicInvoiceFptxxExample          example  = new SzhtxxElectronicInvoiceFptxxExample();
+        SzhtxxElectronicInvoiceFptxxExample.Criteria criteria = example.createCriteria();
+
+        criteria
+                .andFpqqlshEqualTo(fpqqlsh)
+                .andBatchIdEqualTo(batchId);
+
+        List<SzhtxxElectronicInvoiceFptxx> resultList = szhtxxElectronicInvoiceFptxxMapper.selectByExample(example);
+
+        if (CollUtil.isNotEmpty(resultList)) {
+            return resultList.get(0);
+        } else {
+            return null;
+        }
+    }
+
     public R<List<SzhtxxElectronicInvoiceFptxx>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {
 
         SzhtxxElectronicInvoiceFptxxExample          example  = new SzhtxxElectronicInvoiceFptxxExample();

+ 20 - 1
superdesk-uniorder-service/src/main/java/cn/superdesk/uniorder/service/thirdpart/szhtxx/paperInvoice/impl/SzhtxxPaperInvoiceFptxxServiceImpl.java

@@ -275,6 +275,7 @@ public class SzhtxxPaperInvoiceFptxxServiceImpl implements SzhtxxPaperInvoiceFpt
                 .ewm(StrUtil.isNotBlank(encmsgVo.getCipher()) ? encmsgVo.getCipher() : null) // ---- 签名值^_^签名值 ---- 16. Sign string 签名值
 //                .szqm(encmsgVo.getSzqm()) // ---- 二维码^_^开票成功必填 ----
 
+
                 .returnCode(encmsgVo.getReturnCode())
                 .returnMsg(encmsgVo.getReturnMsg())
 
@@ -427,7 +428,8 @@ public class SzhtxxPaperInvoiceFptxxServiceImpl implements SzhtxxPaperInvoiceFpt
                 JSONUtil.toJsonStr(loginSysUser)
         );
 
-        int ret = 0;
+        int ret              = 0;
+        int retUpdateFptxxBz = 0;
 
         String batchId = responseBody.getBatchId();
         String fpqqlsh = responseBody.getFpqqlsh();
@@ -440,6 +442,23 @@ public class SzhtxxPaperInvoiceFptxxServiceImpl implements SzhtxxPaperInvoiceFpt
         SzhtxxElectronicInvoiceFptxxResult     fptxxResult     = processSzhtxxElectronicInvoiceFptxxResult(batchId, fpqqlsh, form, responseBody, loginSysUser);
         SzhtxxElectronicInvoiceFptxxExtendInfo fptxxExtendInfo = processSzhtxxElectronicInvoiceFptxxExtendInfo(batchId, fpqqlsh, form, responseBody, loginSysUser);
 
+        /**************************************** 更新发票备注 start ****************************************/
+
+        SzhtxxElectronicInvoiceFptxx entityExistDb = szhtxxElectronicInvoiceFptxxService.findByFpqqlshAndBatchId(fpqqlsh, batchId);
+
+        if (ObjectUtil.isNotNull(entityExistDb)) {
+            retUpdateFptxxBz = szhtxxElectronicInvoiceFptxxService.updateSzhtxxElectronicInvoiceFptxxByPrimaryKeySelective(
+                    SzhtxxElectronicInvoiceFptxx
+                            .builder()
+                            .id(entityExistDb.getId())
+
+                            .bz(form.getBz())
+                            .build()
+            );
+        }
+
+
+        /**************************************** 更新发票备注 start ****************************************/
 
         return ret;
     }

+ 5 - 5
superdesk-uniorder-service/src/main/resources/application.properties

@@ -28,11 +28,11 @@ spring.datasource.druid.max-wait=60000
 spring.datasource.druid.validation-query=select 'x'
 
 # redis
-    spring.redis.pool.maxActive=8
-    spring.redis.pool.maxWait=-1
-    spring.redis.pool.maxIdle=8
-    spring.redis.pool.minIdle=0
-    spring.redis.timeout=0
+spring.redis.pool.maxActive=8
+spring.redis.pool.maxWait=-1
+spring.redis.pool.maxIdle=8
+spring.redis.pool.minIdle=0
+spring.redis.timeout=0
 
 
 # mybatis & pagehelper

+ 1 - 1
superdesk-uniorder-service/src/main/resources/logback-spring.xml

@@ -9,7 +9,7 @@
 
     <contextName>logback</contextName>
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
-    <property name="log.path" value="./logs/superdesk-uniorder-service"/>
+    <property name="log.path" value="./.logs/superdesk-uniorder-service"/>
 
     <!-- 彩色日志 -->
     <!-- 彩色日志依赖的渲染类 -->

+ 143 - 37
superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/controller/invoice/customer/state/InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller.java

@@ -4,10 +4,14 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.superdesk.uniorder.common.bizScene.invoice.common.InvoiceTypeScene;
+import cn.superdesk.uniorder.common.bizScene.invoice.customer.InvoiceApplyCustomerScene;
 import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerInvoiceProgressingStatusEnum;
 import cn.superdesk.uniorder.common.enums.accounting.AccountingOrderInvoiceApplyStatusEnum;
 import cn.superdesk.uniorder.common.enums.accounting.AccountingOrderTypeDimEnum;
 import cn.superdesk.uniorder.common.enums.accounting.customer.AccountingOrderCustomerAccountingStatusEnum;
+import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerMailTickStatusEnum;
+import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerMakeInvoiceStatusEnum;
+import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerReceiveInvoiceStatusEnum;
 import cn.superdesk.uniorder.common.exception.utils.ExceptionUtils;
 import cn.superdesk.uniorder.common.lamda.AnLamdaUtils;
 import cn.superdesk.uniorder.common.numerical.AnStringUtils;
@@ -198,6 +202,30 @@ public class InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller extends
                 return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常,[000]");
             }
 
+            /**************************************** 开票状态 start ****************************************/
+
+            List<Integer> makeInvoiceStatusExistDb = entitysExistDb
+                    .stream()
+                    .filter(AnLamdaUtils.distinctByKey(o -> o.getMakeInvoiceStatus()))
+                    .map(InvoiceApply::getMakeInvoiceStatus)
+                    .collect(Collectors.toList());
+
+            /**************************************** 领票状态 start ****************************************/
+
+            List<Integer> receiveInvoiceStatusExistDb = entitysExistDb
+                    .stream()
+                    .filter(AnLamdaUtils.distinctByKey(o -> o.getReceiveInvoiceStatus()))
+                    .map(InvoiceApply::getReceiveInvoiceStatus)
+                    .collect(Collectors.toList());
+
+            /**************************************** 寄票状态 start ****************************************/
+
+            List<Integer> mailTickStatusExistDb = entitysExistDb
+                    .stream()
+                    .filter(AnLamdaUtils.distinctByKey(o -> o.getMailTickStatus()))
+                    .map(InvoiceApply::getMailTickStatus)
+                    .collect(Collectors.toList());
+
             /****************************************** 开票申请 - 前端提交 start ******************************************/
 
             List<Long> invoiceApplyIds = formV2_2.getSubmitList()
@@ -205,8 +233,8 @@ public class InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller extends
                     .map(OpMailTickStatusFormInnerListItemV2_2::getInvoiceApplyId)
                     .collect(Collectors.toList());
 
-            List<InvoiceApply> entitysSubmit = invoiceApplyCustomerDubboConsumerService.findByIds(invoiceApplyIds);
-            List<InvoiceApply> entitysNeedOpMailTick = entitysSubmit
+            List<InvoiceApply> entitysQueryBySubmit = invoiceApplyCustomerDubboConsumerService.findByIds(invoiceApplyIds);
+            List<InvoiceApply> entitysNeedOpMailTick = entitysQueryBySubmit
                     .stream()
                     .filter(o -> ArrayUtil.contains(InvoiceTypeScene.modesV2_1_Array_SceneNeedOpMailTick(), o.getInvoiceMode()))
                     .collect(Collectors.toList());
@@ -214,47 +242,135 @@ public class InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller extends
             if (CollUtil.isEmpty(invoiceApplyIds)) {
                 return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常,[001]");
             }
-            if (CollUtil.isEmpty(entitysSubmit)) {
+            if (CollUtil.isEmpty(entitysQueryBySubmit)) {
                 return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常,[002]");
             }
             // 前端没有因为有一个是线上而少传一个,所以这里不能用过滤后只有线下的
-            if (invoiceApplyIds.size() != entitysSubmit.size()) {
+            if (invoiceApplyIds.size() != entitysQueryBySubmit.size()) {
                 return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常,[003]");
             }
 
 
             /**************************************** 只处理线下开票情况 start ****************************************/
 
+
+            /**************************************** op确认寄票 - 改逻辑 20220510 start ****************************************/
+
             /**************************************** |---- 检查 申请状态 start ****************************************/
 
-            // 错误 在混合的情况下是错的
-//            List<Integer> mailTickStatus = entitysExistDb.stream()
-            // 在混合的情况是下是排除 线上开票方式
-            List<Integer> invoiceProgressingStatus = entitysNeedOpMailTick.stream()
-                    // 排除线上
-                    .filter(AnLamdaUtils.distinctByKey(o -> o.getInvoiceStatus()))
-                    .map(InvoiceApply::getInvoiceStatus)
-                    .collect(Collectors.toList());
+//            https://docs.qq.com/doc/DYUZOREhreVhiVlZL
+//·该对账单下所有开票申请的开票状态均为“已开票”,否则不允许确认领票[!!!寄票!!!],1.5s提示“该对账单所有开票申请的开票状态存在部分未开票”;【20220510新增】
+//·该对账单下所有有效的开票申请的领票状态存在全部为“已领票”,否则不允许确认寄票,1.5提示“该对账单所有开票申请的领票状态存在部分未领票”;【20220510新增】
+//·该对账单下所有有效的开票申请的寄票状态存在全部/部分为“未寄票”,否则不允许确认寄票,1.5提示“该对账单所有开票申请的寄票状态全部已寄票,无需寄票”;【20220510新增】
+//·该对账单下所有开票申请的申请状态为“待寄票/待回款”,否则不允许确认寄票,1.5s提示“该对账单的开票申请数据发生变更,请返回检查”;【20220510去掉此判断】
+
+
+            // 逻辑 ·该对账单下所有开票申请的开票状态均为“已开票”,否则不允许确认领票[!!!寄票!!!],1.5s提示“该对账单所有开票申请的开票状态存在部分未开票”;【20220510新增】 start
 
-            if (CollUtil.isEmpty(invoiceProgressingStatus)) {
-                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[申请状态]");
+            if (CollUtil.isEmpty(makeInvoiceStatusExistDb)) {
+                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[开票状态] 未知");
+            } else if (makeInvoiceStatusExistDb.size() == 1) {
+
+                // 开票状态 唯一的情况
+                InvoiceApplyCustomerMakeInvoiceStatusEnum invoiceApplyCustomerMakeInvoiceStatusEnumExistDb = InvoiceApplyCustomerMakeInvoiceStatusEnum.get(makeInvoiceStatusExistDb.get(0));
+
+                // 意思是 如果这个唯一情况 的开票状态 为 待开票 开票中
+                if (ArrayUtil.contains(
+                        InvoiceApplyCustomerScene.statusV2_1_Array_MakeInvoiceSceneOpReceiveStateCheck(),
+                        invoiceApplyCustomerMakeInvoiceStatusEnumExistDb.getKey())
+                ) {
+                    return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的开票状态存在部分未开票");
+                }
+
+            } else if (makeInvoiceStatusExistDb.size() > 1) {
+                // 意思是 不唯一情况 是不可能 达到 该对账单下所有开票申请的开票状态均为 已开票
+                return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的开票状态存在部分未开票");
+            } else {
             }
-            if (invoiceProgressingStatus.size() > 1) {
-                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[申请状态]");
+
+            // 逻辑 ·该对账单下所有开票申请的开票状态均为“已开票”,否则不允许确认领票[!!!寄票!!!],1.5s提示“该对账单所有开票申请的开票状态存在部分未开票”;【20220510新增】   end
+
+            // 逻辑 ·该对账单下所有有效的开票申请的领票状态存在全部为“已领票”,否则不允许确认寄票,1.5提示“该对账单所有开票申请的领票状态存在部分未领票”;【20220510新增】 start
+
+            if (CollUtil.isEmpty(receiveInvoiceStatusExistDb)) {
+                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[领票状态] 未知");
+            } else if (receiveInvoiceStatusExistDb.size() == 1) {
+
+                // 领票状态 唯一的情况
+                InvoiceApplyCustomerReceiveInvoiceStatusEnum invoiceApplyCustomerReceiveInvoiceStatusExistDb = InvoiceApplyCustomerReceiveInvoiceStatusEnum.get(receiveInvoiceStatusExistDb.get(0));
+
+                if (invoiceApplyCustomerReceiveInvoiceStatusExistDb != InvoiceApplyCustomerReceiveInvoiceStatusEnum.已领票) {
+                    return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的领票状态存在部分未领票");
+                }
+
+            } else if (receiveInvoiceStatusExistDb.size() > 1) {
+
+                // 领票状态 不唯一的情况 好像不用做了 ---- 前置条件 开票状态均为-已开票
+                return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的领票状态存在部分未领票");
+
+            } else {
+
             }
 
-            //·该对账单下所有开票申请的申请状态为“待寄票/待回款”,否则不允许确认寄票,1.5s提示“该对账单的开票申请数据发生变更,请返回检查”;
-            InvoiceApplyCustomerInvoiceProgressingStatusEnum invoiceApplyCustomerInvoiceProgressingStatusEnum = InvoiceApplyCustomerInvoiceProgressingStatusEnum.get(invoiceProgressingStatus.get(0));
+            // 逻辑 ·该对账单下所有有效的开票申请的领票状态存在全部为“已领票”,否则不允许确认寄票,1.5提示“该对账单所有开票申请的领票状态存在部分未领票”;【20220510新增】   end
 
-            Integer[] invoiceProgressingStatusNeed = {
-                    InvoiceApplyCustomerInvoiceProgressingStatusEnum.待寄票.getKey(),
-                    InvoiceApplyCustomerInvoiceProgressingStatusEnum.待回款.getKey()
-            };
+            // 逻辑 ·该对账单下所有有效的开票申请的寄票状态存在全部/部分为“未寄票”,否则不允许确认寄票,1.5提示“该对账单所有开票申请的寄票状态全部已寄票,无需寄票”;【20220510新增】start
+
+
+            if (CollUtil.isEmpty(mailTickStatusExistDb)) {
+                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[寄票状态] 未知");
+            } else if (mailTickStatusExistDb.size() == 1) {
+
+                // 寄票状态 唯一的情况
+                InvoiceApplyCustomerMailTickStatusEnum invoiceApplyCustomerMailTickStatusExistDb = InvoiceApplyCustomerMailTickStatusEnum.get(mailTickStatusExistDb.get(0));
+
+                if (invoiceApplyCustomerMailTickStatusExistDb == InvoiceApplyCustomerMailTickStatusEnum.已寄票) {
+                    return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的寄票状态全部已寄票,无需寄票");
+                }
+
+            } else if (mailTickStatusExistDb.size() > 1) {
+
+                // 寄票状态 不唯一的情况 好像不用做了 ---- 前置条件 领票状态均为-已领票
+
+            } else {
 
-            if (!ArrayUtil.contains(invoiceProgressingStatusNeed, invoiceApplyCustomerInvoiceProgressingStatusEnum.getKey())) {
-                return ResponseResultOuterUtils.createErrorResult("500", "该对账单的开票申请数据发生变更,请返回检查");
             }
 
+            // 逻辑 ·该对账单下所有有效的开票申请的寄票状态存在全部/部分为“未寄票”,否则不允许确认寄票,1.5提示“该对账单所有开票申请的寄票状态全部已寄票,无需寄票”;【20220510新增】  end
+
+            // 逻辑去掉 ·该对账单下所有开票申请的申请状态为“待寄票/待回款”,否则不允许确认寄票,1.5s提示“该对账单的开票申请数据发生变更,请返回检查”;【20220510去掉此判断】start
+
+//            // 错误 在混合的情况下是错的
+////            List<Integer> mailTickStatus = entitysExistDb.stream()
+//            // 在混合的情况是下是排除 线上开票方式
+//            List<Integer> invoiceProgressingStatus = entitysNeedOpMailTick.stream()
+//                    // 排除线上
+//                    .filter(AnLamdaUtils.distinctByKey(o -> o.getInvoiceStatus()))
+//                    .map(InvoiceApply::getInvoiceStatus)
+//                    .collect(Collectors.toList());
+//
+//            if (CollUtil.isEmpty(invoiceProgressingStatus)) {
+//                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[申请状态]");
+//            }
+//            if (invoiceProgressingStatus.size() > 1) {
+//                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[申请状态]");
+//            }
+//
+//            //·该对账单下所有开票申请的申请状态为“待寄票/待回款”,否则不允许确认寄票,1.5s提示“该对账单的开票申请数据发生变更,请返回检查”;
+//            InvoiceApplyCustomerInvoiceProgressingStatusEnum invoiceApplyCustomerInvoiceProgressingStatusEnum = InvoiceApplyCustomerInvoiceProgressingStatusEnum.get(invoiceProgressingStatus.get(0));
+//
+//            Integer[] invoiceProgressingStatusNeed = {
+//                    InvoiceApplyCustomerInvoiceProgressingStatusEnum.待寄票.getKey(),
+//                    InvoiceApplyCustomerInvoiceProgressingStatusEnum.待回款.getKey()
+//            };
+//
+//            if (!ArrayUtil.contains(invoiceProgressingStatusNeed, invoiceApplyCustomerInvoiceProgressingStatusEnum.getKey())) {
+//                return ResponseResultOuterUtils.createErrorResult("500", "该对账单的开票申请数据发生变更,请返回检查");
+//            }
+
+            // 逻辑去掉 ·该对账单下所有开票申请的申请状态为“待寄票/待回款”,否则不允许确认寄票,1.5s提示“该对账单的开票申请数据发生变更,请返回检查”;【20220510去掉此判断】start
+
+
             /**************************************** |---- 检查 申请状态   end ****************************************/
 
 
@@ -304,20 +420,14 @@ public class InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller extends
                 );
             });
 
-            OpMailTickStatusFormV2_1 formV2_1 = OpMailTickStatusFormV2_1.builder()
+            OpMailTickStatusFormV2_1 formV2_1 = OpMailTickStatusFormV2_1
+                    .builder()
                     .submitList(submitList)
                     .build();
-            // AnBeanUtils.copy(formV2_2, .class);
-//            formV2_1.getSubmitList().forEach(formV2_1InnerItem -> {
-//
-//                formV2_1InnerItem.setExpressCompanyId(formV2_2.getExpressCompanyId());
-//                formV2_1InnerItem.setExpressNo(formV2_2.getExpressNo());
-//                formV2_1InnerItem.setInvoiceNumber(Arrays.asList("不要在意,只有此字段不为空时,才会更新快递信息,此字段不会更新到发票单中"));
-//
-//            });
 
             invoiceApplyFieldMailTickStatusDubboConsumerService.opCompleteV2_1(entitysNeedOpMailTick, formV2_1, getToken());
 
+            // 对账单 发递信息记录
             int ret = accountingScoreCustomerDubboConsumerService.opExpressRecord(formV2_2, accountingScoreCustomer, getToken());
 
             if (ret > 0) {
@@ -442,7 +552,6 @@ public class InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller extends
             }
 
 
-
             /**************************************** |---- 检查 申请状态 start ****************************************/
 
             // 在混合的情况下是错的 ---- 现在是对的 ---- mark by linjinyu at 20220507
@@ -459,7 +568,6 @@ public class InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller extends
                     .collect(Collectors.toList());
 
 
-
             // 在混合的情况是下是排除 不需要寄票的 开票方式
             List<Integer> invoiceProgressingStatusNeedOpMailTick = entitysNeedOpMailTick
                     .stream()
@@ -516,8 +624,6 @@ public class InvoiceApplyCustomerScoreFieldMailTickStatusV2_2Controller extends
             /**************************************** |---- 检查 寄票状态   end ****************************************/
 
 
-
-
 //            OpMailTickStatusFormV2_1 formV2_1 = AnBeanUtils.copy(formV2_2, OpMailTickStatusFormV2_1.class);
 //            formV2_1.getSubmitList().forEach(formV2_1InnerItem -> {
 //

+ 1 - 0
superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/controller/invoice/customer/state/InvoiceApplyCustomerScoreFieldMakeInvoiceStatusController.java

@@ -398,6 +398,7 @@ public class InvoiceApplyCustomerScoreFieldMakeInvoiceStatusController extends B
             SysNotify sysNotify = invoiceApplyFieldMakeInvoiceStatusDubboConsumerService.opOngoing(form, entity, getToken());
 
 //            (SzhtxxElectronicInvoiceResponseCodeEnum.SUCCESS.getReturnCode())
+
             if ("4011".equals(sysNotify.getTitle())) {
                 return ResponseResultOuterUtils.createSuccesResult(sysNotify.getContent());
             } else {

+ 96 - 7
superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/controller/invoice/customer/state/InvoiceApplyCustomerScoreFieldReceiveInvoiceStatusController.java

@@ -3,8 +3,10 @@ package cn.superdesk.uniorder.controller.invoice.customer.state;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.superdesk.uniorder.common.bizScene.invoice.common.InvoiceTypeScene;
+import cn.superdesk.uniorder.common.bizScene.invoice.customer.InvoiceApplyCustomerScene;
 import cn.superdesk.uniorder.common.enums.accounting.AccountingOrderTypeDimEnum;
 import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerInvoiceProgressingStatusEnum;
+import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerMakeInvoiceStatusEnum;
 import cn.superdesk.uniorder.common.enums.invoice.customer.InvoiceApplyCustomerReceiveInvoiceStatusEnum;
 import cn.superdesk.uniorder.common.exception.utils.ExceptionUtils;
 import cn.superdesk.uniorder.common.lamda.AnLamdaUtils;
@@ -229,7 +231,32 @@ public class InvoiceApplyCustomerScoreFieldReceiveInvoiceStatusController extend
                 return ResponseResultOuterUtils.createErrorResult("500", "提交的数据 [完整性] 异常");
             }
 
-            List<Integer> receiveInvoiceStatusExistDb = entitysQueryBySubmit
+
+            /**************************************** 申请状态 start ****************************************/
+
+            List<Integer> invoiceProgressingStatusExistDb = entitysExistDb
+                    .stream()
+                    .filter(AnLamdaUtils.distinctByKey(o -> o.getInvoiceStatus()))
+                    .map(InvoiceApply::getInvoiceStatus)
+                    .collect(Collectors.toList());
+
+            /**************************************** 开票状态 start ****************************************/
+
+            List<Integer> makeInvoiceStatusExistDb = entitysExistDb
+                    .stream()
+                    .filter(AnLamdaUtils.distinctByKey(o -> o.getMakeInvoiceStatus()))
+                    .map(InvoiceApply::getMakeInvoiceStatus)
+                    .collect(Collectors.toList());
+
+
+            /**************************************** 领票登记状态 start ****************************************/
+
+            List<Integer> receiveInvoiceStatusExistDb = entitysExistDb
+                    .stream()
+                    .filter(AnLamdaUtils.distinctByKey(o -> o.getReceiveInvoiceStatus()))
+                    .map(InvoiceApply::getReceiveInvoiceStatus)
+                    .collect(Collectors.toList());
+            List<Integer> receiveInvoiceStatusQueryBySubmit = entitysQueryBySubmit
                     .stream()
                     .filter(AnLamdaUtils.distinctByKey(o -> o.getReceiveInvoiceStatus()))
                     .map(InvoiceApply::getReceiveInvoiceStatus)
@@ -240,6 +267,7 @@ public class InvoiceApplyCustomerScoreFieldReceiveInvoiceStatusController extend
                     .map(InvoiceApply::getReceiveInvoiceStatus)
                     .collect(Collectors.toList());
 
+
             /**
              * 混合时冲突
              * superdesk-uniorder/superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/controller/invoice/customer/doc/op运营领票/混合_深圳航信电子发票_线下开票
@@ -253,17 +281,78 @@ public class InvoiceApplyCustomerScoreFieldReceiveInvoiceStatusController extend
 //                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常");
 //            }
 
-            InvoiceApplyCustomerReceiveInvoiceStatusEnum invoiceApplyCustomerReceiveInvoiceStatusExistDb       = InvoiceApplyCustomerReceiveInvoiceStatusEnum.get(receiveInvoiceStatusExistDb.get(0));
-            InvoiceApplyCustomerReceiveInvoiceStatusEnum invoiceApplyCustomerReceiveInvoiceStatusNeedOpReceive = InvoiceApplyCustomerReceiveInvoiceStatusEnum.get(receiveInvoiceStatusNeedOpReceive.get(0));
+            /**************************************** op确认领票 - 改逻辑 20220510 start ****************************************/
+
 
-//            if (invoiceApplyCustomerReceiveInvoiceStatusExistDb != InvoiceApplyCustomerReceiveInvoiceStatusEnum.未领票) {
+//            InvoiceApplyCustomerReceiveInvoiceStatusEnum invoiceApplyCustomerReceiveInvoiceStatusExistDb       = InvoiceApplyCustomerReceiveInvoiceStatusEnum.get(receiveInvoiceStatusExistDb.get(0));
+//            InvoiceApplyCustomerReceiveInvoiceStatusEnum invoiceApplyCustomerReceiveInvoiceStatusNeedOpReceive = InvoiceApplyCustomerReceiveInvoiceStatusEnum.get(receiveInvoiceStatusNeedOpReceive.get(0));
+//
+////            if (invoiceApplyCustomerReceiveInvoiceStatusExistDb != InvoiceApplyCustomerReceiveInvoiceStatusEnum.未领票) {
+////                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常,要求状态为[未领票]");
+////            }
+//            if (invoiceApplyCustomerReceiveInvoiceStatusNeedOpReceive != InvoiceApplyCustomerReceiveInvoiceStatusEnum.未领票) {
 //                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常,要求状态为[未领票]");
 //            }
-            if (invoiceApplyCustomerReceiveInvoiceStatusNeedOpReceive != InvoiceApplyCustomerReceiveInvoiceStatusEnum.未领票) {
-                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常,要求状态为[未领票]");
+
+//            https://docs.qq.com/doc/DYUZOREhreVhiVlZL
+//            ·该对账单下所有开票申请的开票状态均为“已开票”,否则不允许确认领票,1.5s提示“该对账单所有开票申请的开票状态存在部分未开票”;【20220510新增】
+//            ·该对账单下所有有效的开票申请的领票状态存在全部/部分为“未领票”,否则不允许确认领票,1.5提示“该对账单所有开票申请的领票状态全部已领票,无需领票”;【20220510新增】
+//            ·该对账单下所有开票申请的申请状态为“待领票/待回款”,否则不允许确认领票,1.5s提示“该对账单的开票申请数据发生变更,请返回检查”;【20220510去掉此判断】---
+
+
+            // 逻辑 ·该对账单下所有开票申请的开票状态均为“已开票”,否则不允许确认领票,1.5s提示“该对账单所有开票申请的开票状态存在部分未开票”;【20220510新增】 start
+
+            if (CollUtil.isEmpty(makeInvoiceStatusExistDb)) {
+                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[开票状态] 未知");
+            } else if (makeInvoiceStatusExistDb.size() == 1) {
+
+                // 开票状态 唯一的情况
+                InvoiceApplyCustomerMakeInvoiceStatusEnum invoiceApplyCustomerMakeInvoiceStatusEnumExistDb = InvoiceApplyCustomerMakeInvoiceStatusEnum.get(makeInvoiceStatusExistDb.get(0));
+
+                // 意思是 如果这个唯一情况 的开票状态 为 待开票 开票中
+                if (ArrayUtil.contains(
+                        InvoiceApplyCustomerScene.statusV2_1_Array_MakeInvoiceSceneOpReceiveStateCheck(),
+                        invoiceApplyCustomerMakeInvoiceStatusEnumExistDb.getKey())
+                ) {
+                    return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的开票状态存在部分未开票");
+                }
+
+            } else if (makeInvoiceStatusExistDb.size() > 1) {
+                // 意思是 不唯一情况 是不可能 达到 该对账单下所有开票申请的开票状态均为 已开票
+                return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的开票状态存在部分未开票");
+            } else {
             }
 
-            invoiceApplyFieldReceiveInvoiceStatusDubboConsumerService.opReceive(getToken(), entitysQueryBySubmit, form);
+            // 逻辑 ·该对账单下所有开票申请的开票状态均为“已开票”,否则不允许确认领票,1.5s提示“该对账单所有开票申请的开票状态存在部分未开票”;【20220510新增】 start
+
+
+            // 逻辑 该对账单下所有有效的开票申请的领票状态存在全部/部分为“未领票”,否则不允许确认领票,1.5提示“该对账单所有开票申请的领票状态全部已领票,无需领票”;【20220510新增】start
+
+            if (CollUtil.isEmpty(receiveInvoiceStatusExistDb)) {
+                return ResponseResultOuterUtils.createErrorResult("500", "提交的数据异常[领票状态] 未知");
+            } else if (receiveInvoiceStatusExistDb.size() == 1) {
+
+                // 领票状态 唯一的情况
+                InvoiceApplyCustomerReceiveInvoiceStatusEnum invoiceApplyCustomerReceiveInvoiceStatusExistDb = InvoiceApplyCustomerReceiveInvoiceStatusEnum.get(receiveInvoiceStatusExistDb.get(0));
+
+                if (invoiceApplyCustomerReceiveInvoiceStatusExistDb == InvoiceApplyCustomerReceiveInvoiceStatusEnum.已领票) {
+                    return ResponseResultOuterUtils.createErrorResult("500", "该对账单所有开票申请的领票状态全部已领票,无需领票");
+                }
+
+            } else if (receiveInvoiceStatusExistDb.size() > 1) {
+
+                // 领票状态 不唯一的情况 好像不用做了 ---- 前置条件 开票状态均为-已开票
+
+            } else {
+
+            }
+
+            // 逻辑 该对账单下所有有效的开票申请的领票状态存在全部/部分为“未领票”,否则不允许确认领票,1.5提示“该对账单所有开票申请的领票状态全部已领票,无需领票”;【20220510新增】  end
+
+
+            /**************************************** op确认领票 - 改逻辑 20220510 start ****************************************/
+
+            invoiceApplyFieldReceiveInvoiceStatusDubboConsumerService.opReceive(entitysQueryBySubmit, form, getToken());
 
             result.setSuccess(true);
 

+ 1 - 1
superdesk-uniorder-web/src/main/java/cn/superdesk/uniorder/dubbo/consumer/invoice/customer/InvoiceApplyFieldReceiveInvoiceStatusDubboConsumerService.java

@@ -47,7 +47,7 @@ public class InvoiceApplyFieldReceiveInvoiceStatusDubboConsumerService {
 	}
 
 	// 状态流转为 已领票(1, "已领票")
-	public void opReceive(String token, List<InvoiceApply> entitys, InvoiceApplyCustomerOpReceiveInvoiceStatusForm form) {
+	public void opReceive(List<InvoiceApply> entitys, InvoiceApplyCustomerOpReceiveInvoiceStatusForm form, String token) {
 		LoginSysUser loginSysUser = JwtUtil.getLoginSysUser(token);
 		dubboInvoiceApplyFieldReceiveInvoiceStatusService.opReceive(entitys, form, loginSysUser);
 	}

+ 1 - 1
superdesk-uniorder-web/src/main/resources/logback-spring.xml

@@ -9,7 +9,7 @@
 
 	<contextName>logback</contextName>
 	<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
-	<property name="log.path" value="./logs/superdesk-uniorder-web"/>
+	<property name="log.path" value="./.logs/superdesk-uniorder-web"/>
 
 	<!-- 彩色日志 -->
 	<!-- 彩色日志依赖的渲染类 -->

+ 1 - 1
superdesk-uniorder-xxl-job-admin/src/main/resources/logback-spring.xml

@@ -9,7 +9,7 @@
 
     <contextName>logback</contextName>
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
-    <property name="log.path" value="./logs"/>
+    <property name="log.path" value="./.logs/superdesk-uniorder-xxl-job-admin"/>
 
     <!-- 彩色日志 -->
     <!-- 彩色日志依赖的渲染类 -->