Jelajahi Sumber

后端代码提交

mashengyi 3 tahun lalu
induk
melakukan
9b720e433b
100 mengubah file dengan 2269 tambahan dan 2860 penghapusan
  1. 10 0
      .idea/libraries/lib.xml
  2. TEMPAT SAMPAH
      lib/etc-commons-logging-1.2.jar
  3. TEMPAT SAMPAH
      lib/etc-httpclient-4.5.jar
  4. TEMPAT SAMPAH
      lib/etc-httpcore-4.4.jar
  5. TEMPAT SAMPAH
      lib/etc-httpmime-4.5.jar
  6. TEMPAT SAMPAH
      lib/etc-jackson-annotations-2.8.jar
  7. TEMPAT SAMPAH
      lib/etc-jackson-core-2.8.jar
  8. TEMPAT SAMPAH
      lib/etc-jackson-databind-2.8.jar
  9. TEMPAT SAMPAH
      lib/etc-jackson-datatype-jsr310-2.8.jar
  10. TEMPAT SAMPAH
      lib/sdk-b2b-protocol-1.5.1.jar
  11. TEMPAT SAMPAH
      lib/sdk-common-1.1.jar
  12. TEMPAT SAMPAH
      lib/sdk-waybill-protocol-1.3.7.jar
  13. TEMPAT SAMPAH
      lib/slf4j-api-1.7.jar
  14. TEMPAT SAMPAH
      lib/validation-api-1.1.0.Final.jar
  15. 102 0
      pom.xml
  16. 2 2
      src/main/java/com/jkcredit/invoice/annotation/annotationDes/AuthenticationInterceptor.java
  17. 1 1
      src/main/java/com/jkcredit/invoice/annotation/annotationDes/CurrentUserMethodArgumentResolver.java
  18. 0 462
      src/main/java/com/jkcredit/invoice/async/CarFreeBillAsync.java
  19. 0 62
      src/main/java/com/jkcredit/invoice/consumer/B2bChargeConsumer.java
  20. 0 71
      src/main/java/com/jkcredit/invoice/consumer/ChargeConsumer.java
  21. 0 69
      src/main/java/com/jkcredit/invoice/controller/AutoBillController.java
  22. 0 45
      src/main/java/com/jkcredit/invoice/controller/B2bInvoiceApplyController.java
  23. 0 41
      src/main/java/com/jkcredit/invoice/controller/B2bInvoicePackageController.java
  24. 0 38
      src/main/java/com/jkcredit/invoice/controller/B2bInvoiceQueryController.java
  25. 0 42
      src/main/java/com/jkcredit/invoice/controller/BatchController.java
  26. 0 58
      src/main/java/com/jkcredit/invoice/controller/BillEstimateController.java
  27. 0 45
      src/main/java/com/jkcredit/invoice/controller/BillEstimateResultController.java
  28. 0 73
      src/main/java/com/jkcredit/invoice/controller/CarEtcCardController.java
  29. 0 136
      src/main/java/com/jkcredit/invoice/controller/CarFreeCarrierBillController.java
  30. 0 72
      src/main/java/com/jkcredit/invoice/controller/CarFreeCarrierRegisterController.java
  31. 0 54
      src/main/java/com/jkcredit/invoice/controller/CardTradeController.java
  32. 0 65
      src/main/java/com/jkcredit/invoice/controller/InvoiceController.java
  33. 0 85
      src/main/java/com/jkcredit/invoice/controller/NumInvoiceController.java
  34. 0 69
      src/main/java/com/jkcredit/invoice/controller/PackageFileController.java
  35. 0 40
      src/main/java/com/jkcredit/invoice/controller/RechargeController.java
  36. 0 102
      src/main/java/com/jkcredit/invoice/controller/SearchInvoiceResultController.java
  37. 0 147
      src/main/java/com/jkcredit/invoice/controller/TempController.java
  38. 13 6
      src/main/java/com/jkcredit/invoice/controller/Customer/CustomerController.java
  39. 111 0
      src/main/java/com/jkcredit/invoice/controller/localBussiness/NoCarController.java
  40. 107 0
      src/main/java/com/jkcredit/invoice/controller/localBussiness/SelfCarController.java
  41. 36 9
      src/main/java/com/jkcredit/invoice/controller/service/LowerServiceController.java
  42. 98 0
      src/main/java/com/jkcredit/invoice/controller/service/NoCarServiceController.java
  43. 54 0
      src/main/java/com/jkcredit/invoice/controller/service/SelfCarServiceController.java
  44. 3 3
      src/main/java/com/jkcredit/invoice/controller/user/AuthenticationController.java
  45. 2 2
      src/main/java/com/jkcredit/invoice/controller/RoleController.java
  46. 2 2
      src/main/java/com/jkcredit/invoice/controller/user/UserController.java
  47. 0 26
      src/main/java/com/jkcredit/invoice/mapper/B2bInvoiceApplyMapper.java
  48. 0 28
      src/main/java/com/jkcredit/invoice/mapper/B2bInvoicePackageMapper.java
  49. 0 39
      src/main/java/com/jkcredit/invoice/mapper/B2bInvoiceQueryMapper.java
  50. 0 27
      src/main/java/com/jkcredit/invoice/mapper/BatchMapper.java
  51. 24 0
      src/main/java/com/jkcredit/invoice/mapper/Binvoce/BillInvoiceMapper.java
  52. 16 0
      src/main/java/com/jkcredit/invoice/mapper/Binvoce/SelfCarApplMapper.java
  53. 24 0
      src/main/java/com/jkcredit/invoice/mapper/Binvoce/SelfCarInvoiceMapper.java
  54. 0 39
      src/main/java/com/jkcredit/invoice/mapper/CarEtcCardMapper.java
  55. 0 43
      src/main/java/com/jkcredit/invoice/mapper/CarFreeCarrierBillEndMapper.java
  56. 0 127
      src/main/java/com/jkcredit/invoice/mapper/CarFreeCarrierBillStartMapper.java
  57. 0 54
      src/main/java/com/jkcredit/invoice/mapper/CarFreeCarrierRegisterMapper.java
  58. 0 41
      src/main/java/com/jkcredit/invoice/mapper/CardTradeMapper.java
  59. 0 7
      src/main/java/com/jkcredit/invoice/mapper/ChargeMapper.java
  60. 0 7
      src/main/java/com/jkcredit/invoice/mapper/ConsumeQueueMapper.java
  61. 0 22
      src/main/java/com/jkcredit/invoice/mapper/CustomerCarRecMapper.java
  62. 0 40
      src/main/java/com/jkcredit/invoice/mapper/InvoiceMapper.java
  63. 0 26
      src/main/java/com/jkcredit/invoice/mapper/NumInvoiceMapper.java
  64. 0 13
      src/main/java/com/jkcredit/invoice/mapper/RealChargeMapper.java
  65. 0 27
      src/main/java/com/jkcredit/invoice/mapper/RechargeMapper.java
  66. 0 13
      src/main/java/com/jkcredit/invoice/mapper/SearchInvoiceDataMapper.java
  67. 0 73
      src/main/java/com/jkcredit/invoice/mapper/SearchInvoiceResultMapper.java
  68. 0 7
      src/main/java/com/jkcredit/invoice/mapper/SearchInvoiceResultTempMapper.java
  69. 19 0
      src/main/java/com/jkcredit/invoice/mapper/calculateInfor/NoCarCalculateInforMapper.java
  70. 20 0
      src/main/java/com/jkcredit/invoice/mapper/calculateInfor/SelfCarCalculateInforMapper.java
  71. 29 0
      src/main/java/com/jkcredit/invoice/mapper/customer/CustomerCarRecMapper.java
  72. 2 2
      src/main/java/com/jkcredit/invoice/mapper/CustomerMapper.java
  73. 4 2
      src/main/java/com/jkcredit/invoice/mapper/CustomerRecMapper.java
  74. 2 2
      src/main/java/com/jkcredit/invoice/mapper/RoleMapper.java
  75. 2 2
      src/main/java/com/jkcredit/invoice/mapper/UserMapper.java
  76. 26 0
      src/main/java/com/jkcredit/invoice/mapper/waybill/NoCarWaybillMapper.java
  77. 22 0
      src/main/java/com/jkcredit/invoice/mapper/waybill/SellCarTradeMapper.java
  78. 95 0
      src/main/java/com/jkcredit/invoice/model/entity/Calculate/NoCarCalculateInfor.java
  79. 69 0
      src/main/java/com/jkcredit/invoice/model/entity/Calculate/SelfCarCalculateInfor.java
  80. 13 2
      src/main/java/com/jkcredit/invoice/model/entity/Customer.java
  81. 12 2
      src/main/java/com/jkcredit/invoice/model/entity/CustomerCarRec.java
  82. 157 6
      src/main/java/com/jkcredit/invoice/model/entity/CustomerRec.java
  83. 325 0
      src/main/java/com/jkcredit/invoice/model/entity/invoice/BillInvoice.java
  84. 130 0
      src/main/java/com/jkcredit/invoice/model/entity/invoice/SelfCarAppl.java
  85. 282 0
      src/main/java/com/jkcredit/invoice/model/entity/invoice/SelfCarInvoice.java
  86. 1 1
      src/main/java/com/jkcredit/invoice/model/entity/Role.java
  87. 1 1
      src/main/java/com/jkcredit/invoice/model/entity/User.java
  88. 290 0
      src/main/java/com/jkcredit/invoice/model/entity/waybill/NoCarWayBill.java
  89. 144 0
      src/main/java/com/jkcredit/invoice/model/entity/waybill/SelfCarTrade.java
  90. 0 131
      src/main/java/com/jkcredit/invoice/model/vo/CarFreeCarrierBillVo.java
  91. 0 39
      src/main/java/com/jkcredit/invoice/producer/B2bChargeProducer.java
  92. 0 38
      src/main/java/com/jkcredit/invoice/producer/ChargeProducer.java
  93. 0 34
      src/main/java/com/jkcredit/invoice/service/B2bInvoiceApplyService.java
  94. 0 31
      src/main/java/com/jkcredit/invoice/service/B2bInvoicePackageService.java
  95. 0 20
      src/main/java/com/jkcredit/invoice/service/B2bInvoiceQueryService.java
  96. 0 34
      src/main/java/com/jkcredit/invoice/service/BatchService.java
  97. 0 22
      src/main/java/com/jkcredit/invoice/service/BillEstimateResultService.java
  98. 0 31
      src/main/java/com/jkcredit/invoice/service/BillEstimateService.java
  99. 19 0
      src/main/java/com/jkcredit/invoice/service/CalculateInfor/NoCarCalculateInfoService.java
  100. 0 0
      src/main/java/com/jkcredit/invoice/service/CalculateInfor/SelfCarCalculateInfoService.java

+ 10 - 0
.idea/libraries/lib.xml

@@ -0,0 +1,10 @@
+<component name="libraryTable">
+  <library name="lib">
+    <CLASSES>
+      <root url="file://$PROJECT_DIR$/lib" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+    <jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
+  </library>
+</component>

TEMPAT SAMPAH
lib/etc-commons-logging-1.2.jar


TEMPAT SAMPAH
lib/etc-httpclient-4.5.jar


TEMPAT SAMPAH
lib/etc-httpcore-4.4.jar


TEMPAT SAMPAH
lib/etc-httpmime-4.5.jar


TEMPAT SAMPAH
lib/etc-jackson-annotations-2.8.jar


TEMPAT SAMPAH
lib/etc-jackson-core-2.8.jar


TEMPAT SAMPAH
lib/etc-jackson-databind-2.8.jar


TEMPAT SAMPAH
lib/etc-jackson-datatype-jsr310-2.8.jar


TEMPAT SAMPAH
lib/sdk-b2b-protocol-1.5.1.jar


TEMPAT SAMPAH
lib/sdk-common-1.1.jar


TEMPAT SAMPAH
lib/sdk-waybill-protocol-1.3.7.jar


TEMPAT SAMPAH
lib/slf4j-api-1.7.jar


TEMPAT SAMPAH
lib/validation-api-1.1.0.Final.jar


+ 102 - 0
pom.xml

@@ -204,13 +204,115 @@
             <artifactId>joda-time</artifactId>
             <version>2.9.2</version>
         </dependency>
+        <!--调用第三方的依赖包-->
+        <dependency>
+            <groupId>etc-commons-logging-1.2</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-commons-logging-1.2.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>etc-httpclient-4.5</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-httpclient-4.5.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>etc-httpcore-4.4</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-httpcore-4.4.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>etc-httpmime-4.5</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-httpmime-4.5.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>etc-jackson-annotations-2.8</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-jackson-annotations-2.8.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>etc-jackson-core-2.8</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-jackson-core-2.8.jar</systemPath>
+        </dependency>
+
+        <dependency>
+            <groupId>etc-jackson-databind-2.8</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-jackson-databind-2.8.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>etc-jackson-datatype-jsr310-2.8</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/etc-jackson-datatype-jsr310-2.8.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>slf4j-api-1.7</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/slf4j-api-1.7.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>validation-api-1.1.0.Final</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/validation-api-1.1.0.Final.jar</systemPath>
+        </dependency>
+
+        <dependency>
+            <groupId>sdk-common-1.1</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/sdk-common-1.1.jar</systemPath>
+        </dependency>
+
+        <!--无车-->
+        <dependency>
+            <groupId>sdk-waybill-protocol-1.3.7</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/sdk-waybill-protocol-1.3.7.jar</systemPath>
+        </dependency>
+        <!--有车-->
+        <dependency>
+            <groupId>sdk-b2b-protocol-1.5.1</groupId>
+            <artifactId>sdk</artifactId>
+            <scope>system</scope>
+            <version>1.0</version>
+            <systemPath>${project.basedir}/lib/sdk-b2b-protocol-1.5.1.jar</systemPath>
+        </dependency>
+        <!--调用第三方的依赖包-->
     </dependencies>
 
+
     <build>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
             </plugin>
            <!-- <plugin>
                 <groupId>org.mybatis.generator</groupId>

+ 2 - 2
src/main/java/com/jkcredit/invoice/annotation/annotationDes/AuthenticationInterceptor.java

@@ -3,8 +3,8 @@ package com.jkcredit.invoice.annotation.annotationDes;
 import cn.hutool.json.JSONUtil;
 import com.jkcredit.invoice.annotation.LoginRequired;
 import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.UserService;
+import com.jkcredit.invoice.model.entity.user.User;
+import com.jkcredit.invoice.service.user.UserService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;

+ 1 - 1
src/main/java/com/jkcredit/invoice/annotation/annotationDes/CurrentUserMethodArgumentResolver.java

@@ -1,7 +1,7 @@
 package com.jkcredit.invoice.annotation.annotationDes;
 
 import com.jkcredit.invoice.annotation.CurrentUser;
-import com.jkcredit.invoice.model.entity.User;
+import com.jkcredit.invoice.model.entity.user.User;
 import org.springframework.core.MethodParameter;
 import org.springframework.web.bind.support.WebDataBinderFactory;
 import org.springframework.web.context.request.NativeWebRequest;

+ 0 - 462
src/main/java/com/jkcredit/invoice/async/CarFreeBillAsync.java

@@ -1,462 +0,0 @@
-package com.jkcredit.invoice.async;
-
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.*;
-import com.jkcredit.invoice.model.vo.CarFreeCarrierBillVo;
-import com.jkcredit.invoice.service.CarFreeCarrierBillEndService;
-import com.jkcredit.invoice.service.CarFreeCarrierBillStartService;
-import com.jkcredit.invoice.service.InvoiceService;
-import com.jkcredit.invoice.util.DateUtil;
-import com.jkcredit.invoice.util.HttpUtil;
-import com.jkcredit.invoice.util.ReadExcelUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.*;
-
-/**
- * @description: 异步处理运单
- * @author: sunzhaoning
- * @create: 2019-07-04 14:13
- * @version: V1.0
- **/
-@Component
-@Slf4j
-public class CarFreeBillAsync {
-
-    @Autowired
-    private InvoiceService invoiceService;
-
-    @Autowired
-    private CarFreeCarrierBillStartService carFreeCarrierBillStartService;
-
-    @Autowired
-    private CarFreeCarrierBillEndService carFreeCarrierBillEndService;
-
-    @Autowired
-    private HttpUtil httpUtil;
-
-    @Autowired
-    private RedisTemplate redisTemplate;
-
-    /**
-     * 异步处理历史运单
-     *
-     * @param list
-     * @param user
-     * @param id
-     * @param batchNumber
-     */
-    @Async
-    public void historyBill(List<CarFreeCarrierBillVo> list, User user, String id, String batchNumber,
-                            Map<String, String> registerFailedMap) {
-        log.info("批量导入历史运单异步接口接收到的数据:{}", JSON.toJSONString(list));
-        DateTimeFormatter sdf = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
-
-        Map<String, Integer> startBillResult = new HashMap<>();
-        if (null != list) {
-            list.stream().forEach(c -> {
-                Integer isSuccess = startBill(c, CommonConstants.WAY_BILL_HISTORY_START_API, registerFailedMap, user, id, batchNumber);
-                startBillResult.put(c.getNum(), isSuccess);
-            });
-        }
-
-        if (null != list) {
-            list.stream().forEach(c -> {
-                DateTime endDateTime = new DateTime(c.getEndTime());
-                String endTime = endDateTime.toString(sdf);
-
-                //构建运单结束实体
-                CarFreeCarrierBillEnd carFreeCarrierBillEnd = new CarFreeCarrierBillEnd();
-
-                if (startBillResult.get(c.getNum()) == 1) {
-                    // isSuccess == 1 历史运单开始指令成功
-
-                    Map<String, Object> endMap = new HashMap<>(8);
-                    endMap.put("num", c.getNum());
-                    endMap.put("realDestAddr", c.getDestAddr());
-                    endMap.put("endTime", DateUtil.dateToTime(endTime));
-                    //调用接口
-                String endResult = httpUtil.getCheckResult(endMap, CommonConstants.WAY_BILL_HISTORY_END_API);
-                    //测试用 不能提交!!!
-//                    String endResult = "{\n" +
-//                            "    \"data\": 1,\n" +
-//                            "    \"code\": 200,\n" +
-//                            "    \"requestid\": \"20190429094207829,503b6b8d-ce1b-4d8f-82a0-1b5b9f6c5792\",\n" +
-//                            "    \"msg\": \"{\\\"info\\\":\\\"成功\\\",\\\"receiveTime\\\":\\\"2019-04-29T09:50:16\\\"}\"\n" +
-//                            "}";
-                    log.info("历史运单结束接口返回:{},请求参数:{}", endResult, JSON.toJSONString(endMap));
-                    //转换结果为jsonobject
-                    JSONObject endResultJson = JSON.parseObject(endResult);
-                    //获取返回data值
-                    String endDataCode = endResultJson.getString("data");
-                    //判断返回值是否为1 如果是1 设置状态为成功
-                    if ("1".equals(endDataCode)) {
-                        carFreeCarrierBillEnd.setIsSuccess(CommonConstants.SUCCESS);
-                    } else {
-                        //设置失败
-                        log.info(endResultJson.getString("msg"));
-                        carFreeCarrierBillEnd.setIsSuccess(CommonConstants.ERROR);
-                        if (StringUtils.isNotBlank(endResultJson.getString("msg"))) {
-                            carFreeCarrierBillEnd.setErrorMsg(endResultJson.getString("msg").replace("\n", ""));
-                        } else {
-                            carFreeCarrierBillEnd.setErrorMsg("上传失败!");
-                        }
-                    }
-                } else {
-                    // isSuccess == 2 历史运单开始指令失败
-                    carFreeCarrierBillEnd.setIsSuccess(CommonConstants.ERROR);
-                    carFreeCarrierBillEnd.setErrorMsg("上传失败:运单开始指令上传失败");
-                }
-
-                carFreeCarrierBillEnd.setNum(c.getNum());
-                carFreeCarrierBillEnd.setRealDestAddr(c.getDestAddr());
-                carFreeCarrierBillEnd.setEndTime(endTime);
-                carFreeCarrierBillEnd.setBatchId(id);
-                carFreeCarrierBillEnd.setBatchNumber(batchNumber);
-                carFreeCarrierBillEnd.setUserId(user.getId());
-                carFreeCarrierBillEnd.setUserName(user.getUserName());
-                carFreeCarrierBillEnd.setUserCompany(user.getCompany());
-                carFreeCarrierBillEnd.setUserPhone(user.getPhone());
-                carFreeCarrierBillEnd.setCreateTime(System.currentTimeMillis());
-                carFreeCarrierBillEnd.setIsHistory(CommonConstants.ERROR);
-                //判断运单结束是否成功
-                if (StrUtil.equals(CommonConstants.SUCCESS.toString(), carFreeCarrierBillEnd.getIsSuccess().toString())) {
-                    //设置运单状态已完结
-                    carFreeCarrierBillStartService.updateStatusAndBatchId(c.getNum(), CommonConstants.FINISHED, id);
-                }
-                //插入运单结束信息
-                carFreeCarrierBillEndService.save(carFreeCarrierBillEnd);
-            });
-        }
-    }
-
-
-    /**
-     * 异步处理实时运单开始
-     *
-     * @param list
-     * @param user
-     * @param id
-     * @param batchNumber
-     */
-    @Async
-    public void startBill(List<CarFreeCarrierBillVo> list, User user, String id, String batchNumber,
-                          Map<String, String> registerFailedMap) {
-        log.info("批量导入实时运单异步接口接收到的数据:{}", JSON.toJSONString(list));
-        DateTimeFormatter sdf = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
-        //线程分割数
-        int count = 0;
-        //获取list大小
-        int listSize = list.size();
-        if (listSize <= 100) {
-            count = 20;
-        } else if (listSize <= 1000 && listSize > 100) {
-            count = 50;
-        } else if (listSize <= 12000 && listSize > 1000) {
-            count = 120;
-        } else if (listSize <= 20000 && listSize > 12000) {
-            count = 150;
-        } else if (listSize <= 30000 && listSize > 20000) {
-            count = 300;
-        } else {
-            count = 500;
-        }
-        //线程数
-        int threadSize = (listSize / count) + 1;
-
-        ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("thread-billStart-%d").build();
-        ExecutorService executor = new ThreadPoolExecutor(threadSize, threadSize, 200L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), namedThreadFactory);
-
-        CountDownLatch countDownLatch = new CountDownLatch(threadSize);
-
-        List<CarFreeCarrierBillVo> newList;
-        for (int i = 0; i < threadSize; i++) {
-            if ((i + 1) == threadSize) {
-                int startIndex = (i * count);
-                int endIndex = list.size();
-                newList = list.subList(startIndex, endIndex);
-            } else {
-                int startIndex = i * count;
-                int endIndex = (i + 1) * count;
-                newList = list.subList(startIndex, endIndex);
-            }
-
-            List<CarFreeCarrierBillVo> finalNewList = newList;
-            executor.execute(new Thread(() -> {
-                if (null != finalNewList) {
-                    finalNewList.stream().forEach(c -> {
-                        startBill(c, CommonConstants.WAY_BILL_START_API, registerFailedMap, user, id, batchNumber);
-                    });
-                }
-                countDownLatch.countDown();
-            }));
-
-        }
-
-        try {
-            countDownLatch.await();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        executor.shutdown();
-    }
-
-
-    private Integer startBill(CarFreeCarrierBillVo carFreeCarrierBillVo, String api, Map<String, String> registerFailedMap,
-                           User user, String id, String batchNumber) {
-        DateTimeFormatter sdf = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
-        Invoice invoice = invoiceService.getInvoiceByDutyParagraph(carFreeCarrierBillVo.getTaxPlayerCode());
-        CarFreeCarrierBillStart carFreeCarrierBillStart = new CarFreeCarrierBillStart();
-        DateTime startDateTime = new DateTime(carFreeCarrierBillVo.getStartTime());
-        String startTime = startDateTime.toString(sdf);
-
-        DateTime endDateTime = new DateTime(carFreeCarrierBillVo.getEndTime());
-        String endTime = endDateTime.toString(sdf);
-
-        if (registerFailedMap.containsKey(carFreeCarrierBillVo.getPlateNumber())
-                && carFreeCarrierBillVo.getPlateColor().equals(registerFailedMap.get(carFreeCarrierBillVo.getPlateNumber()))) {
-            //设置失败
-            log.info("运单号:{},运单开始失败原因:车辆备案失败", carFreeCarrierBillVo.getNum());
-            carFreeCarrierBillStart.setIsSuccess(CommonConstants.ERROR);
-            carFreeCarrierBillStart.setErrorMsg("车辆备案失败");
-        } else {
-            //构建运单开始实体
-            Map<String, Object> startMap = new HashMap<>(16);
-//            startMap.put("companyNum", "10004616");
-            startMap.put("num", carFreeCarrierBillVo.getNum());
-            startMap.put("plateNumber", carFreeCarrierBillVo.getPlateNumber());
-            startMap.put("plateColor", carFreeCarrierBillVo.getPlateColor());
-            startMap.put("startTime", DateUtil.dateToTime(startTime));
-            startMap.put("sourceAddr", carFreeCarrierBillVo.getSourceAddr());
-            startMap.put("destAddr", carFreeCarrierBillVo.getDestAddr());
-            startMap.put("predictEndTime", DateUtil.dateToTime(endTime));
-            startMap.put("fee", ReadExcelUtil.bigDecimalToLong(carFreeCarrierBillVo.getFee()));
-            startMap.put("titleType", 2);
-            startMap.put("taxplayerCode", carFreeCarrierBillVo.getTaxPlayerCode());
-
-            //调用接口
-            String startMResult = httpUtil.getCheckResult(startMap, api);
-            // 测试用 不可提交
-//            String startMResult = "{\n" +
-//                    "    \"data\": 1,\n" +
-//                    "    \"code\": 200,\n" +
-//                    "    \"requestid\": \"20190429094207829,503b6b8d-ce1b-4d8f-82a0-1b5b9f6c5792\",\n" +
-//                    "    \"msg\": \"{\\\"info\\\":\\\"成功\\\",\\\"receiveTime\\\":\\\"2019-04-29T09:50:16\\\"}\"\n" +
-//                    "}";
-            log.info("运单开始接口返回:{},请求参数:{}", startMResult, JSON.toJSONString(startMap));
-            //转换结果为jsonobject
-            JSONObject startResultJson = JSON.parseObject(startMResult);
-            //获取返回data值
-            String dataCode = startResultJson.getString("data");
-            //判断返回值是否为1 如果是1 设置状态为成功
-            if ("1".equals(dataCode)) {
-                carFreeCarrierBillStart.setIsSuccess(CommonConstants.SUCCESS);
-            } else {
-                //设置失败
-                log.info(startResultJson.getString("msg"));
-                carFreeCarrierBillStart.setIsSuccess(CommonConstants.ERROR);
-
-                if (StringUtils.isNotBlank(startResultJson.getString("msg"))) {
-                    carFreeCarrierBillStart.setErrorMsg(startResultJson.getString("msg").replace("\n", ""));
-                } else {
-                    carFreeCarrierBillStart.setErrorMsg("上传失败,请重试");
-                }
-            }
-        }
-
-        carFreeCarrierBillStart.setNum(carFreeCarrierBillVo.getNum());
-        carFreeCarrierBillStart.setPlateNumber(carFreeCarrierBillVo.getPlateNumber());
-        carFreeCarrierBillStart.setPlateColor(carFreeCarrierBillVo.getPlateColor());
-        carFreeCarrierBillStart.setStartTime(startTime);
-        carFreeCarrierBillStart.setSourceAddr(carFreeCarrierBillVo.getSourceAddr());
-        carFreeCarrierBillStart.setDestAddr(carFreeCarrierBillVo.getDestAddr());
-        carFreeCarrierBillStart.setPredictEndTime(endTime);
-        carFreeCarrierBillStart.setFee(ReadExcelUtil.bigDecimalToLong(carFreeCarrierBillVo.getFee()));
-        carFreeCarrierBillStart.setTitleType(2);
-        carFreeCarrierBillStart.setTaxPlayerCode(carFreeCarrierBillVo.getTaxPlayerCode());
-        carFreeCarrierBillStart.setName(invoice.getCompany());
-        carFreeCarrierBillStart.setAddress(invoice.getAddress());
-        carFreeCarrierBillStart.setTel(invoice.getBuyerTel());
-        carFreeCarrierBillStart.setBank(invoice.getBankAddress());
-        carFreeCarrierBillStart.setBankAccount(invoice.getBankNumber());
-        carFreeCarrierBillStart.setBatchId(id);
-        carFreeCarrierBillStart.setBatchNumber(batchNumber);
-        carFreeCarrierBillStart.setUserId(user.getId());
-        carFreeCarrierBillStart.setUserName(user.getUserName());
-        carFreeCarrierBillStart.setUserCompany(user.getCompany());
-        carFreeCarrierBillStart.setUserPhone(user.getPhone());
-        carFreeCarrierBillStart.setCreateTime(System.currentTimeMillis());
-        carFreeCarrierBillStart.setStatus(CommonConstants.BILL_ERROR);
-        if (api.equals(CommonConstants.WAY_BILL_HISTORY_START_API)) {
-            carFreeCarrierBillStart.setIsHistory(2);
-        } else {
-            carFreeCarrierBillStart.setIsHistory(1);
-        }
-
-        if (CommonConstants.AUTO_INVOICE.equals(carFreeCarrierBillVo.getAutoFlag())) {
-            carFreeCarrierBillStart.setAutoFlag(CommonConstants.AUTO_INVOICE);
-        }
-        //判断运单开始状态是否成功
-        if (StrUtil.equals(carFreeCarrierBillStart.getIsSuccess().toString(), CommonConstants.SUCCESS.toString())) {
-            //设置运单状态为未完结
-            carFreeCarrierBillStart.setStatus(CommonConstants.UNFINISHED);
-        }
-        //插入运单开始信息
-        carFreeCarrierBillStartService.save(carFreeCarrierBillStart);
-
-        return carFreeCarrierBillStart.getIsSuccess();
-    }
-    /**
-     * 异步处理实时运单结束
-     *
-     * @param list
-     * @param user
-     * @param id
-     * @param batchNumber
-     */
-    @Async
-    public void endBill(List<CarFreeCarrierBillEnd> list, User user, String id, String batchNumber) {
-        log.info("批量导入结束运单异步接口接收到的数据:{}", JSON.toJSONString(list));
-
-        DateTimeFormatter sdf = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
-        //线程分割数
-        int count = 0;
-        //获取list大小
-        int listSize = list.size();
-        if (listSize <= 100) {
-            count = 20;
-        } else if (listSize <= 1000 && listSize > 100) {
-            count = 50;
-        } else if (listSize <= 12000 && listSize > 1000) {
-            count = 120;
-        } else if (listSize <= 20000 && listSize > 12000) {
-            count = 150;
-        } else if (listSize <= 30000 && listSize > 20000) {
-            count = 300;
-        } else {
-            count = 500;
-        }
-        //线程数
-        int threadSize = (listSize / count) + 1;
-
-        ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("thread-billEnd-%d").build();
-        ExecutorService executor = new ThreadPoolExecutor(threadSize, threadSize, 200L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), namedThreadFactory);
-
-        CountDownLatch countDownLatch = new CountDownLatch(threadSize);
-        List<CarFreeCarrierBillEnd> newList;
-        for (int i = 0; i < threadSize; i++) {
-            if ((i + 1) == threadSize) {
-                int startIndex = (i * count);
-                int endIndex = list.size();
-                newList = list.subList(startIndex, endIndex);
-            } else {
-                int startIndex = i * count;
-                int endIndex = (i + 1) * count;
-                newList = list.subList(startIndex, endIndex);
-            }
-
-            List<CarFreeCarrierBillEnd> finalNewList = newList;
-            executor.execute(new Thread(() -> {
-                if (null != finalNewList) {
-                    finalNewList.stream().forEach(c -> {
-                        String redisKey = CommonConstants.NUM_KEY_END + c.getNum();
-                        if (redisTemplate.hasKey(redisKey)) {
-                            log.info("实时运单结束,运单号:{},已存在", c.getNum());
-                        } else {
-                            DateTime endDateTime = new DateTime(c.getBillEndTime());
-                            String endTime = endDateTime.toString(sdf);
-
-                            //构建运单结束实体
-                            CarFreeCarrierBillEnd carFreeCarrierBillEnd = new CarFreeCarrierBillEnd();
-                            Map<String, Object> endMap = new HashMap<>(8);
-                            endMap.put("companyNum", "10004616");
-                            endMap.put("num", c.getNum());
-                            endMap.put("realDestAddr", c.getRealDestAddr());
-                            endMap.put("endTime", DateUtil.dateToTime(endTime));
-//                        endMap.put("invoiceTime", c.getInvoiceTime());
-                            //调用接口
-                            String endResult = httpUtil.getCheckResult(endMap, CommonConstants.WAY_BILL_END_API);
-                            // todo 测试后删除
-//                            String endResult = "{\n" +
-//                                    "    \"data\": 1,\n" +
-//                                    "    \"code\": 200,\n" +
-//                                    "    \"requestid\": \"20190429094207829,503b6b8d-ce1b-4d8f-82a0-1b5b9f6c5792\",\n" +
-//                                    "    \"msg\": \"{\\\"info\\\":\\\"成功\\\",\\\"receiveTime\\\":\\\"2019-04-29T09:50:16\\\"}\"\n" +
-//                                    "}";
-                            log.info("运单结束接口返回:{},请求参数:{},结束时间是:{}", endResult, JSON.toJSONString(endMap),endTime);
-                            //转换结果为jsonobject
-                            JSONObject endResultJson = JSON.parseObject(endResult);
-                            //获取返回data值
-                            String endDataCode = endResultJson.getString("data");
-                            //判断返回值是否为1 如果是1 设置状态为成功
-                            if ("1".equals(endDataCode)) {
-                                //设置状态为成功
-                                carFreeCarrierBillEnd.setIsSuccess(CommonConstants.SUCCESS);
-                                redisTemplate.opsForValue().set(redisKey, JSON.toJSONString(c));
-                            } else {
-                                //设置失败
-                                log.info(endResultJson.getString("msg"));
-                                carFreeCarrierBillEnd.setIsSuccess(CommonConstants.ERROR);
-                            }
-                            carFreeCarrierBillEnd.setInvoiceTime(c.getInvoiceTime());
-                            carFreeCarrierBillEnd.setNum(c.getNum());
-                            carFreeCarrierBillEnd.setEndTime(endTime);
-                            carFreeCarrierBillEnd.setRealDestAddr(c.getRealDestAddr());
-                            carFreeCarrierBillEnd.setBatchId(id);
-                            carFreeCarrierBillEnd.setBatchNumber(batchNumber);
-                            carFreeCarrierBillEnd.setUserId(user.getId());
-                            carFreeCarrierBillEnd.setUserName(user.getUserName());
-                            carFreeCarrierBillEnd.setUserCompany(user.getCompany());
-                            carFreeCarrierBillEnd.setUserPhone(user.getPhone());
-                            carFreeCarrierBillEnd.setCreateTime(System.currentTimeMillis());
-                            //设置运单是否为历史运单
-                            carFreeCarrierBillEnd.setIsHistory(CommonConstants.SUCCESS);
-                            //判断运单结束是否成功
-                            if (carFreeCarrierBillEnd.getIsSuccess().equals(CommonConstants.SUCCESS)) {
-                                try {
-                                    //设置运单状态已完结
-                                    carFreeCarrierBillStartService.updateStatus(c.getNum(), CommonConstants.FINISHED);
-                                } catch (Exception e) {
-                                    log.error("运单状态更新失败:{}", e.getMessage());
-                                }
-                            }
-                            //插入运单结束信息
-                            try {
-                                carFreeCarrierBillEndService.save(carFreeCarrierBillEnd);
-                            } catch (Exception e) {
-                                log.error("运单状态插入失败:{}", e.getMessage());
-                            }
-                        }
-                    });
-                }
-                countDownLatch.countDown();
-            }));
-        }
-
-        try {
-            countDownLatch.await();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        executor.shutdown();
-    }
-}

+ 0 - 62
src/main/java/com/jkcredit/invoice/consumer/B2bChargeConsumer.java

@@ -1,62 +0,0 @@
-package com.jkcredit.invoice.consumer;
-
-import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.UserService;
-import com.rabbitmq.client.Channel;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.amqp.core.Message;
-import org.springframework.amqp.rabbit.annotation.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.messaging.handler.annotation.Payload;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-20 09:04
- * @version: V1.0
- **/
-@Slf4j
-@Component
-public class B2bChargeConsumer {
-
-    @Autowired
-    private UserService userService;
-
-    @RabbitHandler
-    @RabbitListener(bindings = @QueueBinding(
-            exchange = @Exchange(
-                    name = CommonConstants.B2B_CHARGE_EXCHANGE,
-                    type = "topic",
-                    ignoreDeclarationExceptions = "true"
-            ),
-            value = @Queue(
-                    value = CommonConstants.B2B_CHARGE_QUEUE
-            ),
-            key = "b2b_charge.*"
-    ))
-    public void process(@Payload User user, Channel channel, Message message) throws IOException {
-        try {
-            synchronized (this) {
-                user = userService.getById(user.getId());
-               // user.setMoney(user.getMoney() - user.getPrice());
-                //更新余额
-                //userService.charge(user);
-            }
-            //告诉服务器收到这条消息 已经被我消费了 可以在队列删掉 这样以后就不会再发了 否则消息服务器以为这条消息没处理掉 后续还会在发
-            channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
-        } catch (IOException e) {
-            e.printStackTrace();
-            //丢弃这条消息
-            //channel.basicNack(message.getMessageProperties().getDeliveryTag(), false,false);
-            //ack返回false,并重新回到队列
-            channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, true);
-            log.error("接受失败");
-        }
-
-    }
-
-}

+ 0 - 71
src/main/java/com/jkcredit/invoice/consumer/ChargeConsumer.java

@@ -1,71 +0,0 @@
-package com.jkcredit.invoice.consumer;
-
-import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.Charge;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.ChargeService;
-import com.jkcredit.invoice.service.UserService;
-import com.rabbitmq.client.Channel;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.amqp.core.Message;
-import org.springframework.amqp.rabbit.annotation.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.messaging.handler.annotation.Payload;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-04 13:51
- * @version: V1.0
- **/
-@Slf4j
-//@Component
-public class ChargeConsumer {
-
-    @Autowired
-    private UserService userService;
-    @Autowired
-    private ChargeService chargeService;
-
-    @RabbitHandler
-    @RabbitListener(bindings = @QueueBinding(
-            exchange = @Exchange(
-                    name = CommonConstants.CHARGE_EXCHANGE,
-                    type = "topic",
-                    ignoreDeclarationExceptions = "true"
-            ),
-            value = @Queue(
-                    value = CommonConstants.CHARGE_QUEUE
-            ),
-            key = "charge.*"
-    ))
-    public void process(@Payload User user, Channel channel, Message message) throws IOException {
-        try {
-            synchronized (this) {
-                user = userService.getById(user.getId());
-                //user.setMoney(user.getMoney() - user.getPrice());
-                //更新余额
-                //userService.charge(user);
-            }
-            //告诉服务器收到这条消息 已经被我消费了 可以在队列删掉 这样以后就不会再发了 否则消息服务器以为这条消息没处理掉 后续还会在发
-            channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
-            Charge charge = new Charge();
-            charge.setUserId(user.getId().toString());
-            chargeService.save(charge);
-            log.warn("消息队列日志:{},计费用户id:{}", "扣款", user.getId());
-        } catch (IOException e) {
-            e.printStackTrace();
-            //丢弃这条消息
-            //channel.basicNack(message.getMessageProperties().getDeliveryTag(), false,false);
-            //ack返回false,并重新回到队列
-            channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, true);
-            log.warn("消息队列失败日志:{},计费用户id:{}", "扣款", user.getId());
-            log.error("接受失败");
-        }
-
-    }
-
-}

+ 0 - 69
src/main/java/com/jkcredit/invoice/controller/AutoBillController.java

@@ -1,69 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.jkcredit.invoice.model.entity.CarFreeCarrierBillStart;
-import com.jkcredit.invoice.model.entity.NumInvoice;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.CarFreeCarrierBillEndService;
-import com.jkcredit.invoice.service.CarFreeCarrierBillStartService;
-import com.jkcredit.invoice.service.NumInvoiceService;
-import com.jkcredit.invoice.service.UserService;
-import com.jkcredit.invoice.util.HttpUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019/10/23 5:31 下午
- * @version: V1.0
- **/
-@RestController
-@Slf4j
-@RequestMapping("/autoBill")
-public class AutoBillController {
-
-    @Autowired
-    private CarFreeCarrierBillStartService carFreeCarrierBillStartService;
-
-    @Autowired
-    private CarFreeCarrierBillEndService carFreeCarrierBillEndService;
-
-    @Autowired
-    private UserService userService;
-
-    @Autowired
-    private NumInvoiceService numInvoiceService;
-
-    @Autowired
-    private HttpUtil httpUtil;
-
-//    @GetMapping("info")
-//    public String updateBillInfo() {
-//        //获取设置自动查询的用户id
-//        List<User> userList = userService.getUserIdByUserAutoUpdate();
-//        log.info("用户列表:{}",userList);
-//        userList.stream().forEach(user -> {
-//            List<NumInvoice> numInvoiceList = new ArrayList<>();
-//            //查询用户开票中的运单列表
-//            List<CarFreeCarrierBillStart> carFreeCarrierBillStarts = carFreeCarrierBillStartService.getNotFinishList(user.getId());
-//            log.info("查询用户开票中的运单列表:{},用户id是:{}",carFreeCarrierBillStarts,user.getId());
-//            carFreeCarrierBillStarts.stream().forEach(carFreeCarrierBillStart -> {
-//                NumInvoice numInvoice = new NumInvoice();
-//                numInvoice.setNum(carFreeCarrierBillStart.getNum());
-//                log.info("[手动触发]开票中运单自动查询发票信息:{}",JSON.toJSONString(numInvoice));
-//                numInvoiceList.add(numInvoice);
-//            });
-//            log.info("可更新的发票信息:{}",numInvoiceList);
-//            //批量查询发票信息
-//            numInvoiceService.addNumList(numInvoiceList,user.getId());
-//        });
-//        return "ok";
-//    }
-}

+ 0 - 45
src/main/java/com/jkcredit/invoice/controller/B2bInvoiceApplyController.java

@@ -1,45 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.B2bInvoiceApply;
-import com.jkcredit.invoice.model.entity.CardTrade;
-import com.jkcredit.invoice.service.B2bInvoiceApplyService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 14:27
- * @version: V1.0
- **/
-@RestController
-@RequestMapping("/b2bInvoice")
-public class B2bInvoiceApplyController {
-
-    @Autowired
-    private B2bInvoiceApplyService b2bInvoiceApplyService;
-
-    @LoginRequired
-    @ApiOperation(value = "批量申请开票,入参企业编号、车牌号、开始时间、结束时间",notes = "批量申请开票,入参企业编号、车牌号、开始时间、结束时间")
-    @PostMapping("/apply")
-    public RespR invoiceApply(@RequestBody List<CardTrade> cardTradeList){
-        return b2bInvoiceApplyService.invoiceApply(cardTradeList);
-    }
-
-    @PostMapping("/page")
-    @ApiOperation(value = "查询已申请开票列表", notes = "查询已申请开票列表")
-    @LoginRequired
-    public RespR getB2bInvoiceApplyList(Page page, B2bInvoiceApply b2bInvoiceApply){
-        return new RespR<>(b2bInvoiceApplyService.getB2bInvoiceApplyPage(page,b2bInvoiceApply));
-    }
-}

+ 0 - 41
src/main/java/com/jkcredit/invoice/controller/B2bInvoicePackageController.java

@@ -1,41 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.B2bInvoicePackage;
-import com.jkcredit.invoice.service.B2bInvoicePackageService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-21 10:36
- * @version: V1.0
- **/
-@RestController
-@RequestMapping(value = "b2bInvoicePackage")
-public class B2bInvoicePackageController {
-
-    @Autowired
-    private B2bInvoicePackageService b2bInvoicePackageService;
-
-    @LoginRequired
-    @ApiOperation(value = "发票打包接口,入参企业编号、月份格式yyyy-MM-01",notes = "发票打包接口,入参企业编号、月份格式yyyy-MM-01")
-    @PostMapping("/package")
-    public RespR getInvoicePackage(@RequestBody B2bInvoicePackage b2bInvoicePackage){
-        return b2bInvoicePackageService.getInvoicePackage(b2bInvoicePackage);
-    }
-
-    @LoginRequired
-    @ApiOperation(value = "分页查询发票打包信息",notes = "分页查询发票打包信息")
-    @PostMapping("/page")
-    public RespR getB2bInvoicePackageList(Page page,B2bInvoicePackage b2bInvoicePackage){
-        return new RespR<>(b2bInvoicePackageService.getB2bInvoicePackagePage(page,b2bInvoicePackage));
-    }
-}

+ 0 - 38
src/main/java/com/jkcredit/invoice/controller/B2bInvoiceQueryController.java

@@ -1,38 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.B2bInvoiceQuery;
-import com.jkcredit.invoice.service.B2bInvoiceQueryService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 17:17
- * @version: V1.0
- **/
-@RestController
-@RequestMapping("b2bInvoiceQuery")
-public class B2bInvoiceQueryController {
-
-    @Autowired
-    private B2bInvoiceQueryService b2bInvoiceQueryService;
-
-    /**
-     * 查询已开发票
-     * @param b2bInvoiceQuery
-     * @return
-     */
-    @PostMapping("/query")
-    @ApiOperation(value = "查询已开发票接口,入参企业编号、车牌号、开始时间、结束时间", notes = "查询已开发票接口,入参企业编号、车牌号、开始时间、结束时间")
-    @LoginRequired
-    public RespR queryInvoiceToInterface(@RequestBody B2bInvoiceQuery b2bInvoiceQuery){
-        return b2bInvoiceQueryService.queryInvoiceToInterface(b2bInvoiceQuery);
-    }
-}

+ 0 - 42
src/main/java/com/jkcredit/invoice/controller/BatchController.java

@@ -1,42 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.Batch;
-import com.jkcredit.invoice.service.BatchService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 14:02
- * @version: V1.0
- **/
-@Api(tags = "批次管理")
-@RestController
-@RequestMapping("/batch")
-public class BatchController {
-
-    @Autowired
-    private BatchService batchService;
-
-    /**
-     * 查询批次列表
-     * @param page
-     * @return
-     */
-    @PostMapping("/list")
-    @ApiOperation(value = "查询批次列表", notes = "查询批次列表")
-    @LoginRequired
-    public RespR getBatchList(Page page, Batch batch){
-        return new RespR<>(batchService.getBatchPage(page,batch));
-    }
-
-
-}

+ 0 - 58
src/main/java/com/jkcredit/invoice/controller/BillEstimateController.java

@@ -1,58 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.jkcredit.invoice.model.entity.BillEstimate;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.BillEstimateService;
-import com.jkcredit.invoice.util.ReadExcelUtil;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-07-19 13:49
- * @version: V1.0
- **/
-@Slf4j
-@RestController
-@RequestMapping("/billEstimate")
-public class BillEstimateController {
-
-    @Autowired
-    private BillEstimateService billEstimateService;
-
-    /**
-     * 处理运单预估
-     * @param file
-     * @return
-     */
-    @PostMapping("/export")
-    @ApiOperation(value = "导出预估运单", notes = "导出预估运单")
-    public RespR billEstimateExport(@RequestParam("file") MultipartFile file, User user) {
-        List<BillEstimate> list;
-        try {
-            list = ReadExcelUtil.readBillExcel(file, BillEstimate.class);
-        } catch (Exception e) {
-            log.error("预估运单读取excel失败,失败原因:{}", e.getMessage());
-            return new RespR<>(Boolean.FALSE, "读取excel失败,请检查excel格式");
-        }
-        return billEstimateService.saveAndImport(list,user);
-    }
-
-    /**
-     * 下载
-     * @param response
-     */
-    @GetMapping("/down")
-    public void down(HttpServletResponse response){
-        billEstimateService.download(response);
-    }
-}

+ 0 - 45
src/main/java/com/jkcredit/invoice/controller/BillEstimateResultController.java

@@ -1,45 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.jkcredit.invoice.model.entity.BillEstimate;
-import com.jkcredit.invoice.model.entity.BillEstimateResult;
-import com.jkcredit.invoice.service.BillEstimateResultService;
-import com.jkcredit.invoice.util.ReadExcelUtil;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-07-18 17:23
- * @version: V1.0
- **/
-@Slf4j
-@RestController
-@RequestMapping("/billEstimateResult")
-public class BillEstimateResultController {
-
-    @Autowired
-    private BillEstimateResultService billEstimateResultService;
-
-    @PostMapping("/import")
-    @ApiOperation(value = "批量导入预估运单信息", notes = "批量导入预估运单信息")
-    public RespR billEstimateResultImport(@RequestParam("file") MultipartFile file) {
-        List<BillEstimateResult> list;
-        try {
-            list = ReadExcelUtil.readBillExcel(file, BillEstimateResult.class);
-        } catch (Exception e) {
-            log.error("预估运单读取excel失败,失败原因:{}", e.getMessage());
-            return new RespR<>(Boolean.FALSE, "读取excel失败,请检查excel格式");
-        }
-        return billEstimateResultService.save(list);
-    }
-}

+ 0 - 73
src/main/java/com/jkcredit/invoice/controller/CarEtcCardController.java

@@ -1,73 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.CarEtcCard;
-import com.jkcredit.invoice.service.CarEtcCardService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-17 15:54
- * @version: V1.0
- **/
-@RestController
-@RequestMapping(value = "carEtcCard")
-public class CarEtcCardController {
-
-    @Autowired
-    private CarEtcCardService carEtcCardService;
-
-    /**
-     * 查询ETC卡列表
-     * @param page
-     * @return
-     */
-    @PostMapping("/list")
-    @ApiOperation(value = "查询ETC卡列表", notes = "查询ETC卡列表")
-    @LoginRequired
-    public RespR getCarEtcCardList(Page page, CarEtcCard carEtcCard){
-        return new RespR<>(carEtcCardService.getCarEtcCardPage(page, carEtcCard));
-    }
-
-    /**
-     * 绑卡
-     * @param carEtcCard
-     * @param code
-     * @return
-     */
-    @PostMapping("/bind/{code}")
-    @ApiOperation(value = "绑定卡", notes = "绑定卡")
-    @LoginRequired
-    public RespR bindingCard(@RequestBody CarEtcCard carEtcCard, @PathVariable String code){
-        return carEtcCardService.etcCardBing(carEtcCard,code);
-    }
-
-    /**
-     * 发送验证码
-     * @param carEtcCard
-     * @return
-     */
-    @PostMapping("/send")
-    @ApiOperation(value = "发送验证码", notes = "发送验证码")
-    @LoginRequired
-    public RespR sendCode(@RequestBody CarEtcCard carEtcCard){
-        return carEtcCardService.sendCode(carEtcCard);
-    }
-
-    /**
-     * 查询卡信息
-     * @param carEtcCard
-     * @return
-     */
-    @PostMapping("/queryCard")
-    @ApiOperation(value = "查询卡信息", notes = "查询卡信息")
-    @LoginRequired
-    public RespR getCardListByInterface(@RequestBody CarEtcCard carEtcCard){
-        return carEtcCardService.getCardListByInterface(carEtcCard);
-    }
-}

+ 0 - 136
src/main/java/com/jkcredit/invoice/controller/CarFreeCarrierBillController.java

@@ -1,136 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import cn.afterturn.easypoi.excel.entity.ExportParams;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.CarFreeCarrierBillEnd;
-import com.jkcredit.invoice.model.entity.CarFreeCarrierBillStart;
-import com.jkcredit.invoice.model.vo.CarFreeCarrierBillVo;
-import com.jkcredit.invoice.service.CarFreeCarrierBillEndService;
-import com.jkcredit.invoice.service.CarFreeCarrierBillService;
-import com.jkcredit.invoice.service.CarFreeCarrierBillStartService;
-import com.jkcredit.invoice.util.DownExcelTemplateUtil;
-import com.jkcredit.invoice.util.ExportUtil;
-import com.jkcredit.invoice.util.ReadExcelUtil;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @description: 运单控制器
- * @author: sunzhaoning
- * @create: 2019-05-31 10:29
- * @version: V1.0
- **/
-@Api(tags = "运单管理")
-@RestController
-@Slf4j
-@RequestMapping("/carFreeCarrierBill")
-public class CarFreeCarrierBillController {
-
-    @Autowired
-    private CarFreeCarrierBillService carFreeCarrierBillService;
-
-    @Autowired
-    private CarFreeCarrierBillStartService carFreeCarrierBillStartService;
-
-    @Autowired
-    private CarFreeCarrierBillEndService carFreeCarrierBillEndService;
-
-    @LoginRequired
-    @PostMapping("/bill")
-    @ApiOperation(value = "批量导入运单信息", notes = "批量导入运单信息")
-    public RespR<Boolean> billImport(@RequestParam("file") MultipartFile file, @RequestParam Integer userId) {
-        List<CarFreeCarrierBillVo> list = ReadExcelUtil.readExcel(file, CarFreeCarrierBillVo.class);
-        log.info("批量导入实时运单传入参数:{}", JSON.toJSONString(list));
-        return carFreeCarrierBillService.addCarFreeCarrierBillList(list, userId);
-    }
-
-    @LoginRequired
-    @PostMapping("/historyBill")
-    @ApiOperation(value = "批量导入历史运单信息", notes = "批量导入历史运单信息")
-    public RespR<Boolean> historyBillImport(@RequestParam("file") MultipartFile file, @RequestParam Integer userId) {
-        List<CarFreeCarrierBillVo> list = ReadExcelUtil.readExcel(file, CarFreeCarrierBillVo.class);
-        log.info("批量导入历史运单传入参数:{}", JSON.toJSONString(list));
-        return carFreeCarrierBillService.addCarFreeCarrierBillHistoryList(list, userId);
-    }
-
-    @ApiOperation(value = "下载运单模板", notes = "下载运单模板")
-    @GetMapping("/downTemp")
-    public void donwTemp(HttpServletResponse response) {
-        DownExcelTemplateUtil.downloadExcel(response, "运单模板.xlsx");
-    }
-
-    @PostMapping("/list")
-    @ApiOperation(value = "查询运单列表", notes = "查询运单列表")
-    @LoginRequired
-    public RespR getCarFreeCarrierRegisterList(Page page, CarFreeCarrierBillStart carFreeCarrierBillStart) {
-        return new RespR<>(carFreeCarrierBillStartService.getCarFreeCarrierBillStartPage(page, carFreeCarrierBillStart));
-    }
-
-    @ApiOperation(value = "下载运单结束模板", notes = "下载运单结束模板")
-    @GetMapping("/downEndTemp")
-    public void donwTEndemp(HttpServletResponse response) {
-        DownExcelTemplateUtil.downloadExcel(response, "运单结束模板.xlsx");
-    }
-
-    @LoginRequired
-    @PostMapping("/billEnd")
-    @ApiOperation(value = "批量导入运单结束信息", notes = "批量导入运单结束信息")
-    public RespR<Boolean> billEndImport(@RequestParam("file") MultipartFile file, @RequestParam Integer userId) {
-        List<CarFreeCarrierBillEnd> list = ReadExcelUtil.readExcel(file, CarFreeCarrierBillEnd.class);
-//        List<CarFreeCarrierBillEnd> list = JSONArray.parseArray("[{\"endTime\":\"Tue Feb 12 12:21:21 CST 2019\",\"invoiceTime\":1,\"num\":\"123123\",\"realDestAddr\":\"beij\"},{\"endTime\":\"Tue Feb 12 12:21:21 CST 2019\",\"invoiceTime\":1,\"num\":\"123123\",\"realDestAddr\":\"beij\"}]",CarFreeCarrierBillEnd.class);
-        log.info("批量导入结束运单传入参数:{}", JSON.toJSONString(list));
-        return carFreeCarrierBillService.addCarFreeCarrierBillEndList(list, userId);
-    }
-
-    @PostMapping("/endList")
-    @ApiOperation(value = "查询运单结束列表", notes = "查询运单结束列表")
-    @LoginRequired
-    public RespR getCarFreeCarrierEndList(Page page, CarFreeCarrierBillEnd carFreeCarrierBillEnd) {
-        return new RespR<>(carFreeCarrierBillEndService.getCarFreeCarrierBillEndPage(page, carFreeCarrierBillEnd));
-    }
-
-    @ApiOperation(value = "导出运单列表", notes = "导出运单列表")
-    @GetMapping("/billExport")
-    public void export(Integer userId, HttpServletResponse response) throws IOException {
-        List<CarFreeCarrierBillStart> list = carFreeCarrierBillStartService.getCarFreeCarrierBillSuccessList(userId, CommonConstants.SUCCESS);
-//        List<CarFreeCarrierBillStart> newList = new ArrayList<>();
-
-        ExportUtil.exportExcel(list, CarFreeCarrierBillStart.class, "运单列表", new ExportParams("运单列表", "运单列表"), response);
-    }
-
-    @PostMapping("/notFinish")
-    @ApiOperation(value = "查询未开票完成运单列表", notes = "查询未开票完成运单列表")
-    @LoginRequired
-    public RespR getNotFinishListPage(Page page, CarFreeCarrierBillStart carFreeCarrierBillStart) {
-        return new RespR<>(carFreeCarrierBillStartService.getNotFinishListPage(page, carFreeCarrierBillStart));
-    }
-
-    @PostMapping("/finish")
-    @ApiOperation(value = "查询开票完成运单列表", notes = "查询开票完成运单列表")
-    @LoginRequired
-    public RespR getFinishListPage(Page page, CarFreeCarrierBillStart carFreeCarrierBillStart, Long startTime, Long endTime) {
-        if (endTime != null) {
-            carFreeCarrierBillStart.setCreateStartTime(startTime.toString());
-        }
-        if (endTime != null) {
-            carFreeCarrierBillStart.setCreateEndTime(endTime.toString());
-        }
-        return new RespR<>(carFreeCarrierBillStartService.getFinishListPage(page, carFreeCarrierBillStart));
-    }
-
-
-}

+ 0 - 72
src/main/java/com/jkcredit/invoice/controller/CarFreeCarrierRegisterController.java

@@ -1,72 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import cn.afterturn.easypoi.excel.entity.ExportParams;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.CarFreeCarrierRegister;
-import com.jkcredit.invoice.service.CarFreeCarrierRegisterService;
-import com.jkcredit.invoice.util.DownExcelTemplateUtil;
-import com.jkcredit.invoice.util.ExportUtil;
-import com.jkcredit.invoice.util.ReadExcelUtil;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 14:59
- * @version: V1.0
- **/
-@RestController
-@RequestMapping("carFreeCarrierRegister")
-@Api(tags = "无车承运人备案")
-@Slf4j
-public class CarFreeCarrierRegisterController {
-
-    @Autowired
-    private CarFreeCarrierRegisterService carFreeCarrierRegisterService;
-
-    /**
-     * 查询无车承运人备案列表
-     * @param page
-     * @return
-     */
-    @PostMapping("/list")
-    @ApiOperation(value = "查询无车承运人备案列表", notes = "查询无车承运人备案列表")
-    @LoginRequired
-    public RespR getCarFreeCarrierRegisterList(Page page, CarFreeCarrierRegister carFreeCarrierRegister){
-        return new RespR<>(carFreeCarrierRegisterService.getCarFreeCarrierRegisterPage(page, carFreeCarrierRegister));
-    }
-
-//    @LoginRequired
-//    @PostMapping("/excel")
-//    @ApiOperation(value = "批量导入备案信息", notes = "批量导入备案信息")
-//    public RespR<Boolean> excel(@RequestParam("file") MultipartFile file,@RequestParam Integer userId) {
-//        List<CarFreeCarrierRegister> list =ReadExcelUtil.readExcel(file,CarFreeCarrierRegister.class);
-//        return carFreeCarrierRegisterService.addCarFreeCarrierRegisterList(list,userId);
-//    }
-
-    @ApiOperation(value = "下载车辆备案模板",notes = "下载车辆备案模板")
-    @GetMapping("/downTemp")
-    public void donwTemp(HttpServletResponse response){
-        DownExcelTemplateUtil.downloadExcel(response,"车辆备案模板.xlsx");
-    }
-
-    @ApiOperation(value = "导出车辆备案列表",notes = "导出车辆备案列表")
-    @GetMapping("/export")
-    public void export(Integer userId, String plateNumber, String isSuccess, HttpServletResponse response) throws IOException {
-        ExportUtil.exportExcel(carFreeCarrierRegisterService.exportList(userId, plateNumber, isSuccess),CarFreeCarrierRegister.class,"车辆备案列表",new ExportParams("车辆备案列表", "车辆备案列表"),response);
-    }
-
-}

+ 0 - 54
src/main/java/com/jkcredit/invoice/controller/CardTradeController.java

@@ -1,54 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.CardTrade;
-import com.jkcredit.invoice.service.CardTradeService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 16:07
- * @version: V1.0
- **/
-@RestController
-@RequestMapping("/cardTrade")
-public class CardTradeController {
-
-    @Autowired
-    private CardTradeService cardTradeService;
-
-    /**
-     * 查询交易列表
-     * @param page
-     * @param cardTrade
-     * @return
-     */
-    @PostMapping("/page")
-    @ApiOperation(value = "查询交易列表", notes = "查询交易列表")
-    @LoginRequired
-    public RespR getCardTradeList(Page page, CardTrade cardTrade){
-        return new RespR<>(cardTradeService.getCardTradePage(page, cardTrade));
-    }
-
-    /**
-     * 查询交易
-     * @param cardTradeList
-     * @return
-     */
-    @PostMapping("/query")
-    @ApiOperation(value = "批量查询交易,入参 企业编号、车牌号、开始时间、结束时间", notes = "批量查询交易,入参 企业编号、车牌号、开始时间、结束时间")
-    @LoginRequired
-    public RespR queryCardTrade(@RequestBody List<CardTrade> cardTradeList){
-        return cardTradeService.queryCardTrade(cardTradeList);
-    }
-}

+ 0 - 65
src/main/java/com/jkcredit/invoice/controller/InvoiceController.java

@@ -1,65 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.Invoice;
-import com.jkcredit.invoice.service.InvoiceService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @description: 发票信息控制器
- * @author: sunzhaoning
- * @create: 2019-05-30 09:18
- * @version: V1.0
- **/
-@Api(tags = "发票管理")
-@RestController
-@RequestMapping("/invoice")
-@Slf4j
-public class InvoiceController {
-
-    @Autowired
-    private InvoiceService invoiceService;
-
-    /**
-     * 新增发票信息
-     * @param invoice
-     * @return
-     */
-    @PostMapping("/add")
-    @ApiOperation(value = "新增发票信息", notes = "新增发票信息")
-    @LoginRequired
-    public RespR addInvoice(@RequestBody Invoice invoice) {
-        return invoiceService.saveInvoice(invoice);
-    }
-
-    /**
-     * 查询发票列表
-     * @param page
-     * @return
-     */
-    @PostMapping("/list")
-    @ApiOperation(value = "查询发票列表", notes = "查询发票列表")
-    @LoginRequired
-    public RespR getInvoiceList(Page page,Invoice invoice){
-        return new RespR<>(invoiceService.getInvoicesPage(page,invoice));
-    }
-
-    /**
-     * 根据用户查询发票列表
-     * @param userId
-     * @return
-     */
-    @PostMapping("/{userId}")
-    @ApiOperation(value = "根据用户id查询发票信息", notes = "根据用户id查询发票信息")
-    @LoginRequired
-    public RespR getInvoiceListByUserId(@PathVariable Integer userId){
-        return new RespR(invoiceService.getByUserId(userId));
-    }
-
-}

+ 0 - 85
src/main/java/com/jkcredit/invoice/controller/NumInvoiceController.java

@@ -1,85 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.NumInvoice;
-import com.jkcredit.invoice.service.NumInvoiceService;
-import com.jkcredit.invoice.util.DownExcelTemplateUtil;
-import com.jkcredit.invoice.util.ReadExcelUtil;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-03 17:11
- * @version: V1.0
- **/
-@Api(tags = "运单查询发票")
-@RestController
-@Slf4j
-@RequestMapping("/numInvoice")
-public class NumInvoiceController {
-
-    @Autowired
-    private NumInvoiceService numInvoiceService;
-
-//    @LoginRequired
-//    @PostMapping("/excel")
-//    @ApiOperation(value = "批量导入运单信息", notes = "批量导入运单信息")
-//    public RespR<Boolean> numImport(@RequestParam("file") MultipartFile file, @RequestParam Integer userId) {
-//        List<NumInvoice> list = ReadExcelUtil.readNumExcel(file,NumInvoice.class);
-//        log.info("传入的参数是:{}", JSON.toJSONString(list));
-//        return numInvoiceService.addNumList(list,userId);
-//    }
-
-    @ApiOperation(value = "下载运单查询发票模板",notes = "下载运单查询发票模板")
-    @GetMapping("/downTemp")
-    public void donwTemp(HttpServletResponse response){
-        DownExcelTemplateUtil.downloadExcel(response,"运单查询发票模板.xlsx");
-    }
-
-    /**
-     * 查询列表
-     * @param page
-     * @return
-     */
-    @PostMapping("/list")
-    @ApiOperation(value = "查询列表", notes = "查询列表")
-    @LoginRequired
-    public RespR getInvoiceList(Page page, NumInvoice numInvoice){
-        return new RespR<>(numInvoiceService.getNumInvoicePage(page,numInvoice));
-    }
-
-    /**
-     * 批量开票接口
-     * @param nums
-     * @param userId
-     * @return
-     */
-//    @LoginRequired
-//    @PostMapping("/nums")
-//    @ApiOperation(value = "批量开票接口", notes = "批量开票")
-//    public RespR<Boolean> numImport(@RequestParam("nums") List<String> nums, @RequestParam Integer userId) {
-//        List<NumInvoice> list = new ArrayList<>();
-//        NumInvoice numInvoice;
-//        for(String num :nums){
-//            numInvoice = new NumInvoice();
-//            numInvoice.setNum(num);
-//            list.add(numInvoice);
-//        }
-////        log.info("传入的参数是:{}", JSON.toJSONString(list));
-//        return numInvoiceService.addNumList(list,userId);
-//    }
-}

+ 0 - 69
src/main/java/com/jkcredit/invoice/controller/PackageFileController.java

@@ -1,69 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.jkcredit.invoice.model.entity.SearchInvoiceResult;
-import com.jkcredit.invoice.service.CarFreeCarrierBillStartService;
-import com.jkcredit.invoice.service.SearchInvoiceResultService;
-import com.jkcredit.invoice.util.WebFileDownLoadUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * @description: 发票打包下载
- * @author: sunzhaoning
- * @create: 2019-07-12 10:48
- * @version: V1.0
- **/
-@Slf4j
-@RestController
-@RequestMapping("package")
-@Api(tags = "发票打包下载")
-public class PackageFileController {
-
-    @Autowired
-    private WebFileDownLoadUtils webFileDownLoadUtils;
-    @Autowired
-    private SearchInvoiceResultService searchInvoiceResultService;
-    @Autowired
-    private CarFreeCarrierBillStartService carFreeCarrierBillStartService;
-
-    @GetMapping("/download")
-//    @LoginRequired
-    @ApiOperation(value = "打包下载接口", notes = "打包下载接口")
-    public void downLoad(Integer userId, String batchNumber, Long startTime, Long endTime, String taxpayerCode,
-                         String plateNum, String waybillNum, String invoiceNum,
-                         HttpServletResponse response) {
-        SearchInvoiceResult requestParam = new SearchInvoiceResult();
-        if (userId == null) {
-            return;
-        } else {
-            requestParam.setUserId(userId);
-        }
-        if (StringUtils.isNotBlank(taxpayerCode)) {
-            requestParam.setTaxPlayerCode(taxpayerCode);
-        }
-        if (startTime != null) {
-            requestParam.setStartTime(startTime);
-        }
-        if (endTime != null) {
-            requestParam.setEndTime(endTime);
-        }
-        if (plateNum != null) {
-            requestParam.setPlateNum(plateNum.trim());
-        }
-        if (waybillNum != null) {
-            requestParam.setWaybillNum(waybillNum);
-        }
-        if (invoiceNum != null) {
-            requestParam.setInvoiceNum(invoiceNum);
-        }
-        searchInvoiceResultService.downloadInvoiceBat(requestParam, batchNumber, response);
-    }
-}

+ 0 - 40
src/main/java/com/jkcredit/invoice/controller/RechargeController.java

@@ -1,40 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.Recharge;
-import com.jkcredit.invoice.service.RechargeService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 10:50
- * @version: V1.0
- **/
-@RestController
-@RequestMapping("/recharge")
-@Api(tags = "充值记录")
-public class RechargeController {
-
-    @Autowired
-    private RechargeService rechargeService;
-
-    /**
-     * 查询充值记录列表
-     * @param page
-     * @return
-     */
-    @PostMapping("/list")
-    @ApiOperation(value = "查询充值记录列表", notes = "查询充值记录列表")
-    @LoginRequired
-    public RespR getRechargeList(Page page, Recharge recharge){
-        return new RespR<>(rechargeService.getRechargesPage(page,recharge));
-    }
-}

+ 0 - 102
src/main/java/com/jkcredit/invoice/controller/SearchInvoiceResultController.java

@@ -1,102 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.SearchInvoiceData;
-import com.jkcredit.invoice.model.entity.SearchInvoiceResult;
-import com.jkcredit.invoice.service.SearchInvoiceDataService;
-import com.jkcredit.invoice.service.SearchInvoiceResultService;
-import com.jkcredit.invoice.util.RespR;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
-
-@RestController
-@RequestMapping("/searchInvoiceResult")
-@Api(tags = "查询发票数据")
-public class SearchInvoiceResultController {
-    @Autowired
-    private SearchInvoiceResultService searchInvoiceResultService;
-    @Autowired
-    private SearchInvoiceDataService searchInvoiceDataService;
-    /**
-     * 查询发票数据列表
-     *
-     * @param page
-     * @return
-     */
-    @PostMapping("/list")
-    @ApiOperation(value = "查询发票数据列表", notes = "查询发票数据列表")
-    @LoginRequired
-    public RespR getSearchResultList(Page page, SearchInvoiceResult searchInvoiceResult,String batchNumber) {
-        return new RespR<>(searchInvoiceResultService.getSearchInvoiceResultPage(page, searchInvoiceResult,batchNumber));
-    }
-
-    /**
-     * 查询发票数据列表(表num_invoice与search_invoice_result数据)
-     *
-     * @param page
-     * @return
-     */
-    @PostMapping("/invoiceDataList")
-    @ApiOperation(value = "查询发票数据列表", notes = "查询发票数据列表")
-    @LoginRequired
-    public RespR getSearchInvoiceDataList(Page page, SearchInvoiceData searchInvoiceData) {
-        return new RespR(searchInvoiceDataService.getInvoiceDataPage(page, searchInvoiceData));
-    }
-
-    /**
-     * 导出发票列表
-     * @param userId
-     * @param waybillNum
-     * @param response
-     * @param batchNumber
-     * @param startTime
-     * @param endTime
-     * @throws IOException
-     */
-    @ApiOperation(value = "导出发票列表",notes = "导出发票列表")
-    @GetMapping("/export")
-    public void export(Integer userId,String waybillNum, HttpServletResponse response,String batchNumber,Long startTime,Long endTime) throws IOException {
-        try {
-            response.setCharacterEncoding("UTF-8");
-            response.setHeader("content-Type", "application/vnd.ms-excel");
-            response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("发票列表" + ".xlsx", "UTF-8"));
-            Workbook workbook = searchInvoiceResultService.exportExcelToTemplate(userId, waybillNum, batchNumber, startTime, endTime);
-            workbook.write(response.getOutputStream());
-        } catch (Exception e) {
-            throw new IOException(e.getMessage());
-        }
-    }
-
-    /**
-     * 查询发票统计
-     * @param searchInvoiceResult
-     * @return
-     */
-    @PostMapping("/statistics")
-    @ApiOperation(value = "查询发票统计", notes = "查询发票统计")
-    @LoginRequired
-    public RespR statisticsData(SearchInvoiceResult searchInvoiceResult,String batchNumber) {
-        List<SearchInvoiceResult> list = new ArrayList<>();
-        list.add(searchInvoiceResultService.statisticsData(searchInvoiceResult,batchNumber));
-        return new RespR<>(list);
-    }
-
-    @PostMapping("/dailyBill")
-    @ApiOperation(value = "查询发票统计", notes = "查询发票统计")
-    public RespR getDailyBilling(Page page,Integer userId) {
-        return new RespR<>(searchInvoiceResultService.getDailyBilling(page,userId));
-    }
-}

+ 0 - 147
src/main/java/com/jkcredit/invoice/controller/TempController.java

@@ -1,147 +0,0 @@
-package com.jkcredit.invoice.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
-import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.SearchInvoiceResult;
-import com.jkcredit.invoice.model.entity.SearchInvoiceResultTemp;
-import com.jkcredit.invoice.model.entity.WayBillTest;
-import com.jkcredit.invoice.service.SearchInvoiceResultService;
-import com.jkcredit.invoice.service.SearchInvoiceResultTempService;
-import com.jkcredit.invoice.util.HttpUtil;
-import com.jkcredit.invoice.util.ReadExcelUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.stream.Collectors;
-
-/**
- * @description:
- * @author: xusonglin
- * @create: 2019/12/13 13:21
- * @version: V1.0
- **/
-@RestController
-@RequestMapping("/temp")
-@Slf4j
-public class TempController {
-    @Autowired
-    private HttpUtil httpUtil;
-
-
-    @Autowired
-    private SearchInvoiceResultService searchInvoiceResultService;
-
-    @Autowired
-    private SearchInvoiceResultTempService tempService;
-
-    @Autowired
-    private RedisTemplate redisTemplate;
-
-    @RequestMapping("/temp")
-    public void temp(@RequestParam MultipartFile file) {
-        // 查询所有运单
-        List<WayBillTest> wayBillTestList = ReadExcelUtil.readTempExcel(file, WayBillTest.class);
-
-        //线程分割数
-        int count = 20000;
-        //获取list大小
-        int listSize = wayBillTestList.size();
-        //线程数
-        int threadSize = (listSize / count) + 1;
-
-        ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("thread-numInvoice-%d").build();
-
-        ExecutorService executor = new ThreadPoolExecutor(threadSize, threadSize, 200L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), namedThreadFactory);
-
-        CountDownLatch countDownLatch = new CountDownLatch(threadSize);
-        List<WayBillTest> newList;
-        for (int i = 0; i < threadSize; i++) {
-            if ((i + 1) == threadSize) {
-                int startIndex = (i * count);
-                int endIndex = wayBillTestList.size();
-                newList = wayBillTestList.subList(startIndex, endIndex);
-            } else {
-                int startIndex = i * count;
-                int endIndex = (i + 1) * count;
-                newList = wayBillTestList.subList(startIndex, endIndex);
-            }
-
-            List<WayBillTest> finalNewList = newList;
-            executor.execute(new Thread(() -> {
-                if (null != finalNewList) {
-                    log.info("传入数据是:{}", JSON.toJSONString(finalNewList));
-                    finalNewList.stream().forEach(numInvoice -> {
-                        Map<String, Object> map = new HashMap<>(4);
-                        map.put("companyNum","10004616");
-                        map.put("num", numInvoice.getWayBillNum());
-                        log.info("运单编号num={}", numInvoice.getWayBillNum());
-                        //调用接口
-                        String registerResult = httpUtil.getCheckResult(map, CommonConstants.WAY_BILL_NUM_FIND_INVOICE_API);
-//                        String registerResult = getTestResult();
-                        log.info("运单查询发票接口返回:{},请求参数:{}", registerResult, JSON.toJSONString(map));
-                        //转换结果为jsonobject
-                        JSONObject registerResultJson = JSON.parseObject(registerResult);
-                        //获取返回data值
-                        String dataCode = registerResultJson.getString("data");
-                        //判断返回值是否为1 如果是1 设置状态为成功
-                        if ("1".equals(dataCode)) {
-
-                            String returnStr = registerResultJson.getString("msg");
-
-                            JSONObject returnStrJson = JSON.parseObject(returnStr);
-                            //获取接口返回结果
-                            String numResult = returnStrJson.getString("result");
-                            //获取接口状态
-                            String waybillStatus = returnStrJson.getString("waybillStatus");
-
-                            //转换为结果实体对象 并插入数据库 实现计费功能
-                            List<SearchInvoiceResult> ts = JSONArray.parseArray(numResult, SearchInvoiceResult.class);
-                            List<SearchInvoiceResult> newSearchInvoiceResultList;
-                            if (ts.size() > 0) {
-                                //去重列表
-                                newSearchInvoiceResultList = ts.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(
-                                        () -> new TreeSet<>(Comparator.comparing(SearchInvoiceResult::getTransactionId))),
-                                        ArrayList::new));
-                                //计费
-                                newSearchInvoiceResultList.stream().forEach(t -> {
-                                    if (!redisTemplate.hasKey(CommonConstants.NUM_FIND_INVOICE_KEY + t.getInvoiceNum() + "_" + t.getInvoiceCode())) {
-                                        SearchInvoiceResultTemp temp = new SearchInvoiceResultTemp();
-                                        BeanUtils.copyProperties(t, temp);
-                                        tempService.save(temp);
-                                        //存入redis发票信息
-                                        redisTemplate.opsForValue().set(CommonConstants.NUM_FIND_INVOICE_KEY + t.getInvoiceNum() + "_" + t.getInvoiceCode(), JSON.toJSONString(t));
-                                        //存入redis交易id
-                                        redisTemplate.opsForValue().set(CommonConstants.TRANSACTION_ID_KEY + t.getTransactionId(), t.getTransactionId());
-                                    }
-                                });
-                            }
-                        } else {
-                            //设置失败
-                            log.error("返回code不等于1的结果={}", registerResult);
-                        }
-                    });
-                }
-                countDownLatch.countDown();
-            }));
-        }
-
-        try {
-            countDownLatch.await();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        executor.shutdown();
-    }
-}

+ 13 - 6
src/main/java/com/jkcredit/invoice/controller/Customer/CustomerController.java

@@ -1,13 +1,11 @@
-package com.jkcredit.invoice.controller.Customer;
+package com.jkcredit.invoice.controller.localBussiness;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.Customer;
-import com.jkcredit.invoice.model.entity.CustomerRec;
+import com.jkcredit.invoice.model.entity.customer.Customer;
 import com.jkcredit.invoice.model.entity.CustomerRecharge;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.CustomerService;
-import com.jkcredit.invoice.util.DateUtil;
+import com.jkcredit.invoice.model.entity.customer.CustomerRec;
+import com.jkcredit.invoice.service.customer.CustomerService;
 import com.jkcredit.invoice.util.RespR;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -71,4 +69,13 @@ public class CustomerController {
 
         return new RespR(customerService.customRecharge(customerRecharge));
     }
+
+    @PostMapping("/customeRec")
+    @ApiOperation(value="用户备案确认", notes="用户备案确认")
+    @LoginRequired
+    public RespR customeRec(@RequestBody CustomerRec customerRec){
+        return customerService.customeRec(customerRec);
+    }
+
+
 }

+ 111 - 0
src/main/java/com/jkcredit/invoice/controller/localBussiness/NoCarController.java

@@ -0,0 +1,111 @@
+package com.jkcredit.invoice.controller.localBussiness;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.annotation.LoginRequired;
+import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
+import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
+import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
+import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
+import com.jkcredit.invoice.service.CalculateInfor.NoCarCalculateInfoService;
+import com.jkcredit.invoice.service.nocar.NoCarBillWayService;
+import com.jkcredit.invoice.service.nocar.NoCarRecService;
+import com.jkcredit.invoice.service.nocar.NocarInvoiceService;
+import com.jkcredit.invoice.util.RespR;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api(tags = "无车操作")
+@RestController
+@RequestMapping(value = {"/noCar"})
+public class NoCarController {
+    @Autowired
+    NoCarRecService noCarService;
+
+    @Autowired
+    NoCarBillWayService noCarBillWayService;
+
+    @Autowired
+    NocarInvoiceService nocarInvoiceService;
+
+    @Autowired
+    NoCarCalculateInfoService noCarCalculateInfoService;
+    /**
+     * 分页查询无车备案信息
+     *
+     * @param page    参数集
+     * @return 用户集合
+     */
+    @PostMapping("/findCarRec")
+    @ApiOperation(value="分页查询无车备案信息", notes="分页查询无车备案信息")
+    @LoginRequired
+    public RespR getCustomersByPage(Page page, CustomerCarRec customerCarRec) {
+        try {
+            RespR respR = new RespR(noCarService.findByPageAndCarRec(page, customerCarRec));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+
+    /**
+     * 分页查询运单信息
+     *
+     * @param page    参数集
+     * @return 用户集合
+     */
+    @PostMapping("/findBillWay")
+    @ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
+    @LoginRequired
+    public RespR findBillWay(Page page, NoCarWayBill noCarWayBill) {
+        try {
+            RespR respR = new RespR(noCarBillWayService.findByPageAndWayBill(page, noCarWayBill));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+
+    /**
+     * 分页查询无车运单信息
+     *
+     * @param page    参数集
+     * @return 用户集合
+     */
+    @PostMapping("/findNocarInvoices")
+    @ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
+    @LoginRequired
+    public RespR findNocarInvoices(Page page, BillInvoice billInvoice) {
+        try {
+            RespR respR = new RespR(nocarInvoiceService.findByPageAndInvoice(page, billInvoice));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+
+    /**
+     * 分页查询无车计费信息
+     *
+     * @param page    参数集
+     * @return 用户集合
+     */
+    @PostMapping("/findNocarCalculateInfo")
+    @ApiOperation(value="分页查询无车计费信息", notes="分页查询无车计费信息")
+    @LoginRequired
+    public RespR findNocarCalculateInfo(Page page, NoCarCalculateInfor carCalculateInfor) {
+        try {
+            RespR respR = new RespR(noCarCalculateInfoService.findByPageAndCalculateInfor(page, carCalculateInfor));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+}

+ 107 - 0
src/main/java/com/jkcredit/invoice/controller/localBussiness/SelfCarController.java

@@ -0,0 +1,107 @@
+package com.jkcredit.invoice.controller.localBussiness;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.annotation.LoginRequired;
+import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
+import com.jkcredit.invoice.model.entity.Calculate.SelfCarCalculateInfor;
+import com.jkcredit.invoice.model.entity.invoice.SelfCarInvoice;
+import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
+import com.jkcredit.invoice.model.entity.waybill.SelfCarTrade;
+import com.jkcredit.invoice.service.CalculateInfor.SelfCarCalculateInfoService;
+import com.jkcredit.invoice.service.selfCar.SelfCarInvoiceService;
+import com.jkcredit.invoice.service.selfCar.SelfCarService;
+import com.jkcredit.invoice.service.selfCar.SelfCarTradeService;
+import com.jkcredit.invoice.util.RespR;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api(tags = "自有车操作")
+@RestController
+@RequestMapping(value = {"/selfCar"})
+public class SelfCarController {
+    @Autowired
+    SelfCarService selfCarService;
+    @Autowired
+    SelfCarTradeService selfCarTradeService;
+    @Autowired
+    SelfCarInvoiceService selfCarInvoiceService;
+    @Autowired
+    SelfCarCalculateInfoService selfCarCalculateInfoService;
+    /**
+     * 解绑etc卡
+     * @param etcNum    参数集
+     * @return 用户集合
+     */
+    @PostMapping("/selfCarUnBind")
+    @ApiOperation(value="解绑etc卡", notes="解绑etc卡")
+    @LoginRequired
+    public RespR selfCarUnBind(String etcNum) {
+        try {
+            RespR respR = selfCarService.selfCarUnBind(etcNum);
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+
+    /**
+     * 分页查询自有车交易信息
+     *
+     * @param page    参数集
+     * @return 交易信息
+     */
+    @PostMapping("/findTrades")
+    @ApiOperation(value="分页查询自有车交易信息", notes="分页查询自有车交易信息")
+    @LoginRequired
+    public RespR findTrades(Page page, SelfCarTrade selfCarTrade) {
+        try {
+            RespR respR = new RespR(selfCarTradeService.findByPageAndTrade(page, selfCarTrade));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+
+    /**
+     * 分页查询所有发票信息
+     *
+     * @param page    参数集
+     * @return 交易信息
+     */
+    @PostMapping("/findSelfCarInvoices")
+    @ApiOperation(value="分页查询自有车发票信息", notes="分页查询自有车发票信息")
+    @LoginRequired
+    public RespR findSelfCarInvoices(Page page, SelfCarInvoice selfCarInvoice) {
+        try {
+            RespR respR = new RespR(selfCarInvoiceService.findByPageAndInvoice(page, selfCarInvoice));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+
+    /**
+     * 分页查询自有车计费信息
+     *
+     * @param page    参数集
+     * @return 用户集合
+     */
+    @PostMapping("/findSelfcarCalculateInfo")
+    @ApiOperation(value="分页查询自有车计费信息", notes="分页查询自有车计费信息")
+    @LoginRequired
+    public RespR findSelfcarCalculateInfo(Page page, SelfCarCalculateInfor carCalculateInfor) {
+        try {
+            RespR respR = new RespR(selfCarCalculateInfoService.findByPageAndCalculateInfor(page, carCalculateInfor));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
+}

+ 36 - 9
src/main/java/com/jkcredit/invoice/controller/service/LowerServiceController.java

@@ -1,9 +1,11 @@
 package com.jkcredit.invoice.controller.service;
 
-import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.CustomerCarRec;
-import com.jkcredit.invoice.model.entity.CustomerRec;
-import com.jkcredit.invoice.service.LowerService;
+import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
+import com.jkcredit.invoice.model.entity.customer.CustomerRec;
+import com.jkcredit.invoice.service.customer.CustomerService;
+import com.jkcredit.invoice.service.customer.impl.CustomerServiceImpl;
+import com.jkcredit.invoice.service.lowerService.CustomeLowerService;
+import com.jkcredit.invoice.service.upService.CommInterFace;
 import com.jkcredit.invoice.util.RespR;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -15,12 +17,15 @@ import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
-@Api(tags = "下游接口")
+@Api(tags = "客户下游接口")
 @RestController
 @RequestMapping(value = {"/lowerService"})
-public class LowerServiceController {
+public class CustomerLowerServiceController {
     @Autowired
-    LowerService lowerService;
+    CustomeLowerService lowerService;
+
+    @Autowired
+    CustomerService customerService;
     /**
      * @param customerRecs
      * @return
@@ -31,6 +36,8 @@ public class LowerServiceController {
     public RespR customeRec(@RequestBody List<CustomerRec> customerRecs){
         return lowerService.customeRec(customerRecs);
     }
+
+
     /**
      * @param customerRec
      * @return
@@ -41,6 +48,17 @@ public class LowerServiceController {
     public RespR customeRecQueryList(@RequestBody CustomerRec customerRec){
         return lowerService.customeRecQueryList(customerRec);
     }
+
+    /**
+     * @param customerRec
+     * @return
+     */
+    @PostMapping("/customeRecQueryUpper")
+    @ApiOperation(value="企业备案信息上游查询", notes="企业备案上游查询")
+    //@LoginRequired
+    public RespR customeRecQuery(@RequestBody CustomerRec customerRec){
+        return customerService.customerRecQuery(customerRec);
+    }
     /**
      * @param customerRec
      * @return
@@ -48,7 +66,7 @@ public class LowerServiceController {
     @PostMapping("/customeRecQuery")
     @ApiOperation(value="用户备案信息查询", notes="用户备案信息查询")
     //@LoginRequired
-    public RespR customeRecQuery(@RequestBody CustomerRec customerRec){
+    public RespR customeRecQueryListUpper(@RequestBody CustomerRec customerRec){
         return lowerService.customeRecQuery(customerRec);
     }
     /**
@@ -61,7 +79,16 @@ public class LowerServiceController {
     public RespR customerCarRec(@RequestBody List<CustomerCarRec> customerCarRecs){
         return lowerService.customerCarRec(customerCarRecs);
     }
-
+    /**
+     * @param customerCarRecs
+     * @return
+     */
+    @PostMapping("/customerCarUnRec")
+    @ApiOperation(value="", notes="etc解绑")
+    //@LoginRequired
+    public RespR customerCarUnRec(@RequestBody List<CustomerCarRec> customerCarRecs){
+        return lowerService.customerCarRec(customerCarRecs);
+    }
     /**
      * @param customerCarRec
      * @return

+ 98 - 0
src/main/java/com/jkcredit/invoice/controller/service/NoCarServiceController.java

@@ -0,0 +1,98 @@
+package com.jkcredit.invoice.controller.service;
+
+import com.jkcredit.invoice.model.entity.customer.CustomerRec;
+import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
+import com.jkcredit.invoice.service.lowerService.NoCarService;
+import com.jkcredit.invoice.service.lowerService.vo.HCInvoiceQueryVo;
+import com.jkcredit.invoice.service.lowerService.vo.MonthAccountQueryVo;
+import com.jkcredit.invoice.util.RespR;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@Api(tags = "无车下游接口")
+@RestController
+@RequestMapping(value = {"/noCarService"})
+public class NoCarServiceController {
+    @Autowired
+    private NoCarService noCarService;
+    /**
+     * @param noCarWayBill
+     * @return
+     */
+    @PostMapping("/noCarBillStart")
+    @ApiOperation(value="实时运单开始指令", notes="实时运单开始指令")
+    //@LoginRequired
+    public RespR noCarBillStart(@RequestBody NoCarWayBill noCarWayBill){
+        return noCarService.noCarWaybillStart(noCarWayBill);
+    }
+    /**
+     * @param noCarWayBill
+     * @return
+     */
+    @PostMapping("/noCarBillEnd")
+    @ApiOperation(value="实时运单结束指令", notes="实时运单结束指令")
+    //@LoginRequired
+    public RespR noCarBillEnd(@RequestBody NoCarWayBill noCarWayBill){
+        return noCarService.noCarWaybillEnd(noCarWayBill);
+    }
+    /**
+     * @param noCarWayBill
+     * @return
+     */
+    @PostMapping("/noCarHisWaybillStart")
+    @ApiOperation(value="历史运单开始指令", notes="用户运单结束指令")
+    //@LoginRequired
+    public RespR noCarHisWaybillStart(@RequestBody NoCarWayBill noCarWayBill){
+        return noCarService.noCarHisWaybillStart(noCarWayBill);
+    }
+    /**
+     * @param noCarWayBill
+     * @return
+     */
+    @PostMapping("/noCarHisWaybillEnd")
+    @ApiOperation(value="历史运单结束指令", notes="历史运单结束指令")
+    //@LoginRequired
+    public RespR noCarHisWaybillEnd(@RequestBody NoCarWayBill noCarWayBill){
+        return noCarService.noCarHisWaybillEnd(noCarWayBill);
+    }
+
+    /**
+     * @param
+     * @return
+     */
+    @PostMapping("/noCarVoiceQuery")
+    @ApiOperation(value="发票查询接口(走本地库)", notes="发票查询接口(走本地库)")
+    //@LoginRequired
+    public RespR noCarVoiceQuery(@RequestBody NoCarWayBill noCarWayBill){
+        return noCarService.getInvoiceByWayBillNumReal(noCarWayBill,false);
+    }
+
+    /**
+     * @param
+     * @return
+     */
+    @PostMapping("/hCVoiceQuery")
+    @ApiOperation(value="红冲发票查询接口", notes="红冲发票查询接口(走本地库)")
+    //@LoginRequired
+    public RespR hCVoiceQuery(@RequestBody HCInvoiceQueryVo hcInvoiceQueryVo){
+        return noCarService.hCInvoiceQuery(hcInvoiceQueryVo);
+    }
+
+    /**
+     * @param
+     * @return
+     */
+    @PostMapping("/monthAccQuery")
+    @ApiOperation(value="月账单交易查询", notes="月账单交易查询")
+    //@LoginRequired
+    public RespR monthAccQuery(@RequestBody MonthAccountQueryVo monthAccountQueryVo){
+        return noCarService.monthAccQuery(monthAccountQueryVo);
+    }
+}

+ 54 - 0
src/main/java/com/jkcredit/invoice/controller/service/SelfCarServiceController.java

@@ -0,0 +1,54 @@
+package com.jkcredit.invoice.controller.service;
+
+import com.jkcredit.invoice.service.lowerService.SelfCarServiceL;
+import com.jkcredit.invoice.service.lowerService.vo.InvoiceApplVo;
+import com.jkcredit.invoice.service.lowerService.vo.SelfCarDueQueryVo;
+import com.jkcredit.invoice.service.lowerService.vo.TradeRequestVo;
+import com.jkcredit.invoice.util.RespR;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api(tags = "自有车下游接口")
+@RestController
+@RequestMapping(value = {"/selfCarService"})
+public class SelfCarServiceController {
+    @Autowired
+    SelfCarServiceL selfCarService;
+    /**
+     * @param tradeRequestVo
+     * @return
+     */
+    @PostMapping("/getTradeList")
+    @ApiOperation(value="获取交易Id列表", notes="获取交易Id列表")
+    //@LoginRequired
+    public RespR getTradeList(@RequestBody TradeRequestVo tradeRequestVo){
+        return selfCarService.getTradeList(tradeRequestVo);
+    }
+
+    /**
+     * @param invoiceApplVo
+     * @return
+     */
+    @PostMapping("/applInvoice")
+    @ApiOperation(value="开票申请", notes="开票申请")
+    //@LoginRequired
+    public RespR applInvoice(@RequestBody InvoiceApplVo invoiceApplVo){
+        return selfCarService.applInvoice(invoiceApplVo);
+    }
+
+    /**
+     * @param selfCarDueQueryVo
+     * @return
+     */
+    @PostMapping("/getSelfCarInvoicesByTime")
+    @ApiOperation(value="已开发票查询", notes="已开发票查询")
+    //@LoginRequired
+    public RespR getSelfCarInvoicesByTime(@RequestBody SelfCarDueQueryVo selfCarDueQueryVo){
+        return selfCarService.getSelfCarInvoicesByTime(selfCarDueQueryVo);
+    }
+}

+ 3 - 3
src/main/java/com/jkcredit/invoice/controller/user/AuthenticationController.java

@@ -2,9 +2,9 @@ package com.jkcredit.invoice.controller.user;
 
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONObject;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.AuthenticationService;
-import com.jkcredit.invoice.service.UserService;
+import com.jkcredit.invoice.model.entity.user.User;
+import com.jkcredit.invoice.service.user.AuthenticationService;
+import com.jkcredit.invoice.service.user.UserService;
 import com.jkcredit.invoice.util.MD5Util;
 import com.jkcredit.invoice.util.RespR;
 import io.swagger.annotations.Api;

+ 2 - 2
src/main/java/com/jkcredit/invoice/controller/RoleController.java

@@ -1,7 +1,7 @@
-package com.jkcredit.invoice.controller;
+package com.jkcredit.invoice.controller.user;
 
 import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.service.RoleService;
+import com.jkcredit.invoice.service.user.RoleService;
 import com.jkcredit.invoice.util.RespR;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;

+ 2 - 2
src/main/java/com/jkcredit/invoice/controller/user/UserController.java

@@ -2,8 +2,8 @@ package com.jkcredit.invoice.controller.user;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.annotation.LoginRequired;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.service.UserService;
+import com.jkcredit.invoice.model.entity.user.User;
+import com.jkcredit.invoice.service.user.UserService;
 import com.jkcredit.invoice.util.MD5Util;
 import com.jkcredit.invoice.util.RespR;
 import io.swagger.annotations.Api;

+ 0 - 26
src/main/java/com/jkcredit/invoice/mapper/B2bInvoiceApplyMapper.java

@@ -1,26 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.B2bInvoiceApply;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 13:34
- * @version: V1.0
- **/
-public interface B2bInvoiceApplyMapper extends BaseMapper<B2bInvoiceApply> {
-
-    /**
-     * 分页查询开票
-     * @param page
-     * @param b2bInvoiceApply
-     * @return
-     */
-    IPage<List<B2bInvoiceApply>> getB2bInvoiceApplyPage(Page page, @Param("query") B2bInvoiceApply b2bInvoiceApply);
-}

+ 0 - 28
src/main/java/com/jkcredit/invoice/mapper/B2bInvoicePackageMapper.java

@@ -1,28 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.B2bInvoicePackage;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-21 10:08
- * @version: V1.0
- **/
-public interface B2bInvoicePackageMapper extends BaseMapper<B2bInvoicePackage> {
-
-
-    /**
-     * 分页查询
-     * @param page
-     * @param b2bInvoicePackage
-     * @return
-     */
-    IPage<List<B2bInvoicePackage>> getB2bInvoicePackagePage(Page page, @Param("query") B2bInvoicePackage b2bInvoicePackage);
-
-}

+ 0 - 39
src/main/java/com/jkcredit/invoice/mapper/B2bInvoiceQueryMapper.java

@@ -1,39 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.B2bInvoiceQuery;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 16:28
- * @version: V1.0
- **/
-public interface B2bInvoiceQueryMapper extends BaseMapper<B2bInvoiceQuery> {
-
-    /**
-     * 分页查询
-     * @param page
-     * @param b2bInvoiceQuery
-     * @return
-     */
-    IPage<List<B2bInvoiceQuery>> getB2bInvoiceQueryPage(Page page, @Param("query") B2bInvoiceQuery b2bInvoiceQuery);
-
-    /**
-     * 根据交易id查询是否存在交易
-     * @param tradeId
-     * @return
-     */
-    List<B2bInvoiceQuery> getB2bInvoiceByTradeId(String tradeId);
-
-    /**
-     * 根据交易id删除数据
-     * @param tradeId
-     */
-    void deleteByTradeId(String tradeId);
-}

+ 0 - 27
src/main/java/com/jkcredit/invoice/mapper/BatchMapper.java

@@ -1,27 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.Batch;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 11:59
- * @version: V1.0
- **/
-public interface BatchMapper extends BaseMapper<Batch> {
-
-    /**
-     * 分页查询批次
-     * @param page
-     * @param batch
-     * @return
-     */
-    IPage<List<Batch>> getBatchPage(Page page, @Param("query") Batch batch);
-
-}

+ 24 - 0
src/main/java/com/jkcredit/invoice/mapper/Binvoce/BillInvoiceMapper.java

@@ -0,0 +1,24 @@
+package com.jkcredit.invoice.mapper.Binvoce;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+@Repository
+public interface BillInvoiceMapper extends BaseMapper<BillInvoice>{
+    IPage<List<BillInvoice>> selectAllByPage(Page page, @Param("billInvoice") BillInvoice billInvoice);
+
+    int insert(BillInvoice record);
+
+    int updateByPrimaryKey(BillInvoice record);
+
+    int updateByInvoiceNum(BillInvoice record);
+
+    List<BillInvoice> selectByBillNum(String wayBillNum);
+
+    BillInvoice selectByInvoiceNum(String wayBillNum);
+}

+ 16 - 0
src/main/java/com/jkcredit/invoice/mapper/Binvoce/SelfCarApplMapper.java

@@ -0,0 +1,16 @@
+package com.jkcredit.invoice.mapper.Binvoce;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.invoice.SelfCarAppl;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+@Repository
+public interface SelfCarApplMapper  extends BaseMapper<SelfCarAppl> {
+    IPage<List<SelfCarAppl>> selectAllByPage(Page page, @Param("selfCarAppl") SelfCarAppl selfCarAppl);
+    List<SelfCarAppl> selectAllNoRec();
+    int insert(SelfCarAppl record);
+}

+ 24 - 0
src/main/java/com/jkcredit/invoice/mapper/Binvoce/SelfCarInvoiceMapper.java

@@ -0,0 +1,24 @@
+package com.jkcredit.invoice.mapper.Binvoce;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.invoice.SelfCarInvoice;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+@Repository
+public interface SelfCarInvoiceMapper extends BaseMapper<SelfCarInvoice> {
+    IPage<List<SelfCarInvoice>> selectAllByPage(Page page, @Param("selfCarInvoice") SelfCarInvoice selfCarInvoice);
+
+    int insert(SelfCarInvoice record);
+
+    int updateByPrimaryKey(SelfCarInvoice record);
+
+    int updateByInvoiceNum(SelfCarInvoice record);
+
+    List<SelfCarInvoice> selectByTrade(String tradeId);
+
+    SelfCarInvoice selectByInvoiceNum(String wayBillNum);
+}

+ 0 - 39
src/main/java/com/jkcredit/invoice/mapper/CarEtcCardMapper.java

@@ -1,39 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.CarEtcCard;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description: etc卡mapper
- * @author: sunzhaoning
- * @create: 2019-06-17 15:07
- * @version: V1.0
- **/
-public interface CarEtcCardMapper extends BaseMapper<CarEtcCard> {
-
-    /**
-     * 分页查询ETC卡列表
-     * @param page
-     * @param carEtcCard
-     * @return
-     */
-    IPage<List<CarEtcCard>> getCarEtcCardPage(Page page, @Param("query") CarEtcCard carEtcCard);
-
-    /**
-     * 根据车牌号查询卡编号
-     * @param plateNum
-     * @return
-     */
-    List<CarEtcCard> getCarEtcCardByPlateNum(String plateNum);
-
-    /**
-     * 根据车牌号删除卡信息
-     * @param plateNum
-     */
-    void deleteByPlateNum(String plateNum);
-}

+ 0 - 43
src/main/java/com/jkcredit/invoice/mapper/CarFreeCarrierBillEndMapper.java

@@ -1,43 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.CarFreeCarrierBillEnd;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-31 11:36
- * @version: V1.0
- **/
-public interface CarFreeCarrierBillEndMapper extends BaseMapper<CarFreeCarrierBillEnd> {
-
-    /**
-     * 根据运单状态编号查询运单
-     * @param num
-     * @param isSuccess
-     * @return
-     */
-    List<CarFreeCarrierBillEnd> getEndBillByNum(String num,Integer isSuccess);
-
-    /**
-     * 根据运单编号修改运单请求状态
-     * @param num
-     * @param isSuccess
-     */
-    void updateIsSuccess(String num,Integer isSuccess);
-
-
-    /**
-     * 分页查询
-     * @param page
-     * @param carFreeCarrierBillEnd
-     * @return
-     */
-    IPage<List<CarFreeCarrierBillEnd>> getCarFreeCarrierBillEndPage(Page page, @Param("query") CarFreeCarrierBillEnd carFreeCarrierBillEnd);
-
-}

+ 0 - 127
src/main/java/com/jkcredit/invoice/mapper/CarFreeCarrierBillStartMapper.java

@@ -1,127 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.CarFreeCarrierBillStart;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-31 11:34
- * @version: V1.0
- **/
-public interface CarFreeCarrierBillStartMapper extends BaseMapper<CarFreeCarrierBillStart> {
-
-    /**
-     * 分页查询
-     * @param page
-     * @param carFreeCarrierBillStart
-     * @return
-     */
-    IPage<List<CarFreeCarrierBillStart>> getCarFreeCarrierBillStartPage(Page page, @Param("query") CarFreeCarrierBillStart carFreeCarrierBillStart);
-
-    /**
-     * 获取未开票完成列表
-     * @param page
-     * @param carFreeCarrierBillStart
-     * @return
-     */
-    IPage<List<CarFreeCarrierBillStart>> getNotFinishListPage(Page page, @Param("query") CarFreeCarrierBillStart carFreeCarrierBillStart);
-
-    /**
-     * 获取开票完成列表
-     * @param page
-     * @param carFreeCarrierBillStart
-     * @return
-     */
-    IPage<List<CarFreeCarrierBillStart>> getFinishListPage(Page page, @Param("query") CarFreeCarrierBillStart carFreeCarrierBillStart);
-
-    /**
-     * 更新状态
-     * @param carFreeCarrierBillStart
-     * @return
-     */
-    Boolean updateStatus(CarFreeCarrierBillStart carFreeCarrierBillStart);
-
-    /**
-     * 更新导出状态
-     * @param carFreeCarrierBillStart
-     * @return
-     */
-    Boolean updateIsExport(CarFreeCarrierBillStart carFreeCarrierBillStart);
-
-    /**
-     * 根据运单状态 查询 运单数据
-     * @param status
-     * @param isSuccess
-     * @return
-     */
-    List<CarFreeCarrierBillStart> getStartBillByStatus(Integer status,Integer isSuccess,Integer isHistory);
-
-    /**
-     * 根据运单状态 查询 预估自动运单数据
-     * @param status
-     * @param isSuccess
-     * @return
-     */
-    List<CarFreeCarrierBillStart> getStartBillByFlag(Integer status,Integer isSuccess,Integer isHistory,Integer autoFlag);
-
-    /**
-     * 获取成功列表
-     * @param userId
-     * @param isSuccess
-     * @return
-     */
-    List<CarFreeCarrierBillStart> getCarFreeCarrierBillSuccessList(Integer userId,Integer isSuccess);
-
-    /**
-     * 根据运单号状态查询运单
-     * @param num
-     * @param isSuccess
-     * @return
-     */
-    CarFreeCarrierBillStart getBillNumByNum(String num,Integer isSuccess);
-
-    /**
-     * 更新状态
-     * @param carFreeCarrierBillStart
-     * @return
-     */
-    Boolean updateStatusAndBatchId(CarFreeCarrierBillStart carFreeCarrierBillStart);
-
-    /**
-     * 根据批次ID获取运单编号
-     * @param batchNumber
-     * @return
-     */
-    List<CarFreeCarrierBillStart> getBillNumByBatchNumber(String batchNumber);
-
-    /**
-     * 根据用户id查询运单列表
-     * @param userId
-     * @return
-     */
-    List<CarFreeCarrierBillStart> getNotFinishList(Integer userId);
-
-    /**
-     * 获取自动开票运单列表
-     * @return
-     */
-    List<CarFreeCarrierBillStart> getAutoBillList(Integer userId);
-
-    /**
-     * 根据用户id查询实时运单列表
-     */
-    List<CarFreeCarrierBillStart> getNotFinishRealTimeList(Integer userId);
-
-    /**
-     * 根据用户id查询历史运单列表
-     */
-    List<CarFreeCarrierBillStart> getNotFinishHistoryList(Integer userId);
-
-    void updateLegacyDataFlag(String num);
-}

+ 0 - 54
src/main/java/com/jkcredit/invoice/mapper/CarFreeCarrierRegisterMapper.java

@@ -1,54 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.CarFreeCarrierRegister;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 12:05
- * @version: V1.0
- **/
-public interface CarFreeCarrierRegisterMapper extends BaseMapper<CarFreeCarrierRegister> {
-
-    /**
-     * 分页
-     * @param page
-     * @param carFreeCarrierRegister
-     * @return
-     */
-    IPage<List<CarFreeCarrierRegister>> getCarFreeCarrierRegisterPage(Page page, @Param("query") CarFreeCarrierRegister carFreeCarrierRegister);
-
-    /**
-     * 根据用户获取用户备案列表
-     * @param id
-     * @return
-     */
-    List<CarFreeCarrierRegister> getListByUser(Integer id, String plateNumber, String isSuccess);
-
-    /**
-     * 根据车牌号车牌颜色查询备案成功车辆
-     * @param carFreeCarrierRegister
-     * @return
-     */
-    CarFreeCarrierRegister getRegisterByPlateNum(CarFreeCarrierRegister carFreeCarrierRegister);
-
-    /**
-     * 根据车牌号车牌颜色查询备案成功车辆, 返回集合
-     * @param carFreeCarrierRegister
-     * @return
-     */
-    List<CarFreeCarrierRegister> getRegisterListByPlateNum(@Param("query") CarFreeCarrierRegister carFreeCarrierRegister, Integer userId);
-
-    /**
-     * 根据车牌号查询备案车辆
-     * @param carFreeCarrierRegister
-     * @return
-     */
-    CarFreeCarrierRegister getCarRegisterByPlateNum(@Param("query") CarFreeCarrierRegister carFreeCarrierRegister);
-}

+ 0 - 41
src/main/java/com/jkcredit/invoice/mapper/CardTradeMapper.java

@@ -1,41 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.CardTrade;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 10:08
- * @version: V1.0
- **/
-public interface CardTradeMapper extends BaseMapper<CardTrade> {
-
-    /**
-     * 分页查询交易
-     * @param page
-     * @param cardTrade
-     * @return
-     */
-    IPage<List<CardTrade>> getCardTradePage(Page page, @Param("query") CardTrade cardTrade);
-
-
-    /**
-     * 更新状态
-     * @param cardTrade
-     * @return
-     */
-    Boolean updateStatus(CardTrade cardTrade);
-
-    /**
-     * 获取交易编号列表
-     * @param cardTrade
-     * @return
-     */
-    List<CardTrade> getTradeIdList(CardTrade cardTrade);
-}

+ 0 - 7
src/main/java/com/jkcredit/invoice/mapper/ChargeMapper.java

@@ -1,7 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.jkcredit.invoice.model.entity.Charge;
-
-public interface ChargeMapper extends BaseMapper<Charge> {
-}

+ 0 - 7
src/main/java/com/jkcredit/invoice/mapper/ConsumeQueueMapper.java

@@ -1,7 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.jkcredit.invoice.model.entity.ConsumeQueue;
-
-public interface ConsumeQueueMapper extends BaseMapper<ConsumeQueue> {
-}

+ 0 - 22
src/main/java/com/jkcredit/invoice/mapper/CustomerCarRecMapper.java

@@ -1,22 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.jkcredit.invoice.model.entity.CustomerCarRec;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface CustomerCarRecMapper {
-    int deleteByPrimaryKey(String carNum);
-
-    int insert(CustomerCarRec record);
-
-    int insertSelective(CustomerCarRec record);
-
-    List<CustomerCarRec>  selectByCustName(String customerName);
-
-    CustomerCarRec selectByCarNum(String carNum);
-    int updateByPrimaryKeySelective(CustomerCarRec record);
-
-    int updateByPrimaryKey(CustomerCarRec record);
-}

+ 0 - 40
src/main/java/com/jkcredit/invoice/mapper/InvoiceMapper.java

@@ -1,40 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.Invoice;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 09:14
- * @version: V1.0
- **/
-public interface InvoiceMapper extends BaseMapper<Invoice> {
-
-    /**
-     * 分页查询发票列表
-     * @param page
-     * @param invoice
-     * @return
-     */
-    IPage<List<Invoice>> getInvoicesPage(Page page, @Param("query") Invoice invoice);
-
-    /**
-     * 根据税号查询发票信息
-     * @param dutyParagraph
-     * @return
-     */
-    Invoice getInvoiceByDutyParagraph(String dutyParagraph);
-
-    /**
-     * 根据用户id查询发票
-     * @param userId
-     * @return
-     */
-    List<Invoice> getByUserId(Integer userId);
-}

+ 0 - 26
src/main/java/com/jkcredit/invoice/mapper/NumInvoiceMapper.java

@@ -1,26 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.NumInvoice;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-03 17:04
- * @version: V1.0
- **/
-public interface NumInvoiceMapper extends BaseMapper<NumInvoice> {
-
-    /**
-     * 分页查询列表
-     * @param page
-     * @param numInvoice
-     * @return
-     */
-    IPage<List<NumInvoice>> getNumInvoicePage(Page page, @Param("query") NumInvoice numInvoice);
-}

+ 0 - 13
src/main/java/com/jkcredit/invoice/mapper/RealChargeMapper.java

@@ -1,13 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.jkcredit.invoice.model.entity.RealCharge;
-
-/**
- * @description:
- * @author: xusonglin
- * @create: 2020/5/25 9:50
- * @version: V1.0
- **/
-public interface RealChargeMapper extends BaseMapper<RealCharge> {
-}

+ 0 - 27
src/main/java/com/jkcredit/invoice/mapper/RechargeMapper.java

@@ -1,27 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.Recharge;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 10:43
- * @version: V1.0
- **/
-public interface RechargeMapper extends BaseMapper<Recharge> {
-
-    /**
-     * 分页查询充值记录
-     * @param page
-     * @param invoice
-     * @return
-     */
-    IPage<List<Recharge>> getRechargesPage(Page page, @Param("query") Recharge invoice);
-
-}

+ 0 - 13
src/main/java/com/jkcredit/invoice/mapper/SearchInvoiceDataMapper.java

@@ -1,13 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.SearchInvoiceData;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface SearchInvoiceDataMapper extends BaseMapper<SearchInvoiceData> {
-    IPage<List<SearchInvoiceData>> getSearchInvoiceDataPage(Page page, @Param("query") SearchInvoiceData searchInvoiceData);
-}

+ 0 - 73
src/main/java/com/jkcredit/invoice/mapper/SearchInvoiceResultMapper.java

@@ -1,73 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.SearchInvoiceData;
-import com.jkcredit.invoice.model.entity.SearchInvoiceResult;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface SearchInvoiceResultMapper extends BaseMapper<SearchInvoiceResult> {
-
-    /**
-     * 分页查询
-     * @param page
-     * @param searchInvoiceResult
-     * @return
-     */
-    IPage<SearchInvoiceResult> getSearchInvoiceResultPage(Page page, @Param("query") SearchInvoiceResult searchInvoiceResult,@Param("batchNumber") String batchNumber);
-
-    /**
-     * 分页查询流水
-     * @param page
-     * @param id
-     * @return
-     */
-    IPage<List<SearchInvoiceResult>> getDailyBilling(Page page,@Param("userId") Integer id);
-
-    /**
-     * 根据交易id删除
-     * @param transactionId
-     */
-    void deleteByTransactionId(String transactionId);
-
-    /**
-     * 根据用户id 运单号查询列表
-     * @param userId
-     * @param waybillNum
-     * @return
-     */
-    List<SearchInvoiceResult> getInvoiceList(Integer userId,String waybillNum,String batchNumber,Long startTime,Long endTime, String taxPlayerCode);
-
-    /**
-     * 查询统计发票数据
-     * @param searchInvoiceResult
-     * @return
-     */
-    SearchInvoiceResult statisticsData(@Param("query") SearchInvoiceResult searchInvoiceResult,@Param("batchNumber") String batchNumber);
-
-    /**
-     * 根据transactionId查发票
-     * @param transactionId
-     * @return
-     */
-    List<SearchInvoiceResult> getNumInvoiceByTransactionId(String transactionId);
-
-    /**
-     * 根据发票代码 发票号码查询发票
-     * @param invoiceNum
-     * @param invoiceCode
-     * @return
-     */
-    List<SearchInvoiceResult> getInvoiceByInvoiceNum(String invoiceNum, String invoiceCode);
-
-    /**
-     * 根据条件获取发票及下载地址列表
-     * @param searchInvoiceResult
-     * @param batchNumber
-     * @return
-     */
-    List<SearchInvoiceResult> getInvoiceUrlList(@Param("query")SearchInvoiceResult searchInvoiceResult,@Param("batchNumber") String batchNumber);
-}

+ 0 - 7
src/main/java/com/jkcredit/invoice/mapper/SearchInvoiceResultTempMapper.java

@@ -1,7 +0,0 @@
-package com.jkcredit.invoice.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.jkcredit.invoice.model.entity.SearchInvoiceResultTemp;
-
-public interface SearchInvoiceResultTempMapper extends BaseMapper<SearchInvoiceResultTemp> {
-}

+ 19 - 0
src/main/java/com/jkcredit/invoice/mapper/calculateInfor/NoCarCalculateInforMapper.java

@@ -0,0 +1,19 @@
+package com.jkcredit.invoice.mapper.calculateInfor;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface NoCarCalculateInforMapper extends BaseMapper<NoCarCalculateInfor> {
+    IPage<List<NoCarCalculateInfor>> selectAllByPage(Page page, @Param("calculateInfor") NoCarCalculateInfor calculateInfor);
+
+    int insert(NoCarCalculateInfor record);
+
+    NoCarCalculateInfor selectByTradeId(String tradeId);
+}

+ 20 - 0
src/main/java/com/jkcredit/invoice/mapper/calculateInfor/SelfCarCalculateInforMapper.java

@@ -0,0 +1,20 @@
+package com.jkcredit.invoice.mapper.calculateInfor;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
+import com.jkcredit.invoice.model.entity.Calculate.SelfCarCalculateInfor;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface SelfCarCalculateInforMapper extends BaseMapper<SelfCarCalculateInfor> {
+    IPage<List<SelfCarCalculateInfor>> selectAllByPage(Page page, @Param("calculateInfor") SelfCarCalculateInfor calculateInfor);
+
+    int insert(SelfCarCalculateInfor record);
+
+    SelfCarCalculateInfor selectByEtcAndTime(SelfCarCalculateInfor selfCarCalculateInfor);
+}

+ 29 - 0
src/main/java/com/jkcredit/invoice/mapper/customer/CustomerCarRecMapper.java

@@ -0,0 +1,29 @@
+package com.jkcredit.invoice.mapper.customer;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CustomerCarRecMapper extends BaseMapper<CustomerCarRec> {
+    int deleteByPrimaryKey(String carNum);
+
+    int insert(CustomerCarRec record);
+
+    int insertSelective(CustomerCarRec record);
+
+    List<CustomerCarRec>  selectByCustName(String customerName);
+
+    CustomerCarRec selectByETC(String etcNum);
+    CustomerCarRec selectByCarNum(String carNum);
+    int updateByPrimaryKeySelective(CustomerCarRec record);
+
+    int updateByPrimaryKey(CustomerCarRec record);
+
+    IPage<List<CustomerCarRec>> selectAllByPage(Page page, @Param("query") CustomerCarRec customerCarRec);
+}

+ 2 - 2
src/main/java/com/jkcredit/invoice/mapper/CustomerMapper.java

@@ -1,9 +1,9 @@
-package com.jkcredit.invoice.mapper;
+package com.jkcredit.invoice.mapper.customer;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.Customer;
+import com.jkcredit.invoice.model.entity.customer.Customer;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 

+ 4 - 2
src/main/java/com/jkcredit/invoice/mapper/CustomerRecMapper.java

@@ -1,6 +1,6 @@
-package com.jkcredit.invoice.mapper;
+package com.jkcredit.invoice.mapper.customer;
 
-import com.jkcredit.invoice.model.entity.CustomerRec;
+import com.jkcredit.invoice.model.entity.customer.CustomerRec;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -18,6 +18,8 @@ public interface CustomerRecMapper {
     List<CustomerRec> selectByCustomerName(String customerName);
 
     CustomerRec selectByCustomerNameAndCompany(CustomerRec record);
+    CustomerRec selectByCustomerNameAndCompanyConcat(CustomerRec record);
+
     int updateByPrimaryKeySelective(CustomerRec record);
 
     int updateByPrimaryKey(CustomerRec record);

+ 2 - 2
src/main/java/com/jkcredit/invoice/mapper/RoleMapper.java

@@ -1,7 +1,7 @@
-package com.jkcredit.invoice.mapper;
+package com.jkcredit.invoice.mapper.user;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.jkcredit.invoice.model.entity.Role;
+import com.jkcredit.invoice.model.entity.user.Role;
 
 /**
  * @description:

+ 2 - 2
src/main/java/com/jkcredit/invoice/mapper/UserMapper.java

@@ -1,9 +1,9 @@
-package com.jkcredit.invoice.mapper;
+package com.jkcredit.invoice.mapper.user;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.jkcredit.invoice.model.entity.User;
+import com.jkcredit.invoice.model.entity.user.User;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;

+ 26 - 0
src/main/java/com/jkcredit/invoice/mapper/waybill/NoCarWaybillMapper.java

@@ -0,0 +1,26 @@
+package com.jkcredit.invoice.mapper.waybill;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface NoCarWaybillMapper extends BaseMapper<NoCarWayBill>{
+
+    IPage<List<NoCarWayBill>> selectAllByPage(Page page, @Param("noCarWayBill") NoCarWayBill noCarWayBill);
+
+    int insert(NoCarWayBill record);
+
+    int updateByPrimaryKey(NoCarWayBill record);
+
+    int updateByBillNum(NoCarWayBill record);
+
+    NoCarWayBill selectByBillNum(String wayBillNum);
+
+    List<NoCarWayBill> selectByHisFlagAndBillStatus(NoCarWayBill noCarWayBill);
+}

+ 22 - 0
src/main/java/com/jkcredit/invoice/mapper/waybill/SellCarTradeMapper.java

@@ -0,0 +1,22 @@
+package com.jkcredit.invoice.mapper.waybill;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.waybill.SelfCarTrade;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+@Repository
+public interface SellCarTradeMapper extends BaseMapper<SelfCarTrade> {
+    IPage<List<SelfCarTrade>> selectAllByPage(Page page, @Param("sellCarTrade") SelfCarTrade sellCarTrade);
+
+    int insert(SelfCarTrade record);
+
+    int updateByPrimaryKey(SelfCarTrade record);
+
+    int updateByTradeId(SelfCarTrade record);
+
+    SelfCarTrade selectByTradeId(String tradeId);
+}

+ 95 - 0
src/main/java/com/jkcredit/invoice/model/entity/Calculate/NoCarCalculateInfor.java

@@ -0,0 +1,95 @@
+package com.jkcredit.invoice.model.entity.Calculate;
+
+/**
+ * 无车计费信息
+ */
+public class NoCarCalculateInfor {
+    /**
+     * 计费id号
+     */
+    private Integer Id;
+    /**
+     *  交易Id
+     */
+    private String tradeId;
+
+    /**
+     * 客户号
+     */
+    private String customId;
+
+    /**
+     * 公司编号
+     */
+    private String companyNum;
+
+    /**
+     * 计费费用
+     */
+    private Long fee;
+    /**
+     * 计费时间
+     */
+    private String calculateTime;
+
+    /**
+     * 类型 1-无车 2-自有车 3-外协车
+     */
+    private Integer ctype;
+
+    public Integer getId() {
+        return Id;
+    }
+
+    public void setId(Integer id) {
+        Id = id;
+    }
+
+    public String getTradeId() {
+        return tradeId;
+    }
+
+    public void setTradeId(String tradeId) {
+        this.tradeId = tradeId;
+    }
+
+    public Long getFee() {
+        return fee;
+    }
+
+    public void setFee(Long fee) {
+        this.fee = fee;
+    }
+
+    public String getCalculateTime() {
+        return calculateTime;
+    }
+
+    public void setCalculateTime(String calculateTime) {
+        this.calculateTime = calculateTime;
+    }
+
+    public Integer getCtype() {
+        return ctype;
+    }
+
+    public void setCtype(Integer ctype) {
+        this.ctype = ctype;
+    }
+
+    public String getCustomId() {
+        return customId;
+    }
+
+    public void setCustomId(String customId) {
+        this.customId = customId;
+    }
+
+    public String getCompanyNum() {
+        return companyNum;
+    }
+
+    public void setCompanyNum(String companyNum) {
+        this.companyNum = companyNum;
+    }
+}

+ 69 - 0
src/main/java/com/jkcredit/invoice/model/entity/Calculate/SelfCarCalculateInfor.java

@@ -0,0 +1,69 @@
+package com.jkcredit.invoice.model.entity.Calculate;
+
+/**
+ * 自有车计费
+ */
+public class SelfCarCalculateInfor {
+    /**
+     * 客户号
+     */
+    private String customId;
+
+    /**
+     * 公司编号
+     */
+    private String companyNum;
+    /**
+     * etc卡号
+     */
+    private String etcNum;
+    /**
+     * 计费费用
+     */
+    private Long fee;
+
+    /**
+     * 计费年月
+     */
+    private String calTime;
+
+    public String getCustomId() {
+        return customId;
+    }
+
+    public void setCustomId(String customId) {
+        this.customId = customId;
+    }
+
+    public String getCompanyNum() {
+        return companyNum;
+    }
+
+    public void setCompanyNum(String companyNum) {
+        this.companyNum = companyNum;
+    }
+
+    public String getEtcNum() {
+        return etcNum;
+    }
+
+    public void setEtcNum(String etcNum) {
+        this.etcNum = etcNum;
+    }
+
+    public Long getFee() {
+        return fee;
+    }
+
+    public void setFee(Long fee) {
+        this.fee = fee;
+    }
+
+    public String getCalTime() {
+        return calTime;
+    }
+
+    public void setCalTime(String calTime) {
+        this.calTime = calTime;
+    }
+}

+ 13 - 2
src/main/java/com/jkcredit/invoice/model/entity/Customer.java

@@ -1,10 +1,13 @@
-package com.jkcredit.invoice.model.entity;
+package com.jkcredit.invoice.model.entity.customer;
 
 import java.util.Date;
 
 public class Customer {
     private int id;
-
+    /**
+     * etc收费费用
+     */
+    private long fee;
     private String customerName;
 
     private String invoiceTime;
@@ -119,6 +122,14 @@ public class Customer {
         return company;
     }
 
+    public long getFee() {
+        return fee;
+    }
+
+    public void setFee(long fee) {
+        this.fee = fee;
+    }
+
     public void setCompany(String company) {
         this.company = company == null ? null : company.trim();
     }

+ 12 - 2
src/main/java/com/jkcredit/invoice/model/entity/CustomerCarRec.java

@@ -1,4 +1,4 @@
-package com.jkcredit.invoice.model.entity;
+package com.jkcredit.invoice.model.entity.customer;
 public class CustomerCarRec {
     private String customerName;
 
@@ -18,12 +18,14 @@ public class CustomerCarRec {
 
     private String failTime;
     /**
-     * 0-备案失败 1-备案成功
+     * 0-备案失败 1-备案成功 2-解绑
      */
     private Integer recStatus;
 
     private String failReason;
 
+    private String validateCode;
+
     public String getCustomerName() {
         return customerName;
     }
@@ -111,4 +113,12 @@ public class CustomerCarRec {
     public void setFailReason(String failReason) {
         this.failReason = failReason == null ? null : failReason.trim();
     }
+
+    public String getValidateCode() {
+        return validateCode;
+    }
+
+    public void setValidateCode(String validateCode) {
+        this.validateCode = validateCode;
+    }
 }

+ 157 - 6
src/main/java/com/jkcredit/invoice/model/entity/CustomerRec.java

@@ -1,32 +1,81 @@
-package com.jkcredit.invoice.model.entity;
-
-import java.util.Date;
-
+package com.jkcredit.invoice.model.entity.customer;
+/**
+ * 客户备案信息
+ */
 public class CustomerRec {
     private Integer id;
-
+    /**
+     * 客户名称
+     */
     public String customerName;
 
+    /**
+     * 紧急联系人
+     */
     private String companyLeader;
 
+    /**
+     * 紧急联系人电话
+     */
     private String companyLeaderPhone;
 
+    /**
+     * 公司名称
+     */
     private String companyName;
 
+    /**
+     * 公司税号
+     */
     private String companyReferencenum;
 
+    /**
+     * 公司开户行
+     */
     private String companyOpenbank;
 
+    /**
+     * 公司开户行账号
+     */
     private String companyOpenbankAcc;
 
+    /**
+     * 公司地址
+     */
     private String companyAdress;
 
+    /**
+     * 公司电话
+     */
     private String companyPhone;
 
+    /**
+     * 2-自营平台 3-合作商户
+     */
+    private Integer companyType;
+    /**
+     * 1-快递
+     2-速运
+     3-货运代理
+     4-普通货运
+     5-专线运输
+     6-其他
+     * 运营范围
+     */
+    private Integer operatingRangeType;
+
+    /**
+     * 企业编号注册后返回
+     */
+    private String companyNum;
+
+
     private String createtime;
 
     private String companyBelongName;
-
+    /**
+     * 2-失败 1-成功
+     */
     private Integer recStatus;
 
     private Integer interType; //0-接口 1-平台
@@ -36,6 +85,36 @@ public class CustomerRec {
      */
     private String bussinessType;
 
+    /*协议相关字段*/
+
+    /**
+     * 服务开始时间
+     */
+    private String serviceStartTime;
+
+    /**
+     * 服务结束时间
+     */
+    private String serviceEndTime;
+
+    /**
+     * 协议类型
+     */
+    private Integer serviceType;
+    /**
+     * 协议文件名
+     */
+    private String contractFileName;
+    /**
+     * 协议base64编码
+     */
+    private String base64Str;
+
+    /**
+     * 1-协议已上传 2-协议未上传
+     */
+    private Integer contractSuc =2;
+
     public Integer getId() {
         return id;
     }
@@ -155,4 +234,76 @@ public class CustomerRec {
     public void setBussinessType(String bussinessType) {
         this.bussinessType = bussinessType;
     }
+
+    public Integer getCompanyType() {
+        return companyType;
+    }
+
+    public void setCompanyType(Integer companyType) {
+        this.companyType = companyType;
+    }
+
+    public Integer getOperatingRangeType() {
+        return operatingRangeType;
+    }
+
+    public void setOperatingRangeType(Integer operatingRangeType) {
+        this.operatingRangeType = operatingRangeType;
+    }
+
+    public String getCompanyNum() {
+        return companyNum;
+    }
+
+    public void setCompanyNum(String companyNum) {
+        this.companyNum = companyNum;
+    }
+
+    public String getServiceStartTime() {
+        return serviceStartTime;
+    }
+
+    public void setServiceStartTime(String serviceStartTime) {
+        this.serviceStartTime = serviceStartTime;
+    }
+
+    public String getServiceEndTime() {
+        return serviceEndTime;
+    }
+
+    public void setServiceEndTime(String serviceEndTime) {
+        this.serviceEndTime = serviceEndTime;
+    }
+
+    public Integer getServiceType() {
+        return serviceType;
+    }
+
+    public void setServiceType(Integer serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    public String getContractFileName() {
+        return contractFileName;
+    }
+
+    public void setContractFileName(String contractFileName) {
+        this.contractFileName = contractFileName;
+    }
+
+    public String getBase64Str() {
+        return base64Str;
+    }
+
+    public void setBase64Str(String base64Str) {
+        this.base64Str = base64Str;
+    }
+
+    public Integer getContractSuc() {
+        return contractSuc;
+    }
+
+    public void setContractSuc(Integer contractSuc) {
+        this.contractSuc = contractSuc;
+    }
 }

+ 325 - 0
src/main/java/com/jkcredit/invoice/model/entity/invoice/BillInvoice.java

@@ -0,0 +1,325 @@
+package com.jkcredit.invoice.model.entity.invoice;
+
+/**
+ * 运单发票
+ */
+public class BillInvoice {
+    private Integer id;
+    /**
+     * 发票号码
+     */
+    private String invoiceNum;
+    /**
+     * 发票代码
+     */
+    private String invoiceCode;
+    /**
+     *开票时间
+     */
+    private String invoiceMakeTime;
+    /**
+     *发票url
+     */
+    private String invoiceUrl;
+    /**
+     *发票板式文件url
+     */
+    private String invoiceHtmlUrl;
+    /**
+     *入口收费站
+     */
+    private String enStation;
+    /**
+     *出口收费站
+     */
+    private String exStation;
+    /**
+     *交易时间
+     */
+    private String exTime;
+    /**
+     *交易金额
+     */
+    private long fee;
+    /**
+     *税额(可抵扣金额)
+     */
+    private long totalTaxAmount;
+    /**
+     *车牌号
+     */
+    private String plateNum;
+    /**
+     * 车型 见附录8.3
+     */
+    private Integer vehicleType;
+    /**
+     * 销方名称
+     */
+    private String sellerName;
+    /**
+     * 销方税号
+     */
+    private String sellerTaxpayerCode;
+    /**
+     * 运单编号
+     */
+    private String waybillNum;
+    /**
+     * 运单状态  未结束	1
+                开票中	2
+              开票完成	3
+             超时作废	4
+     */
+    private Integer waybillStatus;
+    /**
+     * 运单开始时间
+     */
+    private String waybillStartTime;
+    /**
+     * 运单结束时间
+     */
+    private String waybillEndTime;
+    /**
+     * 价税合计
+     */
+    private long totalAmount;
+    /**
+     * 税率
+     */
+    private double taxRate;
+    /**
+     * 发票种类
+     */
+    private String invoiceType;
+    /**
+     * 金额
+     */
+    private long amount;
+    /**
+     * 交易ID
+     */
+    private String transactionId;
+    /**
+     * 交易匹配时间
+     */
+    private String tradeMatchTime;
+    /**
+     * 购方名称
+     */
+    private String buyerName;
+    /**
+     * 购方税号
+     */
+    private String buyerTaxpayerCode;
+
+
+
+    public String getInvoiceNum() {
+        return invoiceNum;
+    }
+
+    public void setInvoiceNum(String invoiceNum) {
+        this.invoiceNum = invoiceNum;
+    }
+
+    public String getInvoiceCode() {
+        return invoiceCode;
+    }
+
+    public void setInvoiceCode(String invoiceCode) {
+        this.invoiceCode = invoiceCode;
+    }
+
+    public String getInvoiceMakeTime() {
+        return invoiceMakeTime;
+    }
+
+    public void setInvoiceMakeTime(String invoiceMakeTime) {
+        this.invoiceMakeTime = invoiceMakeTime;
+    }
+
+    public String getInvoiceUrl() {
+        return invoiceUrl;
+    }
+
+    public void setInvoiceUrl(String invoiceUrl) {
+        this.invoiceUrl = invoiceUrl;
+    }
+
+    public String getInvoiceHtmlUrl() {
+        return invoiceHtmlUrl;
+    }
+
+    public void setInvoiceHtmlUrl(String invoiceHtmlUrl) {
+        this.invoiceHtmlUrl = invoiceHtmlUrl;
+    }
+
+    public String getEnStation() {
+        return enStation;
+    }
+
+    public void setEnStation(String enStation) {
+        this.enStation = enStation;
+    }
+
+    public String getExStation() {
+        return exStation;
+    }
+
+    public void setExStation(String exStation) {
+        this.exStation = exStation;
+    }
+
+    public String getExTime() {
+        return exTime;
+    }
+
+    public void setExTime(String exTime) {
+        this.exTime = exTime;
+    }
+
+    public long getFee() {
+        return fee;
+    }
+
+    public void setFee(long fee) {
+        this.fee = fee;
+    }
+
+    public long getTotalTaxAmount() {
+        return totalTaxAmount;
+    }
+
+    public void setTotalTaxAmount(long totalTaxAmount) {
+        this.totalTaxAmount = totalTaxAmount;
+    }
+
+    public String getPlateNum() {
+        return plateNum;
+    }
+
+    public void setPlateNum(String plateNum) {
+        this.plateNum = plateNum;
+    }
+
+    public Integer getVehicleType() {
+        return vehicleType;
+    }
+
+    public void setVehicleType(Integer vehicleType) {
+        this.vehicleType = vehicleType;
+    }
+
+    public String getSellerName() {
+        return sellerName;
+    }
+
+    public void setSellerName(String sellerName) {
+        this.sellerName = sellerName;
+    }
+
+    public String getSellerTaxpayerCode() {
+        return sellerTaxpayerCode;
+    }
+
+    public void setSellerTaxpayerCode(String sellerTaxpayerCode) {
+        this.sellerTaxpayerCode = sellerTaxpayerCode;
+    }
+
+    public String getWaybillNum() {
+        return waybillNum;
+    }
+
+    public void setWaybillNum(String waybillNum) {
+        this.waybillNum = waybillNum;
+    }
+
+    public Integer getWaybillStatus() {
+        return waybillStatus;
+    }
+
+    public void setWaybillStatus(Integer waybillStatus) {
+        this.waybillStatus = waybillStatus;
+    }
+
+    public String getWaybillStartTime() {
+        return waybillStartTime;
+    }
+
+    public void setWaybillStartTime(String waybillStartTime) {
+        this.waybillStartTime = waybillStartTime;
+    }
+
+    public String getWaybillEndTime() {
+        return waybillEndTime;
+    }
+
+    public void setWaybillEndTime(String waybillEndTime) {
+        this.waybillEndTime = waybillEndTime;
+    }
+
+    public long getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(long totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public double getTaxRate() {
+        return taxRate;
+    }
+
+    public void setTaxRate(double taxRate) {
+        this.taxRate = taxRate;
+    }
+
+    public String getInvoiceType() {
+        return invoiceType;
+    }
+
+    public void setInvoiceType(String invoiceType) {
+        this.invoiceType = invoiceType;
+    }
+
+    public long getAmount() {
+        return amount;
+    }
+
+    public void setAmount(long amount) {
+        this.amount = amount;
+    }
+
+    public String getTransactionId() {
+        return transactionId;
+    }
+
+    public void setTransactionId(String transactionId) {
+        this.transactionId = transactionId;
+    }
+
+    public String getTradeMatchTime() {
+        return tradeMatchTime;
+    }
+
+    public void setTradeMatchTime(String tradeMatchTime) {
+        this.tradeMatchTime = tradeMatchTime;
+    }
+
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
+    }
+
+    public String getBuyerTaxpayerCode() {
+        return buyerTaxpayerCode;
+    }
+
+    public void setBuyerTaxpayerCode(String buyerTaxpayerCode) {
+        this.buyerTaxpayerCode = buyerTaxpayerCode;
+    }
+}

+ 130 - 0
src/main/java/com/jkcredit/invoice/model/entity/invoice/SelfCarAppl.java

@@ -0,0 +1,130 @@
+package com.jkcredit.invoice.model.entity.invoice;
+
+/**
+ * 自有车申请记录
+ */
+public class SelfCarAppl {
+    private Integer id;
+    /**
+     * 客户号
+     */
+    private String customId;
+
+    /**
+     * 公司编号
+     */
+    private String companyNum;
+
+    /**
+     * etc卡号
+     */
+    private String cardId;
+    /**
+     * 申请Id
+     */
+   private String applId;
+    /**
+     * 发票数量
+     */
+   private Integer invoiceCount;
+
+    /**
+     * 发票金额
+     */
+   private long invoiceAmount;
+
+    /**
+     * 发票税额
+     */
+   private long invoiceTaxAmount;
+
+    /**
+     * 申请时间
+     */
+   private String applTime;
+
+    /**
+     * 是否已经取票 0 -未取票 1-已经取票
+     * @return
+     */
+    private Integer voiceFlag =0;
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getCompanyNum() {
+        return companyNum;
+    }
+
+    public void setCompanyNum(String companyNum) {
+        this.companyNum = companyNum;
+    }
+
+    public String getCardId() {
+        return cardId;
+    }
+
+    public void setCardId(String cardId) {
+        this.cardId = cardId;
+    }
+
+    public String getApplId() {
+        return applId;
+    }
+
+    public void setApplId(String applId) {
+        this.applId = applId;
+    }
+
+    public Integer getInvoiceCount() {
+        return invoiceCount;
+    }
+
+    public void setInvoiceCount(Integer invoiceCount) {
+        this.invoiceCount = invoiceCount;
+    }
+
+    public long getInvoiceAmount() {
+        return invoiceAmount;
+    }
+
+    public void setInvoiceAmount(long invoiceAmount) {
+        this.invoiceAmount = invoiceAmount;
+    }
+
+    public long getInvoiceTaxAmount() {
+        return invoiceTaxAmount;
+    }
+
+    public void setInvoiceTaxAmount(long invoiceTaxAmount) {
+        this.invoiceTaxAmount = invoiceTaxAmount;
+    }
+
+    public String getApplTime() {
+        return applTime;
+    }
+
+    public void setApplTime(String applTime) {
+        this.applTime = applTime;
+    }
+
+    public String getCustomId() {
+        return customId;
+    }
+
+    public void setCustomId(String customId) {
+        this.customId = customId;
+    }
+
+    public Integer getVoiceFlag() {
+        return voiceFlag;
+    }
+
+    public void setVoiceFlag(Integer voiceFlag) {
+        this.voiceFlag = voiceFlag;
+    }
+}

+ 282 - 0
src/main/java/com/jkcredit/invoice/model/entity/invoice/SelfCarInvoice.java

@@ -0,0 +1,282 @@
+package com.jkcredit.invoice.model.entity.invoice;
+
+/**
+ * 自有车发票
+ */
+public class SelfCarInvoice {
+    private Integer id;
+    /**
+     * etc卡号
+     */
+    private String cardId;
+    /**
+     * 发票号码
+     */
+    private String invoiceNum;
+    /**
+     * 发票代码
+     */
+    private String invoiceCode;
+    /**
+     *开票时间
+     */
+    private String invoiceMakeTime;
+    /**
+     *发票url
+     */
+    private String invoiceUrl;
+    /**
+     *发票板式文件url
+     */
+    private String invoiceHtmlUrl;
+    /**
+     *入口收费站
+     */
+    private String enStation;
+    /**
+     *出口收费站
+     */
+    private String exStation;
+    /**
+     *交易时间
+     */
+    private String exTime;
+    /**
+     *交易金额
+     */
+    private long fee;
+    /**
+     *税额(可抵扣金额)
+     */
+    private long totalTaxAmount;
+    /**
+     *车牌号
+     */
+    private String plateNum;
+    /**
+     * 车型 见附录8.3
+     */
+    private Integer vehicleType;
+    /**
+     * 销方名称
+     */
+    private String sellerName;
+    /**
+     * 销方税号
+     */
+    private String sellerTaxpayerCode;
+
+    /**
+     * 价税合计
+     */
+    private long totalAmount;
+    /**
+     * 税率
+     */
+    private double taxRate;
+    /**
+     * 发票种类
+     */
+    private String invoiceType;
+    /**
+     * 金额
+     */
+    private long amount;
+    /**
+     * 交易ID
+     */
+    private String tradeId;
+
+    /**
+     * 购方名称
+     */
+    private String buyerName;
+    /**
+     * 购方税号
+     */
+    private String buyerTaxpayerCode;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getCardId() {
+        return cardId;
+    }
+
+    public void setCardId(String cardId) {
+        this.cardId = cardId;
+    }
+
+    public String getInvoiceNum() {
+        return invoiceNum;
+    }
+
+    public void setInvoiceNum(String invoiceNum) {
+        this.invoiceNum = invoiceNum;
+    }
+
+    public String getInvoiceCode() {
+        return invoiceCode;
+    }
+
+    public void setInvoiceCode(String invoiceCode) {
+        this.invoiceCode = invoiceCode;
+    }
+
+    public String getInvoiceMakeTime() {
+        return invoiceMakeTime;
+    }
+
+    public void setInvoiceMakeTime(String invoiceMakeTime) {
+        this.invoiceMakeTime = invoiceMakeTime;
+    }
+
+    public String getInvoiceUrl() {
+        return invoiceUrl;
+    }
+
+    public void setInvoiceUrl(String invoiceUrl) {
+        this.invoiceUrl = invoiceUrl;
+    }
+
+    public String getInvoiceHtmlUrl() {
+        return invoiceHtmlUrl;
+    }
+
+    public void setInvoiceHtmlUrl(String invoiceHtmlUrl) {
+        this.invoiceHtmlUrl = invoiceHtmlUrl;
+    }
+
+    public String getEnStation() {
+        return enStation;
+    }
+
+    public void setEnStation(String enStation) {
+        this.enStation = enStation;
+    }
+
+    public String getExStation() {
+        return exStation;
+    }
+
+    public void setExStation(String exStation) {
+        this.exStation = exStation;
+    }
+
+    public String getExTime() {
+        return exTime;
+    }
+
+    public void setExTime(String exTime) {
+        this.exTime = exTime;
+    }
+
+    public long getFee() {
+        return fee;
+    }
+
+    public void setFee(long fee) {
+        this.fee = fee;
+    }
+
+    public long getTotalTaxAmount() {
+        return totalTaxAmount;
+    }
+
+    public void setTotalTaxAmount(long totalTaxAmount) {
+        this.totalTaxAmount = totalTaxAmount;
+    }
+
+    public String getPlateNum() {
+        return plateNum;
+    }
+
+    public void setPlateNum(String plateNum) {
+        this.plateNum = plateNum;
+    }
+
+    public Integer getVehicleType() {
+        return vehicleType;
+    }
+
+    public void setVehicleType(Integer vehicleType) {
+        this.vehicleType = vehicleType;
+    }
+
+    public String getSellerName() {
+        return sellerName;
+    }
+
+    public void setSellerName(String sellerName) {
+        this.sellerName = sellerName;
+    }
+
+    public String getSellerTaxpayerCode() {
+        return sellerTaxpayerCode;
+    }
+
+    public void setSellerTaxpayerCode(String sellerTaxpayerCode) {
+        this.sellerTaxpayerCode = sellerTaxpayerCode;
+    }
+
+    public long getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(long totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public double getTaxRate() {
+        return taxRate;
+    }
+
+    public void setTaxRate(double taxRate) {
+        this.taxRate = taxRate;
+    }
+
+    public String getInvoiceType() {
+        return invoiceType;
+    }
+
+    public void setInvoiceType(String invoiceType) {
+        this.invoiceType = invoiceType;
+    }
+
+    public long getAmount() {
+        return amount;
+    }
+
+    public void setAmount(long amount) {
+        this.amount = amount;
+    }
+
+    public String getTradeId() {
+        return tradeId;
+    }
+
+    public void setTradeId(String tradeId) {
+        this.tradeId = tradeId;
+    }
+
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
+    }
+
+    public String getBuyerTaxpayerCode() {
+        return buyerTaxpayerCode;
+    }
+
+    public void setBuyerTaxpayerCode(String buyerTaxpayerCode) {
+        this.buyerTaxpayerCode = buyerTaxpayerCode;
+    }
+}

+ 1 - 1
src/main/java/com/jkcredit/invoice/model/entity/Role.java

@@ -1,4 +1,4 @@
-package com.jkcredit.invoice.model.entity;
+package com.jkcredit.invoice.model.entity.user;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;

+ 1 - 1
src/main/java/com/jkcredit/invoice/model/entity/User.java

@@ -1,4 +1,4 @@
-package com.jkcredit.invoice.model.entity;
+package com.jkcredit.invoice.model.entity.user;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;

+ 290 - 0
src/main/java/com/jkcredit/invoice/model/entity/waybill/NoCarWayBill.java

@@ -0,0 +1,290 @@
+package com.jkcredit.invoice.model.entity.waybill;
+
+/**
+ * 无车实体类
+ */
+public class NoCarWayBill {
+    /**
+     * id
+     */
+    private Long id;
+    /**
+     * 客户名称
+     */
+    public String customerName;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+
+    /**
+     * 运单编号
+     */
+    private String billNum;
+
+    /**
+     * 车牌号
+     */
+    private String plateNum;
+
+    /**
+     * 车辆颜色
+     */
+    private String plateColor;
+
+    /**
+     * 运单开始时间
+     */
+    private String startTime;
+
+    /**
+     * 运单开始地址
+     */
+    private String sourceAddr;
+
+    /**
+     * 运单目的地址
+     */
+    private String destAddr;
+
+    /**
+     * 运单预计完成时间
+     */
+    private String predictEndTime;
+
+    /**
+     * 运单费用 分
+     */
+    private Long fee;
+
+    /**
+     * 发票抬头类型 1-默认发票抬头 2-自定义发票抬头
+     */
+    private Integer titleType;
+
+    /**
+     * 税号
+     */
+    private String taxplayerCode;
+
+    /**
+     * 接口开始时间
+     */
+    private String intfaceStartTime;
+
+    /**
+     * 接口结束时间
+     */
+    private String InterfaceEndTime;
+
+    /**
+     * 运单转态 -2-运单超时 -1-指令开始 0-指令结束   1-开票中 2-作废 3-开票完成
+     */
+    private int billwayStatus;
+
+    /**
+     * 运单类型 0-实时运单 1-历史运单
+     */
+    private int hisFlag = 0;
+
+    /**
+     * 行云公司编号
+     */
+    private String companyNum;
+
+    /**
+     * 公司地址
+     */
+    private String companyAdress;
+
+    /**
+     * 开户行
+     */
+    private String companyBank;
+
+    /**
+     * 开户行账号
+     */
+    private String companyBankAcc;
+
+    /**
+     * 单位电话
+     */
+    private String companyTel;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCustomerName() {
+        return customerName;
+    }
+
+    public void setCustomerName(String customerName) {
+        this.customerName = customerName;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public String getBillNum() {
+        return billNum;
+    }
+
+    public void setBillNum(String billNum) {
+        this.billNum = billNum;
+    }
+
+    public String getPlateNum() {
+        return plateNum;
+    }
+
+    public void setPlateNum(String plateNum) {
+        this.plateNum = plateNum;
+    }
+
+    public String getPlateColor() {
+        return plateColor;
+    }
+
+    public void setPlateColor(String plateColor) {
+        this.plateColor = plateColor;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getSourceAddr() {
+        return sourceAddr;
+    }
+
+    public void setSourceAddr(String sourceAddr) {
+        this.sourceAddr = sourceAddr;
+    }
+
+    public String getDestAddr() {
+        return destAddr;
+    }
+
+    public void setDestAddr(String destAddr) {
+        this.destAddr = destAddr;
+    }
+
+    public String getPredictEndTime() {
+        return predictEndTime;
+    }
+
+    public void setPredictEndTime(String predictEndTime) {
+        this.predictEndTime = predictEndTime;
+    }
+
+    public Long getFee() {
+        return fee;
+    }
+
+    public void setFee(Long fee) {
+        this.fee = fee;
+    }
+
+    public Integer getTitleType() {
+        return titleType;
+    }
+
+    public void setTitleType(Integer titleType) {
+        this.titleType = titleType;
+    }
+
+    public String getTaxplayerCode() {
+        return taxplayerCode;
+    }
+
+    public void setTaxplayerCode(String taxplayerCode) {
+        this.taxplayerCode = taxplayerCode;
+    }
+
+    public String getIntfaceStartTime() {
+        return intfaceStartTime;
+    }
+
+    public void setIntfaceStartTime(String intfaceStartTime) {
+        this.intfaceStartTime = intfaceStartTime;
+    }
+
+    public String getInterfaceEndTime() {
+        return InterfaceEndTime;
+    }
+
+    public void setInterfaceEndTime(String interfaceEndTime) {
+        InterfaceEndTime = interfaceEndTime;
+    }
+
+    public int getBillwayStatus() {
+        return billwayStatus;
+    }
+
+    public void setBillwayStatus(int billwayStatus) {
+        this.billwayStatus = billwayStatus;
+    }
+
+    public int getHisFlag() {
+        return hisFlag;
+    }
+
+    public void setHisFlag(int hisFlag) {
+        this.hisFlag = hisFlag;
+    }
+
+    public String getCompanyNum() {
+        return companyNum;
+    }
+
+    public void setCompanyNum(String companyNum) {
+        this.companyNum = companyNum;
+    }
+
+    public String getCompanyAdress() {
+        return companyAdress;
+    }
+
+    public void setCompanyAdress(String companyAdress) {
+        this.companyAdress = companyAdress;
+    }
+
+    public String getCompanyBank() {
+        return companyBank;
+    }
+
+    public void setCompanyBank(String companyBank) {
+        this.companyBank = companyBank;
+    }
+
+    public String getCompanyBankAcc() {
+        return companyBankAcc;
+    }
+
+    public void setCompanyBankAcc(String companyBankAcc) {
+        this.companyBankAcc = companyBankAcc;
+    }
+
+    public String getCompanyTel() {
+        return companyTel;
+    }
+
+    public void setCompanyTel(String companyTel) {
+        this.companyTel = companyTel;
+    }
+}

+ 144 - 0
src/main/java/com/jkcredit/invoice/model/entity/waybill/SelfCarTrade.java

@@ -0,0 +1,144 @@
+package com.jkcredit.invoice.model.entity.waybill;
+
+/**
+ * 自有车交易
+ */
+public class SelfCarTrade {
+    private Integer id;
+    /**
+     * 客户号
+     */
+    private String customId;
+
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 公司编号
+     */
+    private String companyNum;
+
+    /**
+     * etc卡号
+     */
+    private String cardId;
+
+    /**
+     * 交易id
+     */
+    private String tradeId;
+
+    /**
+     * 交易时间
+     */
+    private String exTime;
+
+    /**
+     * 交易费用
+     */
+    private Long fee;
+
+    /**
+     * 交易状态 0-未开票 1-开票中 2-成功开票 3-取票成功
+     */
+    private Integer status;
+
+    /**
+     * 申请Id
+     */
+    private String applId;
+
+    /**
+     * 开票时间
+     */
+    private String aclTime;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getCustomId() {
+        return customId;
+    }
+
+    public void setCustomId(String customId) {
+        this.customId = customId;
+    }
+
+    public String getCompanyNum() {
+        return companyNum;
+    }
+
+    public void setCompanyNum(String companyNum) {
+        this.companyNum = companyNum;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public String getCardId() {
+        return cardId;
+    }
+
+    public void setCardId(String cardId) {
+        this.cardId = cardId;
+    }
+
+    public String getTradeId() {
+        return tradeId;
+    }
+
+    public void setTradeId(String tradeId) {
+        this.tradeId = tradeId;
+    }
+
+    public String getExTime() {
+        return exTime;
+    }
+
+    public void setExTime(String exTime) {
+        this.exTime = exTime;
+    }
+
+    public Long getFee() {
+        return fee;
+    }
+
+    public void setFee(Long fee) {
+        this.fee = fee;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getApplId() {
+        return applId;
+    }
+
+    public void setApplId(String applId) {
+        this.applId = applId;
+    }
+
+    public String getAclTime() {
+        return aclTime;
+    }
+
+    public void setAclTime(String aclTime) {
+        this.aclTime = aclTime;
+    }
+}

+ 0 - 131
src/main/java/com/jkcredit/invoice/model/vo/CarFreeCarrierBillVo.java

@@ -1,131 +0,0 @@
-package com.jkcredit.invoice.model.vo;
-
-import cn.afterturn.easypoi.excel.annotation.Excel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-31 10:24
- * @version: V1.0
- **/
-@Data
-public class CarFreeCarrierBillVo implements Serializable {
-
-    private static final long serialVersionUID = 4158547178363230855L;
-    /**
-     * 运单编号
-     */
-    @Excel(name = "运单编号")
-    @NotNull
-    @ApiModelProperty(value = "运单编号")
-    private String num;
-    /**
-     * 车牌号
-     */
-    @Excel(name = "车牌号码")
-    @ApiModelProperty(value = "车牌号码")
-    private String plateNumber;
-
-    /**
-     * 车牌颜色
-     */
-    @Excel(name = "车牌颜色")
-    @ApiModelProperty(value = "车牌颜色")
-    private String plateColor;
-
-    /**
-     * 运单开始时间
-     */
-    @Excel(name = "运单开始时间",format="yyyy-MM-dd HH:mm:ss",databaseFormat = "yyyy-MM-dd HH:mm:ss")
-    @ApiModelProperty(value = "运单开始时间")
-    private Date startTime;
-
-    /**
-     * 运单开始地址
-     */
-    @Excel(name = "运单开始地址")
-    @ApiModelProperty(value = "运单开始地址")
-    private String sourceAddr;
-
-    /**
-     * 运单目的地址
-     */
-    @Excel(name = "运单目的地址")
-    @ApiModelProperty(value = "运单目的地址")
-    private String destAddr;
-
-    /**
-     * 运单预计完成时间
-     */
-    @Excel(name = "运单预计完成时间",format="yyyy-MM-dd HH:mm:ss",databaseFormat = "yyyy-MM-dd HH:mm:ss")
-    @ApiModelProperty(value = "运单预计完成时间")
-    private Date endTime;
-
-    /**
-     * 运单费用
-     */
-    @Excel(name = "运单费用")
-    @ApiModelProperty(value = "运单费用")
-    private BigDecimal fee;
-
-    /**
-     * 发票抬头类型
-     */
-    @ApiModelProperty(value = "发票抬头类型")
-    private Integer titleType;
-
-    /**
-     * 税号
-     */
-    @Excel(name = "税号")
-    @ApiModelProperty(value = "税号")
-    private String taxPlayerCode;
-
-    /**
-     * 发票抬头名称
-     */
-    @ApiModelProperty(value = "发票抬头名称")
-    private String name;
-
-    /**
-     * 单位地址
-     */
-    @ApiModelProperty(value = "单位地址")
-    private String address;
-
-    /**
-     * 电话
-     */
-    @ApiModelProperty(value = "电话")
-    private String tel;
-
-    /**
-     * 开户行
-     */
-    @ApiModelProperty(value = "开户行")
-    private String bank;
-
-    /**
-     * 开户行账号
-     */
-    @ApiModelProperty(value = "开户行账号")
-    private String bankAccount;
-
-    /**
-     * 开票时长
-     */
-    @ApiModelProperty(value = "开票时长")
-    private Integer invoiceTime;
-
-    /**
-     * 是否自动开票标记
-     */
-    private Integer autoFlag;
-}

+ 0 - 39
src/main/java/com/jkcredit/invoice/producer/B2bChargeProducer.java

@@ -1,39 +0,0 @@
-package com.jkcredit.invoice.producer;
-
-import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.User;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.amqp.core.Message;
-import org.springframework.amqp.rabbit.core.RabbitTemplate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-20 08:58
- * @version: V1.0
- **/
-@Slf4j
-@Component
-public class B2bChargeProducer implements RabbitTemplate.ReturnCallback {
-
-    @Autowired
-    private RabbitTemplate rabbitTemplate;
-
-    public void send(User user) {
-        this.rabbitTemplate.setReturnCallback(this);
-        this.rabbitTemplate.setConfirmCallback((correlationData, ack, cause) -> {
-            if (!ack) {
-                log.info("消息发送失败:{},{}" , cause , correlationData.toString());
-            }
-        });
-        this.rabbitTemplate.convertAndSend(CommonConstants.B2B_CHARGE_EXCHANGE, "b2b_charge.*", user);
-    }
-
-    @Override
-    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
-//        System.out.println("sender return success" + message.toString() + "===" + replyText + "===" + exchange + "===" + routingKey);
-    }
-}
-

+ 0 - 38
src/main/java/com/jkcredit/invoice/producer/ChargeProducer.java

@@ -1,38 +0,0 @@
-package com.jkcredit.invoice.producer;
-
-import com.jkcredit.invoice.common.CommonConstants;
-import com.jkcredit.invoice.model.entity.User;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.amqp.core.Message;
-import org.springframework.amqp.rabbit.core.RabbitTemplate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-04 13:47
- * @version: V1.0
- **/
-@Slf4j
-//@Component
-public class ChargeProducer implements RabbitTemplate.ReturnCallback {
-
-    @Autowired
-    private RabbitTemplate rabbitTemplate;
-
-    public void send(User user) {
-        this.rabbitTemplate.setReturnCallback(this);
-        this.rabbitTemplate.setConfirmCallback((correlationData, ack, cause) -> {
-            if (!ack) {
-                log.info("消息发送失败:{},{}" , cause , correlationData.toString());
-            }
-        });
-        this.rabbitTemplate.convertAndSend(CommonConstants.CHARGE_EXCHANGE, "charge.*", user);
-    }
-
-    @Override
-    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
-//        System.out.println("sender return success" + message.toString() + "===" + replyText + "===" + exchange + "===" + routingKey);
-    }
-}

+ 0 - 34
src/main/java/com/jkcredit/invoice/service/B2bInvoiceApplyService.java

@@ -1,34 +0,0 @@
-package com.jkcredit.invoice.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.jkcredit.invoice.model.entity.B2bInvoiceApply;
-import com.jkcredit.invoice.model.entity.CardTrade;
-import com.jkcredit.invoice.util.RespR;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 13:44
- * @version: V1.0
- **/
-public interface B2bInvoiceApplyService extends IService<B2bInvoiceApply> {
-
-    /**
-     * 分页查询
-     * @param page
-     * @param b2bInvoiceApply
-     * @return
-     */
-    IPage getB2bInvoiceApplyPage(Page page, B2bInvoiceApply b2bInvoiceApply);
-
-    /**
-     * 批量申请开票
-     * @param cardTradeList
-     * @return
-     */
-    RespR<Boolean> invoiceApply(List<CardTrade> cardTradeList);
-}

+ 0 - 31
src/main/java/com/jkcredit/invoice/service/B2bInvoicePackageService.java

@@ -1,31 +0,0 @@
-package com.jkcredit.invoice.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.jkcredit.invoice.model.entity.B2bInvoicePackage;
-import com.jkcredit.invoice.util.RespR;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-21 10:18
- * @version: V1.0
- **/
-public interface B2bInvoicePackageService extends IService<B2bInvoicePackage> {
-
-    /**
-     * 分页查询
-     * @param page
-     * @param b2bInvoicePackage
-     * @return
-     */
-    IPage getB2bInvoicePackagePage(Page page, B2bInvoicePackage b2bInvoicePackage);
-
-    /**
-     * 根据月份调用打包接口
-     * @param b2bInvoicePackage
-     * @return
-     */
-    RespR getInvoicePackage(B2bInvoicePackage b2bInvoicePackage);
-}

+ 0 - 20
src/main/java/com/jkcredit/invoice/service/B2bInvoiceQueryService.java

@@ -1,20 +0,0 @@
-package com.jkcredit.invoice.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.jkcredit.invoice.model.entity.B2bInvoiceQuery;
-import com.jkcredit.invoice.util.RespR;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-06-19 16:56
- * @version: V1.0
- **/
-public interface B2bInvoiceQueryService extends IService<B2bInvoiceQuery> {
-
-    /**
-     * 通过接口查询已开发票信息
-     * @return
-     */
-    RespR queryInvoiceToInterface(B2bInvoiceQuery b2bInvoiceQuery);
-}

+ 0 - 34
src/main/java/com/jkcredit/invoice/service/BatchService.java

@@ -1,34 +0,0 @@
-package com.jkcredit.invoice.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.jkcredit.invoice.model.entity.Batch;
-import com.jkcredit.invoice.model.entity.User;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-05-30 13:53
- * @version: V1.0
- **/
-public interface BatchService extends IService<Batch> {
-
-    /**
-     * 批次分页列表
-     * @param page
-     * @param batch
-     * @return
-     */
-    IPage getBatchPage(Page page, Batch batch);
-
-    /**
-     * 创建批次
-     * @param id
-     * @param batchNumber
-     * @param type
-     * @param user
-     * @return
-     */
-    Boolean saveBatch(String id, String batchNumber, Integer type, User user);
-}

+ 0 - 22
src/main/java/com/jkcredit/invoice/service/BillEstimateResultService.java

@@ -1,22 +0,0 @@
-package com.jkcredit.invoice.service;
-
-import com.jkcredit.invoice.model.entity.BillEstimateResult;
-import com.jkcredit.invoice.util.RespR;
-
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-07-18 17:25
- * @version: V1.0
- **/
-public interface BillEstimateResultService {
-
-    /**
-     * 保存数据
-     * @param list
-     * @return
-     */
-    RespR save(List<BillEstimateResult> list);
-}

+ 0 - 31
src/main/java/com/jkcredit/invoice/service/BillEstimateService.java

@@ -1,31 +0,0 @@
-package com.jkcredit.invoice.service;
-
-import com.jkcredit.invoice.model.entity.BillEstimate;
-import com.jkcredit.invoice.model.entity.User;
-import com.jkcredit.invoice.util.RespR;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * @description:
- * @author: sunzhaoning
- * @create: 2019-07-19 13:51
- * @version: V1.0
- **/
-public interface BillEstimateService {
-
-    /**
-     * 导入和导出
-     * @param list
-     * @param user
-     * @return
-     */
-    RespR saveAndImport(List<BillEstimate> list, User user);
-
-    /**
-     * 下载
-     * @param response
-     */
-    void download(HttpServletResponse response);
-}

+ 19 - 0
src/main/java/com/jkcredit/invoice/service/CalculateInfor/NoCarCalculateInfoService.java

@@ -0,0 +1,19 @@
+package com.jkcredit.invoice.service.CalculateInfor;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
+import java.util.List;
+
+/**
+ * 无车计费服务
+ */
+public interface NoCarCalculateInfoService {
+    /**
+     * 查询所有计费服务接口
+     * @param page
+     * @param calculateInfor
+     * @return
+     */
+    IPage<List<NoCarCalculateInfor>> findByPageAndCalculateInfor(Page page, NoCarCalculateInfor calculateInfor);
+}

+ 0 - 0
src/main/java/com/jkcredit/invoice/service/CalculateInfor/SelfCarCalculateInfoService.java


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini