Forráskód Böngészése

阿里巴巴代码规约问题修改20230115

mashengyi 2 éve
szülő
commit
de48f8c668
33 módosított fájl, 328 hozzáadás és 1606 törlés
  1. 3 3
      src/main/java/com/jkcredit/invoice/SysInvoiceApplication.java
  2. 1 1
      src/main/java/com/jkcredit/invoice/config/SwaggerConfig.java
  3. 6 3
      src/main/java/com/jkcredit/invoice/controller/business/CustomerController.java
  4. 4 5
      src/main/java/com/jkcredit/invoice/controller/interserver/NoCarServiceController.java
  5. 9 9
      src/main/java/com/jkcredit/invoice/controller/interserver/SelfCarServiceController.java
  6. 3 3
      src/main/java/com/jkcredit/invoice/credit/InterfaceCheckServer.java
  7. 2 2
      src/main/java/com/jkcredit/invoice/credit/SimpleCORSFilter.java
  8. 3 2
      src/main/java/com/jkcredit/invoice/credit/interserver/NoCarInterServiceImpl.java
  9. 3 3
      src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterService.java
  10. 9 9
      src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterServiceImpl.java
  11. 5 5
      src/main/java/com/jkcredit/invoice/mapper/customer/CustomerCarRecMapper.java
  12. 3 3
      src/main/java/com/jkcredit/invoice/model/entity/calculate/MounthAcc.java
  13. 4 4
      src/main/java/com/jkcredit/invoice/model/entity/calculate/NoCarCalculateInfor.java
  14. 3 3
      src/main/java/com/jkcredit/invoice/service/calculateinfor/impl/SelfcarCalculateInfoServiceImpl.java
  15. 3 3
      src/main/java/com/jkcredit/invoice/service/lowerservice/NoCarService.java
  16. 23 21
      src/main/java/com/jkcredit/invoice/service/lowerservice/impl/NoCarServiceImpl.java
  17. 82 86
      src/main/java/com/jkcredit/invoice/service/lowerservice/impl/SelfCarServiceLImpl.java
  18. 3 2
      src/main/java/com/jkcredit/invoice/service/nocar/impl/NoCarBillWayServiceImpl.java
  19. 21 20
      src/main/java/com/jkcredit/invoice/service/nocar/impl/NoCarRecServiceImpl.java
  20. 1 1
      src/main/java/com/jkcredit/invoice/service/selfcar/impl/SelfCarServiceImpl.java
  21. 16 16
      src/main/java/com/jkcredit/invoice/service/upService/SelfCarInterface.java
  22. 56 56
      src/main/java/com/jkcredit/invoice/service/upService/impl/SelfCarInterfaceImpl.java
  23. 5 4
      src/main/java/com/jkcredit/invoice/util/Base64Util.java
  24. 5 4
      src/main/java/com/jkcredit/invoice/util/Base64Utils.java
  25. 5 5
      src/main/java/com/jkcredit/invoice/util/DateUtil.java
  26. 18 20
      src/main/java/com/jkcredit/invoice/util/LogUtils.java
  27. 5 5
      src/main/java/com/jkcredit/invoice/util/PlateCheckUtil.java
  28. 0 202
      src/main/java/com/jkcredit/invoice/util/QueryDemoScm_Test.java
  29. 0 270
      src/main/java/com/jkcredit/invoice/util/QueryDemo_3rd.java
  30. 13 10
      src/main/java/com/jkcredit/invoice/util/QueryDemo_Test.java
  31. 0 788
      src/main/java/com/jkcredit/invoice/util/QueryDemo_Test1.java
  32. 9 33
      src/main/java/com/jkcredit/invoice/util/WordUtil.java
  33. 5 5
      src/main/resources/mapper/customer/CustomerCarRecMapper.xml

+ 3 - 3
src/main/java/com/jkcredit/invoice/SysInvoiceApplication.java

@@ -1,6 +1,6 @@
 package com.jkcredit.invoice;
 
-import com.jkcredit.invoice.credit.SimpleCORSFilter;
+import com.jkcredit.invoice.credit.SimpleCoreFilter;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.web.server.ConfigurableWebServerFactory;
@@ -27,8 +27,8 @@ public class SysInvoiceApplication {
      * @return
      */
     @Bean
-    public SimpleCORSFilter simpleCORSFilter(){
-        return new SimpleCORSFilter();
+    public SimpleCoreFilter simpleCoreFilter(){
+        return new SimpleCoreFilter();
     }
     @Bean
     public WebServerFactoryCustomizer<ConfigurableWebServerFactory> webServerFactoryWebServerFactoryCustomizer(){

+ 1 - 1
src/main/java/com/jkcredit/invoice/config/SwaggerConfig.java

@@ -20,7 +20,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
 public class SwaggerConfig {
 
     @Bean
-    public Docket ProductApi() {
+    public Docket productApi() {
         return new Docket(DocumentationType.SWAGGER_2)
                 .genericModelSubstitutes(DeferredResult.class)
                 .useDefaultResponseMessages(false)

+ 6 - 3
src/main/java/com/jkcredit/invoice/controller/business/CustomerController.java

@@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.annotation.LoginRequired;
 import com.jkcredit.invoice.annotation.annotationdes.AuthenticationInterceptor;
-import com.jkcredit.invoice.model.entity.customer.Customer;
 import com.jkcredit.invoice.model.entity.CustomerRecharge;
+import com.jkcredit.invoice.model.entity.customer.Customer;
 import com.jkcredit.invoice.model.entity.customer.CustomerEtcChangeInfo;
 import com.jkcredit.invoice.model.entity.customer.CustomerRec;
 import com.jkcredit.invoice.model.entity.manager.Param;
@@ -32,7 +32,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.net.URLEncoder;
 import java.util.*;
 
@@ -368,7 +371,7 @@ public class CustomerController {
         try{
             response.setHeader("Content-Disposition", "attachment;filename="+ URLEncoder.encode(fileName, "UTF-8"));
             outputStream = response.getOutputStream();
-            WordUtil.ExportSimpleWord(dataMap,"/static/templates/excel/",outputStream);
+            WordUtil.exportSimpleWord(dataMap,"/static/templates/excel/",outputStream);
             response.flushBuffer();
         }catch (Exception e){
             log.error("文档下载CustomerController.generateWord文档下载失败{}",e.getMessage());

+ 4 - 5
src/main/java/com/jkcredit/invoice/controller/interserver/NoCarServiceController.java

@@ -3,7 +3,6 @@ package com.jkcredit.invoice.controller.interserver;
 import com.jkcredit.invoice.annotation.LoginRequired;
 import com.jkcredit.invoice.annotation.annotationdes.AuthenticationInterceptor;
 import com.jkcredit.invoice.mapper.calculateinfor.MounthAccMapper;
-import com.jkcredit.invoice.mapper.customer.CustomerCarRecMapper;
 import com.jkcredit.invoice.mapper.customer.CustomerRecMapper;
 import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
 import com.jkcredit.invoice.model.entity.customer.CustomerRec;
@@ -55,8 +54,8 @@ public class NoCarServiceController {
     @PostMapping("/hCVoiceQuery")
     @ApiOperation(value="红冲发票查询接口", notes="红冲发票查询接口")
     @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
-    public RespR hCVoiceQuery(@RequestBody HCInvoiceQueryVo hcInvoiceQueryVo){
-        return noCarService.hCInvoiceQuery(hcInvoiceQueryVo);
+    public RespR hcvoicequery(@RequestBody HCInvoiceQueryVo hcInvoiceQueryVo){
+        return noCarService.hcinvoicequery(hcInvoiceQueryVo);
     }
     /**
      * @param
@@ -65,8 +64,8 @@ public class NoCarServiceController {
     @PostMapping("/hCVoiceUpdate")
     @ApiOperation(value="红冲发票更新接口", notes="红冲发票更新接口")
     @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
-    public RespR hCVoiceUpdate(@RequestBody HCInvoiceQueryVo hcInvoiceQueryVo){
-        return noCarService.hCInvoiceUpdate(hcInvoiceQueryVo);
+    public RespR hcvoiceupdate(@RequestBody HCInvoiceQueryVo hcInvoiceQueryVo){
+        return noCarService.hcinvoiceupdate(hcInvoiceQueryVo);
     }
     /**
      * @param

+ 9 - 9
src/main/java/com/jkcredit/invoice/controller/interserver/SelfCarServiceController.java

@@ -42,19 +42,19 @@ public class SelfCarServiceController {
             tradeRequestVo.setTradeStatus(1);
             RespR<List<CardTradeModel>> respRbefore = selfCarService.getTradeList(tradeRequestVo);
             tradeRequestVo.setTradeStatus(2);
-            RespR<List<CardTradeModel>> respRUnder = selfCarService.getTradeList(tradeRequestVo);
+            RespR<List<CardTradeModel>> tradeList = selfCarService.getTradeList(tradeRequestVo);
             tradeRequestVo.setTradeStatus(3);
-            RespR<List<CardTradeModel>> respRAfter = selfCarService.getTradeList(tradeRequestVo);
+            RespR<List<CardTradeModel>> listRespR = selfCarService.getTradeList(tradeRequestVo);
             //合并展示
             List<CardTradeModel> cardTradeModels = new ArrayList<>();
             if(respRbefore.getCode() == 0){
                 cardTradeModels.addAll(respRbefore.getData());
             }
-            if(respRUnder.getCode() == 0){
-                cardTradeModels.addAll(respRUnder.getData());
+            if(tradeList.getCode() == 0){
+                cardTradeModels.addAll(tradeList.getData());
             }
-            if(respRAfter.getCode() == 0){
-                cardTradeModels.addAll(respRAfter.getData());
+            if(listRespR.getCode() == 0){
+                cardTradeModels.addAll(listRespR.getData());
             }
             return new RespR(cardTradeModels);
         }
@@ -117,7 +117,7 @@ public class SelfCarServiceController {
     @PostMapping("/customerETCQuery")
     @ApiOperation(value="", notes="ETC绑定列表查询")
     @LoginRequired
-    public RespR customerETCQuery(@RequestBody EtcQueryVo etcQueryVo,User user){
+    public RespR customeretcquery(@RequestBody EtcQueryVo etcQueryVo, User user){
         checkHasAuthRole.checkCustomerRole(user,etcQueryVo.getCustomerName());
         return selfCarService.getEtcInfo(etcQueryVo);
     }
@@ -143,7 +143,7 @@ public class SelfCarServiceController {
     @PostMapping("/customerETCRec")
     @ApiOperation(value="", notes="ETC备案")
     @LoginRequired
-    public RespR customerETCRec(@RequestBody EtcBindVo etcBindVo,User user){
+    public RespR customerEtcRec(@RequestBody EtcBindVo etcBindVo, User user){
         checkHasAuthRole.checkCompanyRole(user,etcBindVo.getCompanyName());
         return selfCarService.customerEtcRec(etcBindVo);
     }
@@ -156,7 +156,7 @@ public class SelfCarServiceController {
     @PostMapping("/customerETCRecValid")
     @ApiOperation(value="", notes="ETC备案验证")
     @LoginRequired
-    public RespR customerETCRecValid(@RequestBody EtcValidVo etcValidVo){
+    public RespR customerEtcRecValid(@RequestBody EtcValidVo etcValidVo){
         return selfCarService.customerEtcRecValid(etcValidVo);
     }
 

+ 3 - 3
src/main/java/com/jkcredit/invoice/credit/InterfaceCheckServer.java

@@ -90,7 +90,7 @@ public class InterfaceCheckServer {
                     result = resultTimeOut;
                 }else{
                     statisRequestIdTimeComp.putReQuestIdAndTime(requestid);
-                    result = selfCarInterService.customerETCQuery(appKey,api,data,requestid);
+                    result = selfCarInterService.customeretcquery(appKey,api,data,requestid);
                     statisRequestIdTimeComp.removeReQuestIdAndTime(requestid);
                 }
                 break;
@@ -110,7 +110,7 @@ public class InterfaceCheckServer {
                     result = resultTimeOut;
                 }else{
                     statisRequestIdTimeComp.putReQuestIdAndTime(requestid);
-                    result = selfCarInterService.customerETCRec(appKey,api,data,requestid);
+                    result = selfCarInterService.customeretcrec(appKey,api,data,requestid);
                     statisRequestIdTimeComp.removeReQuestIdAndTime(requestid);
                 }
                 break;
@@ -120,7 +120,7 @@ public class InterfaceCheckServer {
                     result = resultTimeOut;
                 }else{
                     statisRequestIdTimeComp.putReQuestIdAndTime(requestid);
-                    result = selfCarInterService.customerETCRecValid(appKey,api,data,requestid);
+                    result = selfCarInterService.customeretcrecvalid(appKey,api,data,requestid);
                     statisRequestIdTimeComp.removeReQuestIdAndTime(requestid);
                 }
                 break;

+ 2 - 2
src/main/java/com/jkcredit/invoice/credit/SimpleCORSFilter.java

@@ -28,7 +28,7 @@ import java.util.*;
  * @Date: 2021/9/12
  */
 @Slf4j
-public class SimpleCORSFilter implements Filter {
+public class SimpleCoreFilter implements Filter {
 
 
     @Autowired
@@ -362,7 +362,7 @@ public class SimpleCORSFilter implements Filter {
             }
             if (0 == new BigDecimal(customer1.getAccountBalance()).compareTo(new BigDecimal(0.0))
 
-                    &&  (api.equals("WAY_BILL_NUM_FIND_INVOICE") || api.equals("B2B_INVOICE_QUERY_V1"))) {
+                    &&  ("WAY_BILL_NUM_FIND_INVOICE".equals(api) || "B2B_INVOICE_QUERY_V1".equals(api))) {
                 flags =  false;
             }
             if(flags){

+ 3 - 2
src/main/java/com/jkcredit/invoice/credit/interserver/NoCarInterServiceImpl.java

@@ -572,8 +572,9 @@ public class NoCarInterServiceImpl implements NoCarInterService {
         if(null == curr){
             noCarWaybillMapper.insert(noCarWayBill);
         }else{
-            if(curr.getBillwayStatus()<1)
+            if(curr.getBillwayStatus()<1){
                 noCarWaybillMapper.updateByBillNum(noCarWayBill);
+            }
         }
     }
 
@@ -907,7 +908,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             hcInvoiceQueryVo.setMonth(month);
             hcInvoiceQueryVo.setPageSize(pageSize);
             hcInvoiceQueryVo.setPageNo(pageNo);
-            RespR rs = noCarService.hCInvoiceQueryInter(hcInvoiceQueryVo);
+            RespR rs = noCarService.hcinvoicequeryinter(hcInvoiceQueryVo);
             long costtimeend = System.currentTimeMillis();
             log.info("[-NoCarInterServiceImpl.redInkInvoiceQuery-] result is "
                     + rs.toString() + ", request is " + data + " ,costtime="

+ 3 - 3
src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterService.java

@@ -5,16 +5,16 @@ import com.jkcredit.invoice.common.DataResult;
 public interface SelfCarInterService {
 
     //自有车 用户卡列表查询接口;
-    DataResult customerETCQuery(String appKey, String api, String data, String requestid);
+    DataResult customeretcquery(String appKey, String api, String data, String requestid);
 
     //自有车 卡信息查询接口
     DataResult customerQueryEtcInfo(String appKey, String api, String data, String requestid);
 
     //自有车下发短信通知接口
-    DataResult customerETCRec(String appKey, String api, String data, String requestid);
+    DataResult customeretcrec(String appKey, String api, String data, String requestid);
 
     //自有车 卡绑定接口 渠道调用此接口,上传用户收到的短信验证码
-    DataResult customerETCRecValid(String appKey, String api, String data, String requestid);
+    DataResult customeretcrecvalid(String appKey, String api, String data, String requestid);
 
     //自有车 交易查询接口 渠道通过此接口可以查询单张卡连续90天内的交易(待开票、开票中、已开票)
     DataResult getTradeList(String appKey, String api, String data, String requestid);

+ 9 - 9
src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterServiceImpl.java

@@ -41,7 +41,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
      * @return
      */
     @Override
-    public DataResult customerETCQuery(String appKey, String api, String data,String requestid) {
+    public DataResult customeretcquery(String appKey, String api, String data, String requestid) {
 
         long costtimestart = System.currentTimeMillis();
 
@@ -219,7 +219,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
      * @return
      */
     @Override
-    public DataResult customerETCRec(String appKey, String api, String data,String requestid) {
+    public DataResult customeretcrec(String appKey, String api, String data, String requestid) {
 
         long costtimestart = System.currentTimeMillis();
 
@@ -311,7 +311,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
      * @return
      */
     @Override
-    public DataResult customerETCRecValid(String appKey, String api, String data,String requestid) {
+    public DataResult customeretcrecvalid(String appKey, String api, String data, String requestid) {
 
         long costtimestart = System.currentTimeMillis();
 
@@ -452,19 +452,19 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 tradeRequestVo.setTradeStatus(1);
                 RespR<List<CardTradeModel>> respRbefore = selfCarService.getTradeList(tradeRequestVo);
                 tradeRequestVo.setTradeStatus(2);
-                RespR<List<CardTradeModel>> respRUnder = selfCarService.getTradeList(tradeRequestVo);
+                RespR<List<CardTradeModel>> listRespR = selfCarService.getTradeList(tradeRequestVo);
                 tradeRequestVo.setTradeStatus(3);
-                RespR<List<CardTradeModel>> respRAfter = selfCarService.getTradeList(tradeRequestVo);
+                RespR<List<CardTradeModel>> tradeList = selfCarService.getTradeList(tradeRequestVo);
                 //合并展示
                 List<CardTradeModel> cardTradeModels = new ArrayList<>();
                 if(respRbefore.getCode() == 0){
                     cardTradeModels.addAll(respRbefore.getData());
                 }
-                if(respRUnder.getCode() == 0){
-                    cardTradeModels.addAll(respRUnder.getData());
+                if(listRespR.getCode() == 0){
+                    cardTradeModels.addAll(listRespR.getData());
                 }
-                if(respRAfter.getCode() == 0){
-                    cardTradeModels.addAll(respRAfter.getData());
+                if(tradeList.getCode() == 0){
+                    cardTradeModels.addAll(tradeList.getData());
                 }
 
                 result.setData(1);

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

@@ -20,8 +20,8 @@ public interface CustomerCarRecMapper extends BaseMapper<CustomerCarRec> {
 
     List<CustomerCarRec>  selectByCustName(String customerName);
 
-    CustomerCarRec selectByETC(String etcNum);
-    CustomerCarRec selectByETCForLock(String etcNum);
+    CustomerCarRec selectByEtc(String etcNum);
+    CustomerCarRec selectByEtcForLock(String etcNum);
     List<CustomerCarRec> selectByCarNum(String carNum);
     List<CustomerCarRec> selectBySelfCarNum(String carNum);
     List<CustomerCarRec> selectAllEtcBySelfCarNum(String carNum);
@@ -30,11 +30,11 @@ public interface CustomerCarRecMapper extends BaseMapper<CustomerCarRec> {
 
     int updateByPrimaryKey(CustomerCarRec record);
 
-    int updateETCByPrimaryKeySelective(CustomerCarRec record);
+    int updateEtcByPrimaryKeySelective(CustomerCarRec record);
 
-    int updateETCByPrimaryKey(CustomerCarRec record);
+    int updateEtcByPrimaryKey(CustomerCarRec record);
 
-    int updateWaitETCStatus(CustomerCarRec record);
+    int updateWaitEtcStatus(CustomerCarRec record);
     List<CustomerCarRec> selectAllBindEtcNoGetInvoice();
     IPage<List<CustomerCarRec>> selectAllByPage(Page page, @Param("query") CustomerCarRec customerCarRec);
 

+ 3 - 3
src/main/java/com/jkcredit/invoice/model/entity/calculate/MounthAcc.java

@@ -7,7 +7,7 @@ public class MounthAcc {
     /**
      * 计费id号
      */
-    private Long Id;
+    private Long id;
 
     private String customerId;
     private String companyName;
@@ -21,11 +21,11 @@ public class MounthAcc {
     private String exStation;
 
     public Long getId() {
-        return Id;
+        return id;
     }
 
     public void setId(Long id) {
-        Id = id;
+        id = id;
     }
 
     public String getCustomerId() {

+ 4 - 4
src/main/java/com/jkcredit/invoice/model/entity/calculate/NoCarCalculateInfor.java

@@ -9,7 +9,7 @@ public class NoCarCalculateInfor {
     /**
      * 计费id号
      */
-    private Long Id;
+    private Long id;
     /**
      *  交易Id
      */
@@ -64,11 +64,11 @@ public class NoCarCalculateInfor {
     private Integer ctype;
 
     public Long getId() {
-        return Id;
+        return id;
     }
 
     public void setId(Long id) {
-        Id = id;
+        id = id;
     }
 
     public String getTradeId() {
@@ -204,7 +204,7 @@ public class NoCarCalculateInfor {
     @Override
     public String toString() {
         return "NoCarCalculateInfor{" +
-                "Id=" + Id +
+                "id=" + id +
                 ", tradeId='" + tradeId + '\'' +
                 ", customId='" + customId + '\'' +
                 ", companyLongName='" + companyLongName + '\'' +

+ 3 - 3
src/main/java/com/jkcredit/invoice/service/calculateinfor/impl/SelfcarCalculateInfoServiceImpl.java

@@ -24,10 +24,10 @@ import java.util.Map;
 */
 public class SelfcarCalculateInfoServiceImpl extends ServiceImpl<SelfCarCalculateInforMapper,SelfCarCalculateInfor> implements SelfCarCalculateInfoService {
     @Autowired
-    SelfCarCalculateInforMapper CarCalculateInforMapper ;
+    SelfCarCalculateInforMapper carCalculateInforMapper ;
     @Override
     public IPage<List<SelfCarCalculateInfor>> findByPageAndCalculateInfor(Page page, SelfCarCalculateInfor calculateInfor) {
-        return CarCalculateInforMapper.selectAllByPage(page,calculateInfor);
+        return carCalculateInforMapper.selectAllByPage(page,calculateInfor);
     }
 
 
@@ -46,6 +46,6 @@ public class SelfcarCalculateInfoServiceImpl extends ServiceImpl<SelfCarCalculat
 
 
 
-        return CarCalculateInforMapper.findSelfcarCalculateInfoSta(calculateInfor);
+        return carCalculateInforMapper.findSelfcarCalculateInfoSta(calculateInfor);
     }
 }

+ 3 - 3
src/main/java/com/jkcredit/invoice/service/lowerservice/NoCarService.java

@@ -71,21 +71,21 @@ public interface NoCarService {
      * @param hcInvoiceQueryVo
      * @return
      */
-    RespR hCInvoiceQuery(HCInvoiceQueryVo hcInvoiceQueryVo);
+    RespR hcinvoicequery(HCInvoiceQueryVo hcInvoiceQueryVo);
 
     /**
      * 红冲发票查询接口
      * @param hcInvoiceQueryVo
      * @return
      */
-    RespR hCInvoiceQueryInter(HCInvoiceQueryVo hcInvoiceQueryVo);
+    RespR hcinvoicequeryinter(HCInvoiceQueryVo hcInvoiceQueryVo);
 
     /**
      * 红冲发票更新
      * @param hcInvoiceQueryVo
      * @return
      */
-    RespR hCInvoiceUpdate(HCInvoiceQueryVo hcInvoiceQueryVo);
+    RespR hcinvoiceupdate(HCInvoiceQueryVo hcInvoiceQueryVo);
 
 
     /**

+ 23 - 21
src/main/java/com/jkcredit/invoice/service/lowerservice/impl/NoCarServiceImpl.java

@@ -32,7 +32,9 @@ import com.jkcredit.invoice.service.manager.ParamService;
 import com.jkcredit.invoice.service.nocar.HcInvoiceService;
 import com.jkcredit.invoice.service.nocar.NoCarRecService;
 import com.jkcredit.invoice.service.upService.NoCarInterface;
-import com.jkcredit.invoice.util.*;
+import com.jkcredit.invoice.util.DateUtil;
+import com.jkcredit.invoice.util.MathUtil;
+import com.jkcredit.invoice.util.RespR;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,7 +44,6 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import java.util.*;
-import java.util.stream.Collectors;
 
 @Repository("noCarService")
 @Slf4j
@@ -105,7 +106,7 @@ public class NoCarServiceImpl implements NoCarService{
     public  RespR customerCarRecForNoCar(List<CustomerCarRec> customerCarRecs, StringBuffer res, CustomerRec customerRec) {
         try {
 
-            String respRResult = "";//上游成功返回结果
+            String resprresult = "";//上游成功返回结果
             for (CustomerCarRec customerCarRec : customerCarRecs) {
                 if(!customerRec.getBussinessType().equals(customerCarRec.getBusinessType())){
                     res.append("#客户:"+customerCarRec.getCustomerName()+"企业:"+customerCarRec.getCompanyName()+"车辆:"+customerCarRec.getCarNum()+"业务类型错误");
@@ -122,8 +123,8 @@ public class NoCarServiceImpl implements NoCarService{
 
                 //如果是接口,直接调用上游车辆备案
                 if(0 != customerCarRec.getInterType() ){
-                RespR<VehicleQueryResponse> respRB = noCarInterface.vehicleQuery(vehicleQueryRequest);
-                if(respRB.getCode()!=1 && respRB.getData().getResult()!=null && respRB.getData().getResult().size()>0){
+                RespR<VehicleQueryResponse> responseRespR = noCarInterface.vehicleQuery(vehicleQueryRequest);
+                if(responseRespR.getCode()!=1 && responseRespR.getData().getResult()!=null && responseRespR.getData().getResult().size()>0){
                     customerCarRec.setRecStatus(CommonConstants.REC_STATUS_SUC);
                     customerCarRec.setSuccTime(DateUtil.getCurrentDateStr());
                     //根据车牌号查询是新增还是更新
@@ -151,7 +152,7 @@ public class NoCarServiceImpl implements NoCarService{
                     customerCarRec.setFailReason(respR.getMsg());
                     customerCarRec.setFailTime(DateUtil.getCurrentDateStr());
                 } else {
-                    respRResult = respR.getData().toString();//车辆备案成功
+                    resprresult = respR.getData().toString();//车辆备案成功
                     customerCarRec.setRecStatus(CommonConstants.REC_STATUS_SUC);
                     customerCarRec.setSuccTime(DateUtil.getCurrentDateStr());
                 }
@@ -161,7 +162,7 @@ public class NoCarServiceImpl implements NoCarService{
             }
             if(StringUtils.isEmpty(res.toString())){
                 log.info("车辆备案成功");
-                return new RespR(respRResult);
+                return new RespR(resprresult);
             }else {
                 log.info("车辆备案异常NoCarServiceImpl.customerCarRec{},msg{}",customerCarRecs,res.toString());
                 return new RespR(false,res.toString());
@@ -272,8 +273,9 @@ public class NoCarServiceImpl implements NoCarService{
         if(curr == null){
             noCarWaybillMapper.insert(noCarWayBill);
         }else{
-            if(curr.getBillwayStatus()<1)
-            noCarWaybillMapper.updateByBillNum(noCarWayBill);
+            if(curr.getBillwayStatus()<1) {
+                noCarWaybillMapper.updateByBillNum(noCarWayBill);
+            }
         }
     }
     /**
@@ -446,7 +448,7 @@ public class NoCarServiceImpl implements NoCarService{
             insertOrUpdateBillStart(noCarWayBill);
             return  respR;
         }
-        WaybillHistoryStartRequest waybillHistoryStartRequest = BuildNoCarHisWaybill(noCarWayBill);
+        WaybillHistoryStartRequest waybillHistoryStartRequest = buildNoCarHisWaybill(noCarWayBill);
         RespR<WaybillHistoryStartResponse> responseRespR = noCarInterface.waybillHistoryStart(waybillHistoryStartRequest);
 
         if(responseRespR.getCode() == 1){
@@ -464,7 +466,7 @@ public class NoCarServiceImpl implements NoCarService{
         return new RespR(responseRespR.getData());
     }
 
-    public WaybillHistoryStartRequest BuildNoCarHisWaybill(NoCarWayBill noCarWayBill){
+    public WaybillHistoryStartRequest buildNoCarHisWaybill(NoCarWayBill noCarWayBill){
         WaybillHistoryStartRequest waybillStartRequest = new WaybillHistoryStartRequest();
         String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
         waybillStartRequest.setCompanyNum(companyNum);
@@ -675,7 +677,7 @@ public class NoCarServiceImpl implements NoCarService{
                     billInvoiceMapper.insert(billInvoice);
                 });
                 log.info("6666666{}",noCarWayBill.getBillNum());
-                if(isKf == 3)   return new RespR(responseRespR.getData());
+                if(isKf == 3)  { return new RespR(responseRespR.getData());}
                 //统一插入交易id 和 和计费信息
                 Param param = paramService.getParamsByParamName("CUST_NOCAR_FEE");
                 Double fee = Double.parseDouble(param.getParamValue());
@@ -693,8 +695,8 @@ public class NoCarServiceImpl implements NoCarService{
 
 
                 });
-                if(isKf==1)
-                customerMapper.updateByPrimaryKeySelective(customer);
+                if(isKf==1){
+                customerMapper.updateByPrimaryKeySelective(customer);}
 
             }
             if(isInterface){
@@ -717,7 +719,7 @@ public class NoCarServiceImpl implements NoCarService{
     }
 
     @Override
-    public RespR hCInvoiceQuery(HCInvoiceQueryVo hcInvoiceQueryVo) {
+    public RespR hcinvoicequery(HCInvoiceQueryVo hcInvoiceQueryVo) {
         log.info("取红冲票啦:NoCarServiceImpl.hCInvoiceQuery{}",hcInvoiceQueryVo);
         HcInvoice hcInvoiceParam = new HcInvoice();
         hcInvoiceParam.setBuyerName(hcInvoiceQueryVo.getBuyerName());
@@ -733,7 +735,7 @@ public class NoCarServiceImpl implements NoCarService{
     @Autowired
     HcInvoiceService hcInvoiceService;
     @Override
-    public RespR hCInvoiceQueryInter(HCInvoiceQueryVo hcInvoiceQueryVo) {
+    public RespR hcinvoicequeryinter(HCInvoiceQueryVo hcInvoiceQueryVo) {
         Page page = new Page();
         page.setCurrent(hcInvoiceQueryVo.getPageNo());
         if(StringUtils.isEmpty(hcInvoiceQueryVo.getPageSize())){
@@ -744,11 +746,11 @@ public class NoCarServiceImpl implements NoCarService{
         HcInvoice hcInvoiceParam = new HcInvoice();
         hcInvoiceParam.setBuyerTaxpayerCode(hcInvoiceQueryVo.getBuyerTaxpayerCode());
         hcInvoiceParam.setYearMonth(hcInvoiceQueryVo.getMonth());
-        IPage<HcInvoice> listIPage = hcInvoiceService.findByPageAndWayBill(page,hcInvoiceParam);
+        IPage<HcInvoice> byPageAndWayBill = hcInvoiceService.findByPageAndWayBill(page,hcInvoiceParam);
         Map<String,Object> map = new HashMap<>();
-        map.put("result",listIPage.getRecords());
-        map.put("total",listIPage.getTotal());
-        map.put("pages",listIPage.getPages());
+        map.put("result",byPageAndWayBill.getRecords());
+        map.put("total",byPageAndWayBill.getTotal());
+        map.put("pages",byPageAndWayBill.getPages());
         return new RespR(map);
     }
 
@@ -757,7 +759,7 @@ public class NoCarServiceImpl implements NoCarService{
 
     @Override
     @Transactional
-    public RespR hCInvoiceUpdate(HCInvoiceQueryVo hcInvoiceQueryVo) {
+    public RespR hcinvoiceupdate(HCInvoiceQueryVo hcInvoiceQueryVo) {
         log.info("取红冲票啦:NoCarServiceImpl.hCInvoiceQuery{}",hcInvoiceQueryVo);
         WaybillInvoiceRedQueryRequest redQueryRequest = new WaybillInvoiceRedQueryRequest();
         String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();

+ 82 - 86
src/main/java/com/jkcredit/invoice/service/lowerservice/impl/SelfCarServiceLImpl.java

@@ -42,10 +42,6 @@ import java.util.List;
 @Service
 @Slf4j
 public class SelfCarServiceLImpl implements SelfCarServiceL {
-
-
-    
-    
     @Autowired
     SelfCarInterface selfCarInterface;
     @Autowired
@@ -104,7 +100,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             List<CardTradeModel> result  = cardTradeResponse.getResult();
             //对不存在的tradeId入表
             if(result!=null && result.size()>0){
-                customerCarRecMapper.selectByETCForLock(tradeRequestVo.getEtcId());
+                customerCarRecMapper.selectByEtcForLock(tradeRequestVo.getEtcId());
                 SelfCarTrade selfCarTrade;
                 for(CardTradeModel cardTradeModel:result){
                     List<SelfCarTrade> selfCarTrades =  sellCarTradeMapper.selectByTradeId(cardTradeModel.getTradeId());
@@ -161,35 +157,35 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             return new RespR(false,"客户未备案");
         }
 
-        B2BInvoiceApplyRequest b2BInvoiceApplyRequest = new B2BInvoiceApplyRequest();
-        b2BInvoiceApplyRequest.setCardId(invoiceApplVo.getCardId());
-        b2BInvoiceApplyRequest.setCompanyNum(customerRec.getCompanyNum());
-        List<B2BInvoiceApplyModel> b2BInvoiceApplyModels = new ArrayList<>();
+        B2BInvoiceApplyRequest b2bInvoiceApplyRequest = new B2BInvoiceApplyRequest();
+        b2bInvoiceApplyRequest.setCardId(invoiceApplVo.getCardId());
+        b2bInvoiceApplyRequest.setCompanyNum(customerRec.getCompanyNum());
+        List<B2BInvoiceApplyModel> applyModels = new ArrayList<>();
         List<String> tradeIds = invoiceApplVo.getTradeIds();
         if(tradeIds == null || tradeIds.size()<=0){
             return new RespR(false,"没有交易Id");
         }
         for(String tradeId:tradeIds){
-            B2BInvoiceApplyModel b2BInvoiceApplyModel = new B2BInvoiceApplyModel();
-            b2BInvoiceApplyModel.setTradeId(tradeId);
-            b2BInvoiceApplyModels.add(b2BInvoiceApplyModel);
+            B2BInvoiceApplyModel applyModel = new B2BInvoiceApplyModel();
+            applyModel.setTradeId(tradeId);
+            applyModels.add(applyModel);
         }
-        b2BInvoiceApplyRequest.setTradeIdModel(b2BInvoiceApplyModels);
-        RespR<B2BInvoiceApplyResponse> respR = selfCarInterface.b2BInvoiceApply(b2BInvoiceApplyRequest);
+        b2bInvoiceApplyRequest.setTradeIdModel(applyModels);
+        RespR<B2BInvoiceApplyResponse> respR = selfCarInterface.b2Binvoiceapply(b2bInvoiceApplyRequest);
         if(respR.getCode()==1){
             log.info("申请开票失败SelfCarServiceLImpl.applInvoice{},msg{}",invoiceApplVo,respR.getMsg());
             return new RespR(false,respR.getMsg());
         }else{
-            B2BInvoiceApplyResponse b2BInvoiceApplyResponse = respR.getData();
+            B2BInvoiceApplyResponse data = respR.getData();
             SelfCarAppl selfCarAppl = new SelfCarAppl();
-            selfCarAppl.setApplId(b2BInvoiceApplyResponse.getApplyId());
-            selfCarAppl.setApplTime(b2BInvoiceApplyResponse.getReceiveTime());
-            selfCarAppl.setCompanyNum(b2BInvoiceApplyRequest.getCompanyNum());
+            selfCarAppl.setApplId(data.getApplyId());
+            selfCarAppl.setApplTime(data.getReceiveTime());
+            selfCarAppl.setCompanyNum(b2bInvoiceApplyRequest.getCompanyNum());
             selfCarAppl.setCustomId(customer.getCustomerName());
             selfCarAppl.setCardId(invoiceApplVo.getCardId());
-            selfCarAppl.setInvoiceAmount(b2BInvoiceApplyResponse.getInvoiceAmount());
-            selfCarAppl.setInvoiceCount(b2BInvoiceApplyResponse.getInvoiceCount());
-            selfCarAppl.setInvoiceTaxAmount(b2BInvoiceApplyResponse.getInvoiceTaxAmount());
+            selfCarAppl.setInvoiceAmount(data.getInvoiceAmount());
+            selfCarAppl.setInvoiceCount(data.getInvoiceCount());
+            selfCarAppl.setInvoiceTaxAmount(data.getInvoiceTaxAmount());
             selfCarAppl.setInterType(invoiceApplVo.getInterType());
             selfCarApplMapper.insert(selfCarAppl);
             double needFee = 0;
@@ -200,7 +196,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                 SelfCarTrade selfCarTrade =  selfCarTrades.get(0);
                 selfCarTrade.setStatus(2);
                 selfCarTrade.setAclTime(DateUtil.getCurrentDateStr());
-                selfCarTrade.setApplId(b2BInvoiceApplyResponse.getApplyId());
+                selfCarTrade.setApplId(data.getApplyId());
                 selfCarTrade.setInterType(invoiceApplVo.getInterType());
                 sellCarTradeMapper.updateByTradeId(selfCarTrade);
                 //计费
@@ -231,11 +227,11 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
     @Override
     public RespR<List<B2BInvoiceQueryByApplyModel>> getSelfCarInvoicesByApplyIds(ApplQueryInvVo applQueryInvVo) {
         log.info("申请开票开始SelfCarServiceLImpl.getSelfCarInvoicesByApplyIds{}",applQueryInvVo);
-        B2BInvoiceQueryByApplyRequest b2BInvoiceQueryRequest = new B2BInvoiceQueryByApplyRequest();
-        b2BInvoiceQueryRequest.setCardId(applQueryInvVo.getEtcNum());
-        b2BInvoiceQueryRequest.setCompanyNum(applQueryInvVo.getCompanyNum());
-        b2BInvoiceQueryRequest.setApplyId(applQueryInvVo.getApplId());
-        RespR<B2BInvoiceQueryByApplyResponse> responseRespR = selfCarInterface.b2bContractQuery(b2BInvoiceQueryRequest);
+        B2BInvoiceQueryByApplyRequest applyRequest = new B2BInvoiceQueryByApplyRequest();
+        applyRequest.setCardId(applQueryInvVo.getEtcNum());
+        applyRequest.setCompanyNum(applQueryInvVo.getCompanyNum());
+        applyRequest.setApplyId(applQueryInvVo.getApplId());
+        RespR<B2BInvoiceQueryByApplyResponse> responseRespR = selfCarInterface.b2bContractQuery(applyRequest);
         //返回相应的发票
         if(responseRespR.getCode() == 1){
             log.info("申请开票失败SelfCarServiceLImpl.getSelfCarInvoicesByApplyIds{},msg{}",applQueryInvVo,responseRespR.getMsg());
@@ -248,23 +244,23 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
     @Override
     public RespR<List<B2BInvoiceListModel>> getSelfCarInvoicesByTime(SelfCarDueQueryVo selfCarDueQueryVo,CustomerRec customerRec) {
         log.info("申请开票开始SelfCarServiceLImpl.getSelfCarInvoicesByTime{}",selfCarDueQueryVo);
-        B2BInvoiceQueryRequest b2BInvoiceQueryRequest = new B2BInvoiceQueryRequest();
-        b2BInvoiceQueryRequest.setCompanyNum(customerRec.getCompanyNum());
-        b2BInvoiceQueryRequest.setCardId(selfCarDueQueryVo.getCardId());
-        b2BInvoiceQueryRequest.setStartInvoiceMakeTime(DateUtil.dateFormate(selfCarDueQueryVo.getStartTime()));
-        b2BInvoiceQueryRequest.setEndInvoiceMakeTime(DateUtil.dateFormate(selfCarDueQueryVo.getEndTime()));
+        B2BInvoiceQueryRequest request = new B2BInvoiceQueryRequest();
+        request.setCompanyNum(customerRec.getCompanyNum());
+        request.setCardId(selfCarDueQueryVo.getCardId());
+        request.setStartInvoiceMakeTime(DateUtil.dateFormate(selfCarDueQueryVo.getStartTime()));
+        request.setEndInvoiceMakeTime(DateUtil.dateFormate(selfCarDueQueryVo.getEndTime()));
 
-        RespR<B2BInvoiceQueryResponse> responseRespR = selfCarInterface.b2BInvoiceQuery(b2BInvoiceQueryRequest);
+        RespR<B2BInvoiceQueryResponse> responseRespR = selfCarInterface.b2Binvoicequery(request);
         if(responseRespR.getCode() == 1){
             log.info("申请开票失败SelfCarServiceLImpl.getSelfCarInvoicesByTime{},msg{}",selfCarDueQueryVo,responseRespR.getMsg());
             return new RespR(false,responseRespR.getMsg());
         }else{
-            B2BInvoiceQueryResponse b2BInvoiceQueryResponse = responseRespR.getData();
-            List<B2BInvoiceListModel> b2BInvoiceListModels = b2BInvoiceQueryResponse.getResult();
-            if(b2BInvoiceListModels!=null && b2BInvoiceListModels.size()>0){
-                for(B2BInvoiceListModel b2BInvoiceListModel:b2BInvoiceListModels){
+            B2BInvoiceQueryResponse respData = responseRespR.getData();
+            List<B2BInvoiceListModel> dataResult = respData.getResult();
+            if(dataResult!=null && dataResult.size()>0){
+                for(B2BInvoiceListModel listModel :dataResult){
                     SelfCarInvoice selfCarInvoice = new SelfCarInvoice();
-                    BeanUtils.copyProperties(b2BInvoiceListModel,selfCarInvoice);
+                    BeanUtils.copyProperties(listModel ,selfCarInvoice);
                     selfCarInvoice.setInvoiceMakeTime(DateUtil.tTimeToDate(selfCarInvoice.getInvoiceMakeTime()));
                     selfCarInvoice.setExTime(DateUtil.tTimeToDate(selfCarInvoice.getExTime()));
                     selfCarInvoice.setCustomerName(selfCarDueQueryVo.getCustomername());
@@ -272,8 +268,8 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                     selfCarInvoice.setBuyerTaxpayerCode(customerRec.getCompanyReferencenum());
                     selfCarInvoice.setBuyerName(customerRec.getCompanyName());
                     selfCarInvoice.setCompanyNum(customerRec.getCompanyNum());
-                    selfCarInvoice.setEnStation(b2BInvoiceListModel.getEnStationName());
-                    selfCarInvoice.setExStation(b2BInvoiceListModel.getExStationName());
+                    selfCarInvoice.setEnStation(listModel .getEnStationName());
+                    selfCarInvoice.setExStation(listModel .getExStationName());
                     List<SelfCarInvoice> selfCarInvoice1 = selfCarInvoiceMapper.selectByCodeAndNum(selfCarInvoice);
                     if(selfCarInvoice1==null || selfCarInvoice1.size()<=0){
                         selfCarInvoiceMapper.insert(selfCarInvoice);
@@ -282,7 +278,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             }else{
                 return new RespR(false,"未查得");
             }
-            return new RespR(b2BInvoiceListModels,responseRespR.getData().getResult().toString());
+            return new RespR(dataResult,responseRespR.getData().getResult().toString());
         }
     }
 
@@ -334,12 +330,12 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         if(customerRec == null || customerRec.getRecStatus().intValue() !=1 ){
             return new RespR(false,"客户未备案");
         }
-        CardBindQueryListToBRequest cardQueryCardToBRequest = new CardBindQueryListToBRequest();
-        cardQueryCardToBRequest.setCompanyNum(customerRec.getCompanyNum());//企业编号,必输
-        cardQueryCardToBRequest.setCardId(etcQueryVo.getCardId());//卡户 ,非必输
-        cardQueryCardToBRequest.setPlateNum(etcQueryVo.getPlateNum());//车牌号,非必输
-        cardQueryCardToBRequest.setPalteColor(etcQueryVo.getPlateColor());//车牌颜色.非必输
-        RespR<CardBindQueryListToBResponse> respR = selfCarInterface.cardBindQueryListToB(cardQueryCardToBRequest);
+        CardBindQueryListToBRequest list = new CardBindQueryListToBRequest();
+        list.setCompanyNum(customerRec.getCompanyNum());//企业编号,必输
+        list.setCardId(etcQueryVo.getCardId());//卡户 ,非必输
+        list.setPlateNum(etcQueryVo.getPlateNum());//车牌号,非必输
+        list.setPalteColor(etcQueryVo.getPlateColor());//车牌颜色.非必输
+        RespR<CardBindQueryListToBResponse> respR = selfCarInterface.cardBindQueryListToB(list);
 
         /*if(customerRec.getInterType() == 0){
             if(respR.getCode() == 0 && (respR.getData().getResult()==null||respR.getData().getResult().size()<=0)){
@@ -373,17 +369,17 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             res.append("#客户:"+etcBindVo.getCustomerName()+"企业:"+etcBindVo.getCompanyName()+"请先备案");
             return new RespR(false,res.toString());
         }
-        CardQueryCardToBRequest cardQueryCardToBRequest = new CardQueryCardToBRequest();
-        cardQueryCardToBRequest.setCompanyNum(customerRec.getCompanyNum());
-        List<CardQueryCardToBModel> cardQueryCardToBModels = new ArrayList<>();
+        CardQueryCardToBRequest request = new CardQueryCardToBRequest();
+        request.setCompanyNum(customerRec.getCompanyNum());
+        List<CardQueryCardToBModel> models = new ArrayList<>();
         etcBindVo.getCards().forEach(carVo -> {
-            CardQueryCardToBModel cardQueryCardToBModel = new CardQueryCardToBModel();
-            cardQueryCardToBModel.setPlateNum(carVo.getNum());
-            cardQueryCardToBModel.setPlateColor(carVo.getColor());
-            cardQueryCardToBModels.add(cardQueryCardToBModel);
+            CardQueryCardToBModel cardModel = new CardQueryCardToBModel();
+            cardModel.setPlateNum(carVo.getNum());
+            cardModel.setPlateColor(carVo.getColor());
+            models.add(cardModel);
         });
-        cardQueryCardToBRequest.setVehicleList(cardQueryCardToBModels);
-        RespR<CardQueryCardToBResponse> respR = selfCarInterface.cardQueryCardToB(cardQueryCardToBRequest);
+        request.setVehicleList(models);
+        RespR<CardQueryCardToBResponse> respR = selfCarInterface.cardQueryCardToB(request);
         if(respR.getCode() == 1){
             log.info("获取etc信息失败:SelfCarServiceLImpl.queryEtcInfo{},msg{}",etcBindVo,respR.getMsg());
             return new RespR(false,respR.getMsg());
@@ -418,19 +414,19 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         return recEtc(etcBindVo,customerRec);
     }
     public RespR recEtc(EtcBindVo etcBindVo,CustomerRec customerRec){
-        CardQueryCardToBRequest cardQueryCardToBRequest = new CardQueryCardToBRequest();
-        cardQueryCardToBRequest.setCompanyNum(customerRec.getCompanyNum());
-        List<CardBindingToBModel> cardBindingToBModels = new ArrayList<>();
+        CardQueryCardToBRequest request = new CardQueryCardToBRequest();
+        request.setCompanyNum(customerRec.getCompanyNum());
+        List<CardBindingToBModel> models = new ArrayList<>();
         etcBindVo.getCards().forEach(carVo -> {
-            CardBindingToBModel cardBindingToBModel = new CardBindingToBModel();
-            cardBindingToBModel.setCardId(carVo.getEtcNum());
-            cardBindingToBModels.add(cardBindingToBModel);
+            CardBindingToBModel model = new CardBindingToBModel();
+            model.setCardId(carVo.getEtcNum());
+            models.add(model);
         });
-        CardBindingToBRequest cardBindingToBRequest = new CardBindingToBRequest();
-        cardBindingToBRequest.setMobile(etcBindVo.getMobile());
-        cardBindingToBRequest.setCompanyNum(customerRec.getCompanyNum());
-        cardBindingToBRequest.setCardIdList(cardBindingToBModels);
-        RespR<CardBindingToBResponse> respR1 = selfCarInterface.cardBindingToB(cardBindingToBRequest);
+        CardBindingToBRequest binding = new CardBindingToBRequest();
+        binding.setMobile(etcBindVo.getMobile());
+        binding.setCompanyNum(customerRec.getCompanyNum());
+        binding.setCardIdList(models);
+        RespR<CardBindingToBResponse> respR1 = selfCarInterface.cardBindingToB(binding);
         if(respR1.getCode() == 1){
             log.info("etc注册失败:SelfCarServiceLImpl.customerEtcRec{},msg{}",etcBindVo,respR1.getMsg());
             return new RespR(false,respR1.getMsg());
@@ -439,16 +435,16 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         }
     }
 
-    public void updateETCRec(CustomerCarRec customerCarRec){
+    public void updateetcrec(CustomerCarRec customerCarRec){
         //根据车牌号查询是新增还是更新
         log.info("检验成功入库参数{}",customerCarRec);
-        CustomerCarRec customerCarRec1 = customerCarRecMapper.selectByETC(customerCarRec.getEtcNum());
+        CustomerCarRec customerCarRec1 = customerCarRecMapper.selectByEtc(customerCarRec.getEtcNum());
         if (customerCarRec1 == null) {
             log.info("检验成功入库新增参数{}",customerCarRec);
             customerCarRecMapper.insert(customerCarRec);
         } else {
             log.info("检验成功入库更新参数{}",customerCarRec);
-            customerCarRecMapper.updateETCByPrimaryKey(customerCarRec);
+            customerCarRecMapper.updateEtcByPrimaryKey(customerCarRec);
         }
     }
     @Override
@@ -468,11 +464,11 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             res.append("#客户:"+etcValidVo.getCustomerName()+"企业:"+etcValidVo.getCompanyName()+"请先备案");
             return new RespR(false,res.toString());
         }
-        CardValidCodeToBRequest cardValidCodeToBRequest = new CardValidCodeToBRequest();
-        cardValidCodeToBRequest.setCompanyNum(customerRec.getCompanyNum());
-        cardValidCodeToBRequest.setMobile(etcValidVo.getMobile());
-        cardValidCodeToBRequest.setValidCode(etcValidVo.getValidCode());
-        RespR<CardValidCodeToBResponse> respR = selfCarInterface.cardValidCodeToB(cardValidCodeToBRequest);
+        CardValidCodeToBRequest request = new CardValidCodeToBRequest();
+        request.setCompanyNum(customerRec.getCompanyNum());
+        request.setMobile(etcValidVo.getMobile());
+        request.setValidCode(etcValidVo.getValidCode());
+        RespR<CardValidCodeToBResponse> respR = selfCarInterface.cardValidCodeToB(request);
         if(respR.getCode() == 1){
             log.info("etc注册校验失败:SelfCarServiceLImpl.customerEtcRecValid{},msg",etcValidVo,respR.getMsg());
             return new RespR(false,respR.getMsg());
@@ -480,20 +476,20 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             /**
              * 绑定的etc卡入库
              */
-            respR.getData().getResult().forEach(cardValidCodeToBModel -> {
+            respR.getData().getResult().forEach(model -> {
                 CustomerCarRec customerCarRec = new CustomerCarRec();
                 customerCarRec.setBusinessType(CommonConstants.BUSSINESS_TYPE_SELFCAR);
                 customerCarRec.setCompanyName(customerRec.getCompanyName());
                 customerCarRec.setCustomerName(customerRec.getCustomerName());
                 customerCarRec.setCompanyNum(customerRec.getCompanyNum());
-                customerCarRec.setCarNum(cardValidCodeToBModel.getPlateNum());
-                customerCarRec.setEtcNum(cardValidCodeToBModel.getCardId());
-                customerCarRec.setCarColor(cardValidCodeToBModel.getPlateColor()+"");
+                customerCarRec.setCarNum(model.getPlateNum());
+                customerCarRec.setEtcNum(model.getCardId());
+                customerCarRec.setCarColor(model.getPlateColor()+"");
                 customerCarRec.setRecStatus(CommonConstants.REC_STATUS_SUC);
                 customerCarRec.setSuccTime(DateUtil.getCurrentDateStr());
                 customerCarRec.setCustPhone(etcValidVo.getMobile());
                 customerCarRec.setInterType(etcValidVo.getInterType());
-                updateETCRec(customerCarRec);
+                updateetcrec(customerCarRec);
             });
             return new RespR(respR.getData().getResult().toString());
         }
@@ -515,7 +511,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                 CustomerRec customerRec = customerRecMapper.selectByCustomerNameAndCompany(customerRecP);
                 if("0".equals(customerRec.getBussinessType())){
                     customerCarRec.setRecStatus(2);
-                    customerCarRecMapper.updateETCByPrimaryKeySelective(customerCarRec);
+                    customerCarRecMapper.updateEtcByPrimaryKeySelective(customerCarRec);
                 }
             }
             if(org.springframework.util.StringUtils.isEmpty(res.toString())){
@@ -534,13 +530,13 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
     public RespR customerCardChange(CardChangeDto cardChangeDto) {
         CardChangeTitleRequest cardChangeTitleRequest  = new CardChangeTitleRequest();
         List<String> cards = cardChangeDto.getCardIdList();
-        List<CardBindingToBModel> cardBindingToBModels = new ArrayList<>();
+        List<CardBindingToBModel> models = new ArrayList<>();
         for(String card:cards){
-            CardBindingToBModel cardBindingToBModel = new CardBindingToBModel();
-            cardBindingToBModel.setCardId(card);
-            cardBindingToBModels.add(cardBindingToBModel);
+            CardBindingToBModel model = new CardBindingToBModel();
+            model.setCardId(card);
+            models.add(model);
         }
-        cardChangeTitleRequest.setCardIdList(cardBindingToBModels);
+        cardChangeTitleRequest.setCardIdList(models);
         cardChangeTitleRequest.setCompanyNum(cardChangeDto.getCompanyNum());
         cardChangeTitleRequest.setTargetCompanyNum(cardChangeDto.getTargetCompanyNum());
 

+ 3 - 2
src/main/java/com/jkcredit/invoice/service/nocar/impl/NoCarBillWayServiceImpl.java

@@ -66,8 +66,9 @@ public class NoCarBillWayServiceImpl extends ServiceImpl<NoCarWaybillMapper,NoCa
         if(curr == null){
             noCarWaybillMapper.insert(noCarWayBill);
         }else{
-            if(curr.getBillwayStatus()<1)
+            if(curr.getBillwayStatus()<1) {
                 noCarWaybillMapper.updateByBillNum(noCarWayBill);
+            }
         }
     }
     @Override
@@ -211,7 +212,7 @@ public class NoCarBillWayServiceImpl extends ServiceImpl<NoCarWaybillMapper,NoCa
                             insertOrUpdateBillStart(noCarWayBill);
                             return;
                         }
-                        if(DateUtil.getDistanceHours(noCarWayBill.getStartTime(),DateUtil.StringToDate(noCarWayBill.getPredictEndTime()))<-96){
+                        if(DateUtil.getDistanceHours(noCarWayBill.getStartTime(),DateUtil.stringToDate(noCarWayBill.getPredictEndTime()))<-96){
                             noCarWayBill.setBillwayStatus(-2);
                             noCarWayBill.setFailReason("运单已经超时,请拆分");
                             insertOrUpdateBillStart(noCarWayBill);

+ 21 - 20
src/main/java/com/jkcredit/invoice/service/nocar/impl/NoCarRecServiceImpl.java

@@ -36,42 +36,43 @@ public class NoCarRecServiceImpl extends ServiceImpl<CustomerCarRecMapper,Custom
             customerRec = customerRecMapper.selectByCustomerNameAndCompany(customerRec);
             if(customerRec != null){
                 List<CustomerCarRec> customerCarRecs = customerCarRecMapper.selectAllEtcBySelfCarNum(customerCarRec.getCarNum());
-                CardBindQueryListToBRequest cardBindQueryListToBRequest = new CardBindQueryListToBRequest();
-                cardBindQueryListToBRequest.setPlateNum(customerCarRec.getCarNum());
-                cardBindQueryListToBRequest.setCompanyNum(customerRec.getCompanyNum());
-                RespR<CardBindQueryListToBResponse> responseRespR = selfCarInterface.cardBindQueryListToB(cardBindQueryListToBRequest);
+                CardBindQueryListToBRequest bRequest = new CardBindQueryListToBRequest();
+                bRequest.setPlateNum(customerCarRec.getCarNum());
+                bRequest.setCompanyNum(customerRec.getCompanyNum());
+                RespR<CardBindQueryListToBResponse> responseRespR = selfCarInterface.cardBindQueryListToB(bRequest);
                 if(responseRespR.getCode() !=1){
-                    List<CardBindQueryListToBModel> cardBindQueryListToBResponses = responseRespR.getData().getResult();
-                    if(cardBindQueryListToBResponses!=null && cardBindQueryListToBResponses.size()>0){
+                    List<CardBindQueryListToBModel> bModels = responseRespR.getData().getResult();
+                    if(bModels!=null && bModels.size()>0){
                         if(customerCarRecs!=null && customerCarRecs.size()>0){
                             customerCarRecs.forEach(customerCarRec1 -> {
                                 boolean has = false;
-                                for(CardBindQueryListToBModel cardBindQueryListToBModel:cardBindQueryListToBResponses){
-                                    if(cardBindQueryListToBModel.getCardId().equals(customerCarRec1.getEtcNum())){
+                                for(CardBindQueryListToBModel bModel :bModels){
+                                    if(bModel .getCardId().equals(customerCarRec1.getEtcNum())){
                                         has = true;
                                         customerCarRec1.setCompanyName(customerCarRec.getCompanyName());
-                                        if(customerCarRec1.getCompanyNum()!=null && !customerCarRec1.getCompanyNum().equals(cardBindQueryListToBModel.getCompanyNum()))
+                                        if(customerCarRec1.getCompanyNum()!=null && !customerCarRec1.getCompanyNum().equals(bModel .getCompanyNum())) {
                                             customerCarRec1.setSuccTime(DateUtil.getCurrentDateStr());
-                                        customerCarRec1.setCompanyNum(cardBindQueryListToBModel.getCompanyNum());
+                                        }
+                                        customerCarRec1.setCompanyNum(bModel .getCompanyNum());
                                         customerCarRec1.setCarNum(customerCarRec.getCarNum());
-                                        customerCarRec1.setCarColor(cardBindQueryListToBModel.getPlateColor()+"");
+                                        customerCarRec1.setCarColor(bModel .getPlateColor()+"");
                                         customerCarRec1.setRecStatus(1);
-                                        customerCarRecMapper.updateETCByPrimaryKeySelective(customerCarRec1);
+                                        customerCarRecMapper.updateEtcByPrimaryKeySelective(customerCarRec1);
                                     }
                                 }
                                 if(!has){
                                     customerCarRec1.setRecStatus(2);
-                                    customerCarRecMapper.updateETCByPrimaryKeySelective(customerCarRec1);
+                                    customerCarRecMapper.updateEtcByPrimaryKeySelective(customerCarRec1);
                                 }
                             });
                         }
 
-                        for(CardBindQueryListToBModel cardBindQueryListToBModel:cardBindQueryListToBResponses){
+                        for(CardBindQueryListToBModel bModel :bModels){
                             boolean has = false;
                             if(customerCarRecs != null && customerCarRecs.size()>0){
                                 for(CustomerCarRec customerCarRec1:customerCarRecs){
 
-                                    if(cardBindQueryListToBModel.getCardId().equals(customerCarRec1.getEtcNum())){
+                                    if(bModel .getCardId().equals(customerCarRec1.getEtcNum())){
                                         has = true;
                                     }
                                 }
@@ -80,14 +81,14 @@ public class NoCarRecServiceImpl extends ServiceImpl<CustomerCarRecMapper,Custom
                            if(!has){
                                CustomerCarRec customerCarRecDb = new CustomerCarRec();
                                customerCarRecDb.setInterType(1);
-                               customerCarRecDb.setCompanyNum(cardBindQueryListToBModel.getCompanyNum());
-                               customerCarRecDb.setCarNum(cardBindQueryListToBModel.getPlateNum());
+                               customerCarRecDb.setCompanyNum(bModel .getCompanyNum());
+                               customerCarRecDb.setCarNum(bModel .getPlateNum());
                                customerCarRecDb.setBusinessType("0");
                                customerCarRecDb.setCustomerName(customerCarRec.getCustomerName());
                                customerCarRecDb.setSuccTime(DateUtil.getCurrentDateStr());
                                customerCarRecDb.setCompanyName(customerRec.getCompanyName());
-                               customerCarRecDb.setEtcNum(cardBindQueryListToBModel.getCardId());
-                               customerCarRecDb.setCarColor(cardBindQueryListToBModel.getPlateColor()+"");
+                               customerCarRecDb.setEtcNum(bModel .getCardId());
+                               customerCarRecDb.setCarColor(bModel .getPlateColor()+"");
                                customerCarRecDb.setRecStatus(1);
                                customerCarRecMapper.insert(customerCarRecDb);
                            }
@@ -98,7 +99,7 @@ public class NoCarRecServiceImpl extends ServiceImpl<CustomerCarRecMapper,Custom
                         if(customerCarRecs!=null && customerCarRecs.size()>0){
                             customerCarRecs.forEach(customerCarRec1 -> {
                                 customerCarRec1.setRecStatus(2);
-                                customerCarRecMapper.updateETCByPrimaryKeySelective(customerCarRec1);
+                                customerCarRecMapper.updateEtcByPrimaryKeySelective(customerCarRec1);
                             });
                         }
                     }

+ 1 - 1
src/main/java/com/jkcredit/invoice/service/selfcar/impl/SelfCarServiceImpl.java

@@ -18,7 +18,7 @@ public class SelfCarServiceImpl implements SelfCarService{
     CustomerCarRecMapper customerCarRecMapper;
     @Override
     public RespR selfCarUnBind(String cardId) {
-        CustomerCarRec customerCarRec = customerCarRecMapper.selectByETC(cardId);
+        CustomerCarRec customerCarRec = customerCarRecMapper.selectByEtc(cardId);
         if(customerCarRec.getRecStatus()!=1){
             return new RespR(false,"无需解绑");
         }

+ 16 - 16
src/main/java/com/jkcredit/invoice/service/upService/SelfCarInterface.java

@@ -15,38 +15,38 @@ public interface SelfCarInterface {
 
     /**
      * 用户卡列表查询
-     * @param cardBindQueryListToBRequest
+     * @param request
      * @return
      */
-    RespR<CardBindQueryListToBResponse> cardBindQueryListToB(CardBindQueryListToBRequest cardBindQueryListToBRequest);
+    RespR<CardBindQueryListToBResponse> cardBindQueryListToB(CardBindQueryListToBRequest request);
 
     /**
      * 用户卡查询
-     * @param cardQueryCardToBRequest
+     * @param bRequest
      * @return
      */
-    RespR<CardQueryCardToBResponse> cardQueryCardToB(CardQueryCardToBRequest cardQueryCardToBRequest);
+    RespR<CardQueryCardToBResponse> cardQueryCardToB(CardQueryCardToBRequest bRequest);
 
     /**
      * 用户绑卡
-     * @param cardBindingToBRequest
+     * @param bRequest
      * @return
      */
-    RespR<CardBindingToBResponse> cardBindingToB(CardBindingToBRequest cardBindingToBRequest);
+    RespR<CardBindingToBResponse> cardBindingToB(CardBindingToBRequest bRequest);
 
     /**
      * 检验验证码
-     * @param cardValidCodeToBRequest
+     * @param request
      * @return
      */
-    RespR<CardValidCodeToBResponse> cardValidCodeToB(CardValidCodeToBRequest cardValidCodeToBRequest);
+    RespR<CardValidCodeToBResponse> cardValidCodeToB(CardValidCodeToBRequest request);
 
     /**
      * 用户卡解绑
-     * @param cardUnbindToBRequest
+     * @param request
      * @return
      */
-    RespR<CardUnbindToBResponse> cardUnbindToB(CardUnbindToBRequest cardUnbindToBRequest);
+    RespR<CardUnbindToBResponse> cardUnbindToB(CardUnbindToBRequest request);
 
     /**
      * 交易查询接口
@@ -57,24 +57,24 @@ public interface SelfCarInterface {
 
     /**
      * 申请开票接口
-     * @param b2BInvoiceApplyRequest
+     * @param request
      * @return
      */
-    RespR<B2BInvoiceApplyResponse> b2BInvoiceApply(B2BInvoiceApplyRequest b2BInvoiceApplyRequest);
+    RespR<B2BInvoiceApplyResponse> b2Binvoiceapply(B2BInvoiceApplyRequest request);
 
     /**
      * 已开发票查询接口
-     * @param b2BInvoiceQueryRequest
+     * @param request
      * @return
      */
-    RespR<B2BInvoiceQueryResponse> b2BInvoiceQuery(B2BInvoiceQueryRequest b2BInvoiceQueryRequest);
+    RespR<B2BInvoiceQueryResponse> b2Binvoicequery(B2BInvoiceQueryRequest request);
 
     /**
      * 按申请查询发票接口
-     * @param b2BInvoiceQueryByApplyRequest
+     * @param invoiceQueryByApplyRequest
      * @return
      */
-    RespR<B2BInvoiceQueryByApplyResponse> b2bContractQuery(B2BInvoiceQueryByApplyRequest b2BInvoiceQueryByApplyRequest);
+    RespR<B2BInvoiceQueryByApplyResponse> b2bContractQuery(B2BInvoiceQueryByApplyRequest invoiceQueryByApplyRequest);
 
     /**
      * 发票下载接口

+ 56 - 56
src/main/java/com/jkcredit/invoice/service/upService/impl/SelfCarInterfaceImpl.java

@@ -21,118 +21,118 @@ public class SelfCarInterfaceImpl  implements SelfCarInterface{
 
 
     @Override
-    public RespR<CardBindQueryListToBResponse> cardBindQueryListToB(CardBindQueryListToBRequest cardBindQueryListToBRequest) {
-        String fileName = cardBindQueryListToBRequest.getFilename();
+    public RespR<CardBindQueryListToBResponse> cardBindQueryListToB(CardBindQueryListToBRequest request) {
+        String fileName = request.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            log.info("SelfCarInterfaceImpl.cardBindQueryListToB请求参数:{}", cardBindQueryListToBRequest.toString());
-            CardBindQueryListToBResponse response=ETCCommHelper.upload(fileName, cardBindQueryListToBRequest, CardBindQueryListToBResponse.class);
-            log.info("SelfCarInterfaceImpl.cardBindQueryListToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardBindQueryListToBRequest.toString(),System.currentTimeMillis()-startTime);
+            log.info("SelfCarInterfaceImpl.cardBindQueryListToB请求参数:{}", request.toString());
+            CardBindQueryListToBResponse response=ETCCommHelper.upload(fileName, request, CardBindQueryListToBResponse.class);
+            log.info("SelfCarInterfaceImpl.cardBindQueryListToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), request.toString(),System.currentTimeMillis()-startTime);
 
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+cardBindQueryListToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ request.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardBindQueryListToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ request.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }
     }
 
     @Override
-    public RespR<CardQueryCardToBResponse> cardQueryCardToB(CardQueryCardToBRequest cardQueryCardToBRequest) {
-        String fileName = cardQueryCardToBRequest.getFilename();
+    public RespR<CardQueryCardToBResponse> cardQueryCardToB(CardQueryCardToBRequest bRequest) {
+        String fileName = bRequest.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
-            log.info("SelfCarInterfaceImpl.cardQueryCardToB请求参数:{}", cardQueryCardToBRequest.toString());
+            log.info("SelfCarInterfaceImpl.cardQueryCardToB请求参数:{}", bRequest.toString());
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            CardQueryCardToBResponse response=ETCCommHelper.upload(fileName, cardQueryCardToBRequest, CardQueryCardToBResponse.class);
-            log.info("SelfCarInterfaceImpl.cardQueryCardToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardQueryCardToBRequest.toString(),System.currentTimeMillis()-startTime);
+            CardQueryCardToBResponse response=ETCCommHelper.upload(fileName, bRequest, CardQueryCardToBResponse.class);
+            log.info("SelfCarInterfaceImpl.cardQueryCardToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), bRequest.toString(),System.currentTimeMillis()-startTime);
 
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+cardQueryCardToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ bRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardQueryCardToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ bRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }
     }
 
     @Override
-    public RespR<CardBindingToBResponse> cardBindingToB(CardBindingToBRequest cardBindingToBRequest) {
-        String fileName = cardBindingToBRequest.getFilename();
+    public RespR<CardBindingToBResponse> cardBindingToB(CardBindingToBRequest bRequest) {
+        String fileName = bRequest.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            log.info("SelfCarInterfaceImpl.cardBindingToB上游请求参数:{}", cardBindingToBRequest.toString());
-            CardBindingToBResponse response=ETCCommHelper.upload(fileName, cardBindingToBRequest, CardBindingToBResponse.class);
-            log.info("SelfCarInterfaceImpl.cardBindingToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardBindingToBRequest.toString(),System.currentTimeMillis()-startTime);
+            log.info("SelfCarInterfaceImpl.cardBindingToB上游请求参数:{}", bRequest.toString());
+            CardBindingToBResponse response=ETCCommHelper.upload(fileName, bRequest, CardBindingToBResponse.class);
+            log.info("SelfCarInterfaceImpl.cardBindingToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), bRequest.toString(),System.currentTimeMillis()-startTime);
 
 
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+cardBindingToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ bRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardBindingToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ bRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }
     }
 
     @Override
-    public RespR<CardValidCodeToBResponse> cardValidCodeToB(CardValidCodeToBRequest cardValidCodeToBRequest) {
-        String fileName = cardValidCodeToBRequest.getFilename();
+    public RespR<CardValidCodeToBResponse> cardValidCodeToB(CardValidCodeToBRequest request) {
+        String fileName = request.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            log.info("SelfCarInterfaceImpl.cardValidCodeToB上游请求参数:{}", cardValidCodeToBRequest.toString());
-            CardValidCodeToBResponse response=ETCCommHelper.upload(fileName, cardValidCodeToBRequest, CardValidCodeToBResponse.class);
-            log.info("SelfCarInterfaceImpl.cardValidCodeToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardValidCodeToBRequest.toString(),System.currentTimeMillis()-startTime);
+            log.info("SelfCarInterfaceImpl.cardValidCodeToB上游请求参数:{}", request.toString());
+            CardValidCodeToBResponse response=ETCCommHelper.upload(fileName, request, CardValidCodeToBResponse.class);
+            log.info("SelfCarInterfaceImpl.cardValidCodeToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), request.toString(),System.currentTimeMillis()-startTime);
 
 
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+cardValidCodeToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ request.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardValidCodeToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ request.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }
     }
 
     @Override
-    public RespR<CardUnbindToBResponse> cardUnbindToB(CardUnbindToBRequest cardUnbindToBRequest) {
-        String fileName = cardUnbindToBRequest.getFilename();
+    public RespR<CardUnbindToBResponse> cardUnbindToB(CardUnbindToBRequest request) {
+        String fileName = request.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            log.info("SelfCarInterfaceImpl.cardUnbindToB上游请求参数:{}", cardUnbindToBRequest.toString());
-            CardUnbindToBResponse response=ETCCommHelper.upload(fileName, cardUnbindToBRequest, CardUnbindToBResponse.class);
-            log.info("SelfCarInterfaceImpl.cardUnbindToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardUnbindToBRequest.toString(),System.currentTimeMillis()-startTime);
+            log.info("SelfCarInterfaceImpl.cardUnbindToB上游请求参数:{}", request.toString());
+            CardUnbindToBResponse response=ETCCommHelper.upload(fileName, request, CardUnbindToBResponse.class);
+            log.info("SelfCarInterfaceImpl.cardUnbindToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), request.toString(),System.currentTimeMillis()-startTime);
 
 
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+cardUnbindToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ request.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardUnbindToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ request.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }
@@ -163,69 +163,69 @@ public class SelfCarInterfaceImpl  implements SelfCarInterface{
     }
 
     @Override
-    public RespR<B2BInvoiceApplyResponse> b2BInvoiceApply(B2BInvoiceApplyRequest b2BInvoiceApplyRequest) {
-        String fileName = b2BInvoiceApplyRequest.getFilename();
+    public RespR<B2BInvoiceApplyResponse> b2Binvoiceapply(B2BInvoiceApplyRequest bInvoiceApplyRequest) {
+        String fileName = bInvoiceApplyRequest.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            log.info("SelfCarInterfaceImpl.b2BInvoiceApply上游请求参数:{}",  b2BInvoiceApplyRequest.toString());
-            B2BInvoiceApplyResponse response=ETCCommHelper.upload(fileName, b2BInvoiceApplyRequest, B2BInvoiceApplyResponse.class);
-            log.info("SelfCarInterfaceImpl.b2BInvoiceApply上游接口返回:{},请求参数:{},cost={}ms", response.toString(), b2BInvoiceApplyRequest.toString(),System.currentTimeMillis()-startTime);
+            log.info("SelfCarInterfaceImpl.b2BInvoiceApply上游请求参数:{}",  bInvoiceApplyRequest.toString());
+            B2BInvoiceApplyResponse response=ETCCommHelper.upload(fileName, bInvoiceApplyRequest, B2BInvoiceApplyResponse.class);
+            log.info("SelfCarInterfaceImpl.b2BInvoiceApply上游接口返回:{},请求参数:{},cost={}ms", response.toString(), bInvoiceApplyRequest.toString(),System.currentTimeMillis()-startTime);
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ bInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+b2BInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ bInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }
     }
 
     @Override
-    public RespR<B2BInvoiceQueryResponse> b2BInvoiceQuery(B2BInvoiceQueryRequest b2BInvoiceQueryRequest) {
-        String fileName = b2BInvoiceQueryRequest.getFilename();
+    public RespR<B2BInvoiceQueryResponse> b2Binvoicequery(B2BInvoiceQueryRequest bInvoiceQueryRequest) {
+        String fileName = bInvoiceQueryRequest.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
-            log.info("SelfCarInterfaceImpl.b2BInvoiceQuery上游请求参数:{}", b2BInvoiceQueryRequest.toString());
+            log.info("SelfCarInterfaceImpl.b2BInvoiceQuery上游请求参数:{}", bInvoiceQueryRequest.toString());
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            B2BInvoiceQueryResponse response=ETCCommHelper.upload(fileName, b2BInvoiceQueryRequest, B2BInvoiceQueryResponse.class);
-            log.info("SelfCarInterfaceImpl.b2BInvoiceQuery上游接口返回:{},请求参数:{},cost={}ms", response.toString(), b2BInvoiceQueryRequest.toString(),System.currentTimeMillis()-startTime);
+            B2BInvoiceQueryResponse response=ETCCommHelper.upload(fileName, bInvoiceQueryRequest, B2BInvoiceQueryResponse.class);
+            log.info("SelfCarInterfaceImpl.b2BInvoiceQuery上游接口返回:{},请求参数:{},cost={}ms", response.toString(), bInvoiceQueryRequest.toString(),System.currentTimeMillis()-startTime);
 
 
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ bInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+b2BInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ bInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }
     }
 
     @Override
-    public RespR<B2BInvoiceQueryByApplyResponse> b2bContractQuery(B2BInvoiceQueryByApplyRequest b2BInvoiceQueryByApplyRequest) {
-        String fileName = b2BInvoiceQueryByApplyRequest.getFilename();
+    public RespR<B2BInvoiceQueryByApplyResponse> b2bContractQuery(B2BInvoiceQueryByApplyRequest invoiceQueryByApplyRequest) {
+        String fileName = invoiceQueryByApplyRequest.getFilename();
         long startTime = System.currentTimeMillis();
 
         try {
             //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
-            log.info("SelfCarInterfaceImpl.b2bContractQuery上游请求参数:{}",b2BInvoiceQueryByApplyRequest.toString());
-            B2BInvoiceQueryByApplyResponse response=ETCCommHelper.upload(fileName, b2BInvoiceQueryByApplyRequest, B2BInvoiceQueryByApplyResponse.class);
-            log.info("SelfCarInterfaceImpl.b2bContractQuery上游接口返回:{},请求参数:{},cost={}ms", response.toString(), b2BInvoiceQueryByApplyRequest.toString(),System.currentTimeMillis()-startTime);
+            log.info("SelfCarInterfaceImpl.b2bContractQuery上游请求参数:{}", invoiceQueryByApplyRequest.toString());
+            B2BInvoiceQueryByApplyResponse response=ETCCommHelper.upload(fileName, invoiceQueryByApplyRequest, B2BInvoiceQueryByApplyResponse.class);
+            log.info("SelfCarInterfaceImpl.b2bContractQuery上游接口返回:{},请求参数:{},cost={}ms", response.toString(), invoiceQueryByApplyRequest.toString(),System.currentTimeMillis()-startTime);
 
             return new RespR<>(response);
         } catch (IOException e) {
-            log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(e.getMessage()+ " ,请求参数:"+ invoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             e.printStackTrace();
             return new RespR(false,"网络异常,请联系管理人员");
         }catch (ApiRequestException apie) {
-            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
+            log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+ invoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
             apie.printStackTrace();
             return new RespR(false,apie.getMessage());
         }

+ 5 - 4
src/main/java/com/jkcredit/invoice/util/Base64Util.java

@@ -1,14 +1,15 @@
 package com.jkcredit.invoice.util;
 
 import org.apache.commons.codec.binary.Base64;
+
 import java.io.*;
 
 public class Base64Util {
     public static void main(String [] args){
         //将PDF格式文件转成base64编码
-        String base64String = getPDFBinary(new File("C:\\Users\\msy\\Desktop\\服务及承诺函.pdf"));
+        String base64String = getPdfBinary(new File("C:\\Users\\msy\\Desktop\\服务及承诺函.pdf"));
         //将base64的编码转成PDF格式文件
-        base64StringToPDF(base64String);
+        base64StringToPdf(base64String);
 
     }
     public static String fileToBase64(String path) {
@@ -94,7 +95,7 @@ public class Base64Util {
      *  2.然后建立写入到ByteArrayOutputStream底层输出流对象的缓冲输出流BufferedOutputStream
      *  3.底层输出流转换成字节数组,然后由BASE64Encoder的对象对流进行编码
      * */
-    public  static String getPDFBinary(File file) {
+    public  static String getPdfBinary(File file) {
         FileInputStream fin =null;
         BufferedInputStream bin =null;
         ByteArrayOutputStream baos = null;
@@ -149,7 +150,7 @@ public class Base64Util {
      *  3.建立从底层输入流中读取数据的BufferedInputStream缓冲输出流对象;
      *  4.使用BufferedOutputStream和FileOutputSteam输出数据到指定的文件中
      */
-    public static void base64StringToPDF(String base64sString){
+    public static void base64StringToPdf(String base64sString){
         BufferedInputStream bin = null;
         FileOutputStream fout = null;
         BufferedOutputStream bout = null;

+ 5 - 4
src/main/java/com/jkcredit/invoice/util/Base64Utils.java

@@ -1,6 +1,7 @@
 package com.jkcredit.invoice.util;
 
 import org.apache.commons.lang3.StringUtils;
+
 import java.io.*;
 import java.util.Base64;
 
@@ -142,13 +143,13 @@ public class Base64Utils {
     public static void main(String args[]){
         // 1.测试:text明文 转 Base64字符串
         String text = "这是一串需要编码的明文,可以是URL、图片、文件或其他。";
-        String result_1 = Base64Utils.textToBase64Str(text);
-        System.out.println("text明文 转 Base64字符串:" + text + " → 经Base64编码后 → " + result_1);
+        String result1 = Base64Utils.textToBase64Str(text);
+        System.out.println("text明文 转 Base64字符串:" + text + " → 经Base64编码后 → " + result1);
 
         // 2.测试:text的Base64字符串 转 明文
         String base64Str = "6L+Z5piv5LiA5Liy6ZyA6KaB57yW56CB55qE5piO5paH77yM5Y+v5Lul5pivVVJM44CB5Zu+54mH44CB5paH5Lu25oiW5YW25LuW44CC";
-        String result_2 = Base64Utils.base64StrToText(base64Str);
-        System.out.println("text的Base64字符串 转 明文:" + base64Str + " → 经Base64解码后 → " + result_2);
+        String result2 = Base64Utils.base64StrToText(base64Str);
+        System.out.println("text的Base64字符串 转 明文:" + base64Str + " → 经Base64解码后 → " + result2);
 
         // 3.测试:文件 转 Base64
         // 4.测试:Base64 转 文件

+ 5 - 5
src/main/java/com/jkcredit/invoice/util/DateUtil.java

@@ -39,7 +39,7 @@ public class DateUtil {
      * @param time
      * @return
      */
-    public static Date StringToDate(String time) {
+    public static Date stringToDate(String time) {
         DateTimeFormatter format = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
         DateTime dateTime = DateTime.parse(time, format);
         Date date;
@@ -74,7 +74,7 @@ public class DateUtil {
     public static String getCurrentDateStr() {
         SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         try {
-           return   sdf2.format(new Date().getTime());
+           return   sdf2.format(System.currentTimeMillis());
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -204,7 +204,7 @@ public class DateUtil {
     public static int daysBetween(String smdate,Date bdate)
     {
 
-        long between_days = 0L;
+        long beTweenDays = 0L;
         try {
             DateTimeFormatter format = DateTimeFormat .forPattern("yyyy-MM-dd HH:mm:ss");
             DateTime dateTime = DateTime.parse(smdate, format);
@@ -217,13 +217,13 @@ public class DateUtil {
             long time1 = cal.getTimeInMillis();
             cal.setTime(bdate);
             long time2 = cal.getTimeInMillis();
-            between_days=(time1-time2)/(1000*3600*24);
+            beTweenDays=(time1-time2)/(1000*3600*24);
         }  catch (Exception e) {
         e.printStackTrace();
     }
 
 
-        return Integer.parseInt(String.valueOf(between_days));
+        return Integer.parseInt(String.valueOf(beTweenDays));
     }
 
 

+ 18 - 20
src/main/java/com/jkcredit/invoice/util/LogUtils.java

@@ -16,29 +16,29 @@ import java.security.Key;
 public class LogUtils {
 	private static final String PASSWORD_CRYPT_KEY = "3cm.xin.";
     /**
-     * @param bytes
+     * @param data
      * @return
      * @throws Exception 
      */
     public static String decode(String data) throws Exception {
     	JSONObject object = JSONObject.parseObject(data);
     	if(object.get("mobile") != null) {
-    		object.put("mobile", decryptDES(object.getString("mobile")));
+    		object.put("mobile", decryptDes(object.getString("mobile")));
     	}
     	if(object.get("name") != null) {
-    		object.put("name", decryptDES(object.getString("name")));
+    		object.put("name", decryptDes(object.getString("name")));
     	}
     	if(object.get("id_number") != null) {
-    		object.put("id_number", decryptDES(object.getString("id_number")));
+    		object.put("id_number", decryptDes(object.getString("id_number")));
     	}
     	if(object.get("idcard") != null) {
-    		object.put("idcard", decryptDES(object.getString("idcard")));
+    		object.put("idcard", decryptDes(object.getString("idcard")));
     	}
     	if(object.get("bank_card_number") != null) {
-    		object.put("bank_card_number", decryptDES(object.getString("bank_card_number")));
+    		object.put("bank_card_number", decryptDes(object.getString("bank_card_number")));
     	}
     	if(object.get("bank_no") != null) {
-    		object.put("bank_no", decryptDES(object.getString("bank_no")));
+    		object.put("bank_no", decryptDes(object.getString("bank_no")));
     	}
         return object.toString();
     }
@@ -46,7 +46,7 @@ public class LogUtils {
     /**
      * 二进制数据编码为BASE64字符串
      *
-     * @param bytes
+     * @param data
      * @return
      * @throws Exception
      */
@@ -55,22 +55,22 @@ public class LogUtils {
 			data = URLDecoder.decode(data, "utf-8");
 			JSONObject object = JSONObject.parseObject(data);
 	    	if(object.get("mobile") != null) {
-	    		object.put("mobile", encryptDES(object.getString("mobile")));
+	    		object.put("mobile", encryptDes(object.getString("mobile")));
 	    	}
 	    	if(object.get("name") != null) {
-	    		object.put("name",encryptDES(object.getString("name")));
+	    		object.put("name",encryptDes(object.getString("name")));
 	    	}
 	    	if(object.get("id_number") != null) {
-	    		object.put("id_number", encryptDES(object.getString("id_number")));
+	    		object.put("id_number", encryptDes(object.getString("id_number")));
 	    	}
 	    	if(object.get("idcard") != null) {
-	    		object.put("idcard", encryptDES(object.getString("idcard")));
+	    		object.put("idcard", encryptDes(object.getString("idcard")));
 	    	}
 	    	if(object.get("bank_card_number") != null) {
-	    		object.put("bank_card_number", encryptDES(object.getString("bank_card_number")));
+	    		object.put("bank_card_number", encryptDes(object.getString("bank_card_number")));
 	    	}
 	    	if(object.get("bank_no") != null) {
-	    		object.put("bank_no", encryptDES(object.getString("bank_no")));
+	    		object.put("bank_no", encryptDes(object.getString("bank_no")));
 	    	}
 	        return object.toString();
 		} catch (UnsupportedEncodingException e) {
@@ -82,11 +82,10 @@ public class LogUtils {
     /**
 	 * 加密数据
 	 * @param encryptString  注意:这里的数据长度只能为8的倍数
-	 * @param encryptKey
 	 * @return
 	 * @throws Exception
 	 */
-	public static String encryptDES(String encryptString) {
+	public static String encryptDes(String encryptString) {
 		try {
 			StringBuffer sb = new StringBuffer();
 			sb.append(encryptString);
@@ -108,11 +107,10 @@ public class LogUtils {
 	/***
 	 * 解密数据
 	 * @param decryptString
-	 * @param decryptKey
 	 * @return
 	 * @throws Exception
 	 */
-	public static String decryptDES(String decryptString) throws Exception {
+	public static String decryptDes(String decryptString) throws Exception {
 		SecretKeySpec key = new SecretKeySpec(getKey(PASSWORD_CRYPT_KEY), "DES");
 		Cipher cipher = Cipher.getInstance("DES/ECB/NoPadding");
 		cipher.init(Cipher.DECRYPT_MODE, key);
@@ -122,7 +120,7 @@ public class LogUtils {
 	
 	/**
 	 * 自定义一个key
-	 * @param string 
+	 * @param keyRule
 	 */
 	public static byte[] getKey(String keyRule) {
 		Key key = null;
@@ -137,7 +135,7 @@ public class LogUtils {
 		return key.getEncoded();
 	}
     public static void main(String[] args) throws Exception {
-		String a = "{\"id_number\":\"15805810769\",\"bank_card_number\":\"6214680048545055\",\"name\":\"刘玺\",\"mobile\":\"15991856264\",\"sign\":\"a93471e386fed0427c68bd6e9967011b\"}";
+		String a = "{\"id_number\":\"36042919960907151X\",\"bank_card_number\":\"6214680048545055\",\"name\":\"刘玺\",\"mobile\":\"15991856264\",\"sign\":\"a93471e386fed0427c68bd6e9967011b\"}";
 		System.out.println(encode(a));
 		//String b = "{\"sign\":\"a93471e386fed0427c68bd6e9967011b\",\"id_number\":\"NjEyMzIzMTk5MjA5MDg0ODcy\",\"name\":\"5YiY5466\",\"bank_card_number\":\"NjIxNDY4MDA0ODU0NTA1NQ==\",\"mobile\":\"MTU4NzMwNTI4MzY=\"}";
 		System.out.println(decode(encode(a))); 

+ 5 - 5
src/main/java/com/jkcredit/invoice/util/PlateCheckUtil.java

@@ -4,7 +4,7 @@ package com.jkcredit.invoice.util;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
-import java.util.regex.*;
+import java.util.regex.Pattern;
 
 /**
  * @description: 车牌颜色校验
@@ -35,9 +35,9 @@ public class PlateCheckUtil {
 
     public static boolean isNowTime(String time,Integer day) {
         //设置时间格式
-        String DATE_FORMAT_YMDHMS_WITH_T = "yyyy-MM-dd HH:mm:ss";
+        String dateformatymdhmswitht = "yyyy-MM-dd HH:mm:ss";
 
-        SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT_YMDHMS_WITH_T);
+        SimpleDateFormat format = new SimpleDateFormat(dateformatymdhmswitht);
         Date date1;
         //获取当前时间
         Date date =  new Date();
@@ -60,9 +60,9 @@ public class PlateCheckUtil {
 
     public static boolean isBefoTime(String time,Integer day) {
         //设置时间格式
-        String DATE_FORMAT_YMDHMS_WITH_T = "yyyy-MM-dd HH:mm:ss";
+        String dateformatymdhmswitht = "yyyy-MM-dd HH:mm:ss";
 
-        SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT_YMDHMS_WITH_T);
+        SimpleDateFormat format = new SimpleDateFormat(dateformatymdhmswitht);
         Date date1;
         //获取当前时间
         Date date =  new Date();

+ 0 - 202
src/main/java/com/jkcredit/invoice/util/QueryDemoScm_Test.java

@@ -1,202 +0,0 @@
-package com.jkcredit.invoice.util;
-
-import net.sf.json.JSONObject;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.PostMethod;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Iterator;
-
-/**
- * Created by zhangqingxin Date : 16/11/6 Time : 10:41
- * <p/>
- * 参考一(HttpClient):http://mvnrepository.com/artifact/commons-httpclient/commons-
- * httpclient/3.1
- * 参考一(json-lib):http://mvnrepository.com/artifact/net.sf.json-lib/json-lib/2.4
- */
-public class QueryDemoScm_Test {
-
-	/**
-	 * 测试地址
-	 */
-	//	private static final String URL = "http://110.88.150.74:80/credit?api=credit.sec.data";
-	//private static final String URL = "http://110.88.150.74/credit?api=credit.sec.data";
-	//	private static final String URL = "http://123.57.186.204/gateway?api=credit.sec.data";
-	//private static final String URL = "http://123.57.186.204/gateway?api=credit.sec.data";
-//		private static final String URL = "http://www.h11.site/gateway?api=credit.sec.data";//北京节点
-	//private static final String URL = "http://jk.h11.site/gateway?api=credit.sec.data";
-	private static final String URL = "http://110.88.150.68:8000/gateway?api=credit.sec.data";
-	//			private static final String URL = "http://110.88.150.68:8000/gateway?api=credit.sec.data_test";
-	//	private static final String URL = "http://110.88.150.72:8000/gateway?api=credit.sec.data_test";
-	//	private static final String URL = "http://60.205.114.163:8000/gateway?api=credit.sec.data";
-	//private static final String URL = " http://45.126.120.88/gateway?api=credit.sec.data_test";
-	//		private static final String URL = " http://45.126.120.88/gateway?api=credit.sec.data";
-	//	private static final String URL = " http://119.18.195.163/gateway?api=credit.sec.data"; 
-
-	/**
-	 * 分配的appKey
-	 */
-	private static final String appKey = "DATA_TEST";
-	// 	 private static final String appKey = "junxin_test";
-
-	//			  	 private static final String appKey = "DATA_TEST";
-	//private static final String appKey = "JIAO_KE";
-	//private static final String appKey = "HANGZHOU_JUNXIN_72";
-
-	/**
-	 * 290dec3f6a243889e5ed3210cf1ad499
-	 * 方法入口
-	 *
-	 * @param args
-	 */
-	public static void main(String args[]) throws Exception {
-		QueryDemoScm_Test demo = new QueryDemoScm_Test();
-		demo.runMainService();
-	}
-
-	/**
-	 * 流转字符串
-	 *
-	 * @param is
-	 * @return
-	 */
-	public static String convertStreamToString(InputStream is) {
-		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
-		StringBuilder builder = new StringBuilder();
-		String line = null;
-		try {
-			while ((line = reader.readLine()) != null) {
-				builder.append(line + "\n");
-			}
-		} catch (IOException e) {
-			e.printStackTrace();
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-		}
-		return builder.toString();
-	}
-
-	/**
-	 * 调用主接口
-	 */
-	public void runMainService() {
-		try {
-			/**
-			 *	 实名demo
-			 */
-			JSONObject paramJsonObj = initParamJsonObj_Realname();
-			String ret = postClient(URL, paramJsonObj);
-			System.out.println(ret);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 整合参数(实名认证)
-	 *
-	 * @return
-	 */
-	public JSONObject initParamJsonObj_Realname() {
-		/**
-		 *	 基本参数
-		 */
-		JSONObject paramJsonObj = new JSONObject();
-		paramJsonObj.put("api", "CMCC_REENTRYNET_QUERY_V5");//CMCC_MOBILE_CHECK_V8//CMCC_3RD_V2//CMCC_3RD_DETAIL_V1//
-		//paramJsonObj.put("api", "MSISDNMD5TOIMEI");//MOBILE_CHECK_V1//CMCC_3RD_VERIFY_V4//CTCC_CHECK_V1//CMCC_ONLINE_CHECK_V5
-		paramJsonObj.put("appKey", appKey);
-		paramJsonObj.put("appSecret",
-				//		"D78C393359BF128715C65D91C67051478A4DFC13");
-				"C41DF125F0C23FBBB83E461F5045A30ACB3FF55A");
-
-
-		/**
-		 * 	业务参数
-		 */
-		JSONObject dataJson = initMainServiceParamJsonObj_Realname();
-		paramJsonObj.put("data", dataJson);
-		return paramJsonObj;
-	}
-
-	/*
-	 * 	初始化业务参数(实名认证)
-	 *
-	 *	 姓名,身份证,手机号
-	 *
-	 * @return
-	 */
-	public JSONObject initMainServiceParamJsonObj_Realname() {
-		/**
-		 * 具体业务参数放在data中
-		 */
-		JSONObject dataJson = new JSONObject();
-	 /*     dataJson.put("id_number","45032719990321321X");
-	      dataJson.put("name","刘伟");//"id_number":"131126199009280345","name":"王聪","mobile":"18322155936"
-	      dataJson.put("mobile","18929408405");*///15201563103,,,15201563013
-		dataJson.put("mobile", "19530103205");//15201563103,,,15201563013
-		dataJson.put("date", "20221126");//15201563103,,,15201563013
-
-	     /* dataJson.put("name","3febda274935a59ce9ff44e2bd0f690aa33fe8ec2c7df3ce384ee0868126decf");
-	      dataJson.put("id_number","bdbcb76a4c74b6f7770e469d647d30ae674b9d089e1cb01615cc46e258201255");
-	      dataJson.put("mobile","54f3746ad9998989ebcb7a3444b5edb694314472cbb74a2fd6458dd64b378b02");
-	      dataJson.put("encrypt","SHA256");*/
-		//dataJson.put("bank_card_number","6253624025440494");
-          /*dataJson.put("name",MD5Util.MD5("周凤云"));
-	      dataJson.put("id_number",MD5Util.MD5("370523197112090723"));
-	      dataJson.put("mobile",MD5Util.MD5("13490329255"));*/
-		// dataJson.put("appkey","6222350107122010");
-	   /*   dataJson.put("mobileCaller","13911084965");
-	      dataJson.put("mobileCalled","13691459653");*/
-		 /* List<String> list = new ArrayList<>();
-			list.add("13752639577");
-	        dataJson.put("msisdnmd5list",list);*/
-		return dataJson;
-	}
-
-	/**
-	 * 实现http post请求 注意编码 UTF-8
-	 *
-	 * @param url
-	 * @param paramObj
-	 * @return
-	 */
-	public String postClient(String url, JSONObject paramObj) {
-		String str = "";
-		HttpClient client = null;
-		PostMethod method = null;
-		try {
-			client = new HttpClient();
-			method = new PostMethod(url);
-			method.setRequestHeader("Content-Type", "application/json;charset=utf-8");
-			NameValuePair[] param = new NameValuePair[paramObj.size()];
-			@SuppressWarnings("unchecked")
-			Iterator<String> keys = paramObj.keys();
-			int i = 0;
-			while (keys.hasNext()) {
-				String key = (String) keys.next();
-				String value = paramObj.getString(key);
-				param[i] = new NameValuePair(key, value);
-				i++;
-			}
-			method.setRequestBody(param);
-			client.executeMethod(method);
-			str = convertStreamToString(method.getResponseBodyAsStream());
-		} catch (Exception e) {
-			e.printStackTrace();
-		} finally {
-			if (method != null) {
-				method.releaseConnection();
-			}
-		}
-		return str;
-	}
-
-}

+ 0 - 270
src/main/java/com/jkcredit/invoice/util/QueryDemo_3rd.java

@@ -1,270 +0,0 @@
-package com.jkcredit.invoice.util;
-
-import net.sf.json.JSONObject;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.*;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class QueryDemo_3rd {
-
-	/**
-	 * 测试地址
-	 */
-	private static final String URL = "xxxxxx";
-
-	/**
-	 * 分配的appKey
-	 */
-	private static final String appKey = "xxxxxx";
-
-	static String filename = "/Users/mashengyi/Desktop/";
-	static String logname = "20221012.txt";
-
-	/**
-	 * 方法入口
-	 *
-	 * @param args
-	 */
-
-	public static void main(String args[]) throws Exception {
-
-		QueryDemo_3rd demo = new QueryDemo_3rd();
-		
-
-
-		int count = 0;
-		int total = 0;
-
-		HashMap hashMap = new HashMap();
-		
-		try {
-			File file = new File(filename + logname);
-			FileInputStream fis = new FileInputStream(file);
-			InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
-			LineNumberReader lr = new LineNumberReader(isr, 512);
-			String laststr = "";
-			int count_d = 0;
-			int total_d = 0;
-			while (true) {
-
-				String str = lr.readLine();
-
-				try {
-					if (str == null)
-						break;
-
-				/**	if(str.contains("18:")){
-						continue;
-					}
-					if(str.contains("requestid")|| str.contains("未解密成功")){
-						System.out.println(str);
-					}
-
-					if( str.contains("未解密成功")){
-						System.out.println(str);
-						continue;
-					}
-					String str1 = getsrt("\"msg\":\"", "\"", str);
-					System.out.println(str1);**/
-
-				String mobile = getsrt("tradeIds=[", "]},", str).trim();
-					System.out.println(mobile);
-				//String idcard = getsrt("idcard:", "name:", str).trim();
-
-				//String name = getsrt1("name:",str).trim();
-
-
-				//demo.runMainService(name,idcard,mobile);
-
-				} catch (Exception e) {
-
-					System.out.println("无法解析:" + str);
-				}
-			}
-			lr.close();
-
-		} catch (FileNotFoundException e) {
-			System.out.println("FILENAME:" + filename);
-			System.out.println("File not found");
-		} catch (IOException e) {
-			System.out.println("IO error");
-		}
-
-		Iterator it = hashMap.keySet().iterator();
-
-		while (it.hasNext()) {
-
-			String key = (String) it.next();
-			Integer ttttttt = (Integer) hashMap.get(key);
-
-			System.out.println(key + "====" + ttttttt);
-		}
-
-	}
-
-	public static String getsrt(String startkeystr, String endstr, String str) {
-		int customerindex = str.indexOf(startkeystr);
-		String temp = str.substring(customerindex + startkeystr.length());
-		int endindex = temp.indexOf(endstr);
-		String sss = temp.substring(0, endindex);
-		return sss;
-	}
-
-	public static String getsrt1(String startkeystr, String str) {
-		int customerindex = str.indexOf(startkeystr);
-		String temp = str.substring(customerindex + startkeystr.length());
-		return temp;
-	}
-
-	/**
-	 * 利用正则表达式判断字符串是否是数字
-	 * 
-	 * @param str
-	 * @return
-	 */
-	public static boolean isNumeric(String str) {
-		Pattern pattern = Pattern.compile("[0-9]*");
-		Matcher isNum = pattern.matcher(str);
-		if (!isNum.matches()) {
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * 调用主接口
-	 */
-	public void runMainService(String name,String idcard,String mobile) {
-		try {
-			/**
-			 * 实名demo
-			 */
-			if(StringUtils.isEmpty(name) || StringUtils.isEmpty(idcard) || StringUtils.isEmpty(mobile)){
-
-				System.out.println("未解密成功");
-
-			}else{
-				JSONObject paramJsonObj = initParamJsonObj_Realname(name,idcard,mobile);
-				String ret = postClient(URL, paramJsonObj);
-				System.out.println(ret);
-			}
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 整合参数(实名认证)
-	 *
-	 * @return
-	 */
-	public JSONObject initParamJsonObj_Realname(String name,String idcard,String mobile) {
-		/**
-		 * 基本参数
-		 */
-		JSONObject paramJsonObj = new JSONObject();
-		paramJsonObj.put("api", "xxxxxx");
-		paramJsonObj.put("appKey", appKey);
-		paramJsonObj.put("appSecret",
-		 "xxxxxx");
-		 
-
-		/**
-		 * 业务参数
-		 */
-		JSONObject dataJson = initMainServiceParamJsonObj_Realname(name,idcard,mobile);
-		paramJsonObj.put("data", dataJson);
-		return paramJsonObj;
-	}
-
-	/*
-	 * 初始化业务参数(实名认证)
-	 *
-	 * 姓名,身份证,手机号
-	 *
-	 * @return
-	 */
-	public JSONObject initMainServiceParamJsonObj_Realname(String name,String idcard,String mobile) {
-		/**
-		 * 具体业务参数放在data中
-		 */
-		JSONObject dataJson = new JSONObject();
-		dataJson.put("name", name);
-		dataJson.put("id_number", idcard);
-		dataJson.put("mobile", mobile);
-		dataJson.put("encrypt", "SHA256");
-		return dataJson;
-	}
-
-	/**
-	 * 实现http post请求 注意编码 UTF-8
-	 *
-	 * @param url
-	 * @param paramObj
-	 * @return
-	 */
-	public String postClient(String url, JSONObject paramObj) {
-		String str = "";
-		HttpClient client = null;
-		PostMethod method = null;
-		try {
-			client = new HttpClient();
-			method = new PostMethod(url);
-			method.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
-			NameValuePair[] param = new NameValuePair[paramObj.size()];
-			Iterator<String> keys = paramObj.keys();
-			int i = 0;
-			while (keys.hasNext()) {
-				String key = (String) keys.next();
-				String value = paramObj.getString(key);
-				param[i] = new NameValuePair(key, value);
-				i++;
-			}
-			method.setRequestBody(param);
-			client.executeMethod(method);
-			str = convertStreamToString(method.getResponseBodyAsStream());
-		} catch (Exception e) {
-			e.printStackTrace();
-		} finally {
-			if (method != null) {
-				method.releaseConnection();
-			}
-		}
-		return str;
-	}
-
-	/**
-	 * 流转字符串
-	 *
-	 * @param is
-	 * @return
-	 */
-	public static String convertStreamToString(InputStream is) {
-		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
-		StringBuilder builder = new StringBuilder();
-		String line = null;
-		try {
-			while ((line = reader.readLine()) != null) {
-				builder.append(line + "\n");
-			}
-		} catch (IOException e) {
-			e.printStackTrace();
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-		}
-		return builder.toString();
-	}
-
-}

+ 13 - 10
src/main/java/com/jkcredit/invoice/util/QueryDemo_Test.java

@@ -8,6 +8,9 @@ import org.apache.commons.httpclient.methods.PostMethod;
 import java.io.*;
 import java.util.Iterator;
 
+/**
+ * @author mashengyi
+ */
 public class QueryDemo_Test {
 
     /**
@@ -18,17 +21,17 @@ public class QueryDemo_Test {
     /**
      * 分配的appKey
      */
-    private static final String appKey = "jkxy";
+    private static final String APP_KEY = "jkxy";
 
     /**
      * 分配的appSecret
      */
-    private static final String appSecret = "7697CE9BB9D5A856CFDDE738320AD34EA53E483C";
+    private static final String APP_SECRET = "7697CE9BB9D5A856CFDDE738320AD34EA53E483C";
 
     /**
      * 企业编号
      */
-    private static final String companyNum = "10004616";
+    private static final String COMPANY_NUM = "10004616";
 
     /**
      * 方法入口
@@ -48,7 +51,7 @@ public class QueryDemo_Test {
             /**
              * 实名demo
              */
-            JSONObject paramJsonObj = initParamJsonObj_Realname();
+            JSONObject paramJsonObj = initParamJsonObjRealname();
             String ret = postClient(URL, paramJsonObj);
             System.out.println(ret);
         } catch (Exception e) {
@@ -61,30 +64,30 @@ public class QueryDemo_Test {
      *
      * @return
      */
-    public JSONObject initParamJsonObj_Realname() {
+    public JSONObject initParamJsonObjRealname() {
         /**
          * 基本参数
          */
         JSONObject paramJsonObj = new JSONObject();
         paramJsonObj.put("api", "PROTOCOL_ADD_V1");//CMCC_MOBILE_CHECK_V8//CMCC_3RD_V2//CMCC_3RD_DETAIL_V1//
-        paramJsonObj.put("appKey", appKey);
-        paramJsonObj.put("appSecret", appSecret);
+        paramJsonObj.put("appKey", APP_KEY);
+        paramJsonObj.put("appSecret", APP_SECRET);
 
 
         /**
          * 业务参数
          */
-        JSONObject dataJson = initMainServiceParamJsonObj_Realname();
+        JSONObject dataJson = initMainServiceParamJsonObjRealname();
         paramJsonObj.put("data", dataJson);
         return paramJsonObj;
     }
 
-    public JSONObject initMainServiceParamJsonObj_Realname() {
+    public JSONObject initMainServiceParamJsonObjRealname() {
         /**
          * 具体业务参数放在data中
          */
         JSONObject dataJson = new JSONObject();
-        dataJson.put("companyNum", companyNum);
+        dataJson.put("companyNum", COMPANY_NUM);
         dataJson.put("serviceStartTime", "2022-05-11T17:30:37");
         dataJson.put("serviceEndTime", "2023-05-11T21:30:37");
         dataJson.put("contractFileName", "etc高速开票抵扣(1).pdf");

+ 0 - 788
src/main/java/com/jkcredit/invoice/util/QueryDemo_Test1.java

@@ -1,788 +0,0 @@
-package com.jkcredit.invoice.util;
-
-import net.sf.json.JSONObject;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.PostMethod;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Iterator;
-
-/**
- * Created by zhangqingxin Date : 16/11/6 Time : 10:41
- * <p/>
- * 参考一(HttpClient):http://mvnrepository.com/artifact/commons-httpclient/commons-
- * httpclient/3.1
- * 参考一(json-lib):http://mvnrepository.com/artifact/net.sf.json-lib/json-lib/2.4
- */
-public class QueryDemo_Test1 {
-
-	/**
-	 * 测试地址
-	 */
-          private static final String URL = "http://etc.jkcredit.com:9999/api/rest";
-
-	 	//private static final String URL = "http://110.88.150.74:80/credit?api=credit.sec.data_test";
-	  	//private static final String URL = "http://110.88.150.74/credit?api=credit.sec.data";
-		//private static final String URL = "http://123.57.186.204/gateway?api=credit.sec.data_test";
-		//private static final String URL = "http://123.57.186.204/gateway?api=credit.sec.data";
-	//	private static final String URL = "http://www1.h11.site/gateway?api=credit.sec.data";
-	//	private static final String URL = "http://110.88.150.68:8000/gateway?api=credit.sec.data";
-		//private static final String URL = "http://60.205.114.163:8000/gateway?api=credit.sec.data";
-	 	//private static final String URL = " http://45.126.120.88/gateway?api=credit.sec.data";
-		//private static final String URL = "http://119.18.195.163/gateway?api=credit.sec.data";
-
-	/**
-	 * 分配的appKey
-	 */
-	 	//private static final String appKey = "junxin_test";
-	
-		private static final String appKey = "jkxy";
-	 	//private static final String appKey = "ccx";
-
-	/**
-	 * 方法入口
-	 *
-	 * @param args
-	 */
-	public static void main(String args[]) throws Exception {
-		   QueryDemo_Test1 demo = new QueryDemo_Test1();
-		demo.runMainService();
-	}
-
-	/**
-	 * 调用主接口
-	 */
-	public void runMainService() {
-		try {
-			/**
-			 * 实名demo
-			 */
-			String [] nums = {"14544320210817174055174351",
-					"15746720210603163810307732",
-					"17564520210616212558329392",
-					"15475020210618230116458605",
-					"17342720210619121557553685",
-					"18580220210620170324929529",
-					"18581420210620170801831350",
-					"19286320210620184340772547",
-					"17301120210622084627648971",
-					"17301120210626184058244614",
-					"19476320210628102707277985",
-					"19294620210711134508428681",
-					"19294620210722173421872934",
-					"12530220210723185407400778",
-					"18181320210725130602816587",
-					"18349620210514181815378615",
-					"18483120210519123330138259",
-					"18580220210523105515480101",
-					"18581420210523110815512986",
-					"18660420210525205840566639",
-					"18854420210602234426050681",
-					"18877220210604075554300846",
-					"18960320210607102826880076",
-					"18967320210607131740713337",
-					"19064620210611151514046749",
-					"17319220210618140552584944",
-					"18877220210619164700564900",
-					"17350420210702185144239229",
-					"18584520210708191107842215",
-					"14544320210709094121284904",
-					"17350420210711110311274488",
-					"19941320210716185022412037",
-					"17909020210717123533878348",
-					"17135720210803114801675533",
-					"18854420210803115620736148",
-					"010022022600110025",
-					"010022022600110023",
-					"010022022600110022",
-					"010022022800040003",
-					"010022022600090011",
-					"010022022600090010",
-					"010022030100010006",
-					"010022030200080005",
-					"010022030200080004",
-					"010022030200040028",
-					"010022030200040023",
-					"010022030200040021",
-					"010022030200040020",
-					"010022030200040019",
-					"010022030200040018",
-					"010022030200040017",
-					"010022030200040016",
-					"010022030200040015",
-					"010022030200040014",
-					"010022030200040013",
-					"010022030200040012",
-					"010022030200040011",
-					"010022030200040010",
-					"010022030200040009",
-					"010022030200040008",
-					"010022030200040007",
-					"010022030200040006",
-					"010022030200040005",
-					"010022030200040004",
-					"010022030200040003",
-					"010022030200040002",
-					"010022030200040001",
-					"010022030200010002",
-					"010022030200040046",
-					"010022030200040043",
-					"010022030200040042",
-					"010022030200040041",
-					"010022030200040040",
-					"010022030200040038",
-					"010022030200040037",
-					"010022030200040035",
-					"010022030200040049",
-					"040022030300040001",
-					"010022030500010003",
-					"010022030500010002",
-					"010022030300040035",
-					"010022022200110020",
-					"20220116003553814_121_26_1775",
-					"20220116105353975_864_26_5992",
-					"20220126150806910_499_481_74",
-					"20220221163806778_151_293_449",
-					"20220421092312119_105_488_1631",
-					"20220421092312119_105_488_546",
-					"20220421092312119_105_488_1047",
-					"20220421092312119_105_488_1881",
-					"20220421092312119_105_488_297",
-					"20220421092312119_105_488_1928",
-					"20220421092312119_105_488_4197",
-					"20220421092312119_105_488_3699",
-					"20220421092312119_105_488_3290",
-					"20220421092312119_105_488_2160",
-					"20220421092312119_105_488_2540",
-					"20220421092312119_105_488_3350",
-					"20220421092312119_105_488_3847",
-					"20220421092312119_105_488_3421",
-					"20220421092312119_105_488_2674",
-					"20220421092312119_105_488_3947",
-					"20220421092312119_105_488_3174",
-					"20220421113541157_735_488_1242",
-					"20220421113541157_735_488_86",
-					"20220421113541157_735_488_1370",
-					"20220421113541157_735_488_620",
-					"20220421113541157_735_488_242",
-					"20220421113541157_735_488_1432",
-					"20220421113541157_735_488_336",
-					"20220421113541157_735_488_742",
-					"20220421113541157_735_488_1995",
-					"20220422132221708_379_20_11",
-					"20220423112108929_223_576_234",
-					"20220423112108929_223_576_273",
-					"20220423112108929_223_576_8478",
-					"20220424150801877_821_111_30",
-					"20220424183815184_278_464_667",
-					"20220425101529108_759_36_241",
-					"20220425174353393_54_537_112",
-					"20220425174353393_54_537_122",
-					"20220426120622693_788_25_852",
-					"20220426120622693_788_25_230",
-					"20220426120622693_788_25_257",
-					"20220426120622693_788_25_269",
-					"20220426120622693_788_25_307",
-					"20220426120622693_788_25_308",
-					"20220426120622693_788_25_387",
-					"20220426121647334_843_551_232",
-					"20220426141221182_818_606_555",
-					"20220426141221182_818_606_170",
-					"20220426141221182_818_606_659",
-					"20220426152937872_158_551_133",
-					"20211223Y112739",
-					"20220426164211998_35_437_223",
-					"20220426164211998_35_437_260",
-					"20220426173804598_654_606_34",
-					"20220426173804598_654_606_144",
-					"20220426173804598_654_606_149",
-					"20220426180448041_858_380_126",
-					"20220426180448041_858_380_151",
-					"20220426180448041_858_380_152",
-					"20220426180448041_858_380_174",
-					"20220426180448041_858_380_182",
-					"20220426180448041_858_380_183",
-					"20220426180448041_858_380_184",
-					"20220426185802991_775_245_1568",
-					"20220426185802991_775_245_1088",
-					"20220426185802991_775_245_1153",
-					"20220426185802991_775_245_391",
-					"20220426185802991_775_245_1407",
-					"20220426211122890_503_442_40",
-					"20220426222245804_520_245_125",
-					"20220426222245804_520_245_490",
-					"20220427064809234_938_437_17",
-					"20220427070016687_372_245_891",
-					"20220427070016687_372_245_141",
-					"20220427070016687_372_245_1389",
-					"20220427070016687_372_245_1008",
-					"20220427070016687_372_245_1141",
-					"20220427112244576_92_162_1818",
-					"20220427112244576_92_162_1909",
-					"20220427112244576_92_162_2818",
-					"20220427112244576_92_162_2068",
-					"20220427112244576_92_162_2159",
-					"20220427112244576_92_162_2568",
-					"20220427112244576_92_162_3409",
-					"20220427112244576_92_162_2659",
-					"20220427112244576_92_162_2318",
-					"20220427125914886_38_346_129",
-					"20220427125914886_38_346_1297",
-					"20220427125914886_38_346_629",
-					"20220427125914886_38_346_644",
-					"20220427125914886_38_346_1379",
-					"20220427125914886_38_346_1129",
-					"20220427125914886_38_346_394",
-					"20220427125914886_38_346_3404",
-					"20220427125914886_38_346_3499",
-					"20220427125914886_38_346_3500",
-					"20220427125914886_38_346_2803",
-					"20220427125914886_38_346_3149",
-					"20220427133830507_915_293_1219",
-					"20220427133830507_915_293_1234",
-					"20220427133830507_915_293_862",
-					"20220427133830507_915_293_469",
-					"20220427133830507_915_293_969",
-					"20220427133830507_915_293_984",
-					"20220427133830507_915_293_219",
-					"20220427133830507_915_293_1469",
-					"20220427133830507_915_293_719",
-					"20220427135310565_574_162_907",
-					"20220427135310565_574_162_65",
-					"20220427152140335_557_171_53",
-					"20220427152140335_557_171_54",
-					"20220427152140335_557_171_1257",
-					"20220427152140335_557_171_492",
-					"20220427152140335_557_171_507",
-					"20220427152140335_557_171_553",
-					"20220427152140335_557_171_554",
-					"20220427152140335_557_171_1007",
-					"20220427152140335_557_171_257",
-					"20220427152140335_557_171_1053",
-					"20220427152140335_557_171_1054",
-					"20220427152140335_557_171_303",
-					"20220427152140335_557_171_304",
-					"20220427152140335_557_171_803",
-					"20220427152140335_557_171_804",
-					"20211227Y140004",
-					"20211227Y140009",
-					"20220427163217323_461_26_1798",
-					"20220427164459768_615_346_815",
-					"20220427164459768_615_346_548",
-					"20220427175119436_124_293_156",
-					"20220427181915303_715_171_1639",
-					"20220427181915303_715_171_83",
-					"20220427181915303_715_171_715",
-					"20220427192322708_434_26_867",
-					"20220427205134006_857_162_42",
-					"20220427212140420_610_171_490",
-					"20220427212140420_610_171_950",
-					"20220427212140420_610_171_990",
-					"20220427212140420_610_171_200",
-					"20220427212140420_610_171_240",
-					"20220427213955296_51_26_169",
-					"20220427232654140_493_346_140",
-					"20220428104545436_944_30_275",
-					"20220428111030588_505_245_151",
-					"20220428114109946_655_31_42",
-					"20220428114109946_655_31_43",
-					"20220428114109946_655_31_45",
-					"20220428114109946_655_31_47",
-					"20220428114109946_655_31_852",
-					"20220428114109946_655_31_621",
-					"20220428114109946_655_31_622",
-					"20220428114109946_655_31_623",
-					"20220428114109946_655_31_700",
-					"20220428114109946_655_31_719",
-					"20220428114109946_655_31_395",
-					"20220428114109946_655_31_3209",
-					"20220428114109946_655_31_3217",
-					"20220428114109946_655_31_3198",
-					"20211227Y150490",
-					"20211228Y163983",
-					"20211228Y168516",
-					"20211228Y168525",
-					"1520057819993886722-1",
-					"010022050500010026",
-					"HYD2021040746-1",
-					"HYD2021060551",
-					"HYD2021060284-1",
-					"HYD2021070647",
-					"HYD2021070133-1",
-					"2518320210603164316941959",
-					"2099820210620144426958229",
-					"780620210620151202037819",
-					"5045720210620160939995356",
-					"5820720210621122700646978",
-					"9158620210625150302255876",
-					"4383620210602144755789868",
-					"8550120210624130100178989",
-					"707720210714135103666468",
-					"2879020210716111738793576",
-					"8550120210724091644520762",
-					"2363520210728073321412179",
-					"YD2020072601038",
-					"YD2020071500075",
-					"CK0075689",
-					"CK0080070",
-					"AAE1928901654",
-					"F20220522144611692800",
-					"F20220522145439419264",
-					"F20220522145439171904",
-					"F20220522151527673728",
-					"F20220522151527897216",
-					"Y1122201100090",
-					"Y222207190051",
-					"Y1012207190020",
-					"Y1012207200059",
-					"Y1012207220033",
-					"hcd00126_YD2207220436",
-					"Y642112130086",
-					"Y1122201250082",
-					"Y642201240081",
-					"Y642201250006",
-					"4642132442216426950",
-					"Y642201270096",
-					"Y642201260091",
-					"Y642201260047",
-					"KHY944147183385583616",
-					"Y1122203040139",
-					"F20220310173405942208",
-					"F20220310173405964928",
-					"Y222112300083",
-					"Y642201080103",
-					"Y642201100058",
-					"KHY933436489367998464",
-					"Y602201080276",
-					"Y602109010679",
-					"Y602109050826",
-					"Y602109040850",
-					"Y602105241985",
-					"Y602106042098",
-					"Y602105151662",
-					"Y602107041351",
-					"Y602107081573",
-					"Y602106240981",
-					"Y20220317094449952320",
-					"F20220319111440295232",
-					"F20220321183814302336",
-					"F20220321183755005376",
-					"F20220321183758454144",
-					"F20220321183819195328",
-					"F20220321183740875136",
-					"F20220321183741752960",
-					"F20220321183737883904",
-					"F20220321183825099776",
-					"F20220321183733382720",
-					"F20220321183733360448",
-					"F20220321183747013632",
-					"F20220321183815532032",
-					"F20220321183806194624",
-					"F20220321183805668672",
-					"F20220321183750469312",
-					"F20220321183819583232",
-					"F20220321183731497792",
-					"F20220321183735135168",
-					"F20220321183744564864",
-					"F20220321183800189568",
-					"F20220321183821473216",
-					"F20220321183801599744",
-					"F20220321183758937152",
-					"F20220321183815468160",
-					"F20220321183808548544",
-					"Y20220323211000401088",
-					"Y20220325022803086464",
-					"F20220402095634262400",
-					"F20220402123148855424",
-					"F20220402095636984000",
-					"ZZBX0500210804112400031058",
-					"ZZBX0500210804112400031042",
-					"ZZBX0500210804112400031034",
-					"ZZBX0500210823165300011807",
-					"KHY955850817578668032",
-					"2120009300016193567",
-					"Y20220411230152198528",
-					"F20220411135445135808",
-					"F20220411135445459200",
-					"F20220411135445564864",
-					"Y302204110032",
-					"F20220412095347381376",
-					"Y20220417152736131456",
-					"Y302201050016",
-					"Y20220420102310968640",
-					"F20220420160435883904",
-					"YH17002203312026007100001",
-					"WLWL17002203231511001000001",
-					"JY08002202241638005600015",
-					"JY08002202241638005600010",
-					"JY08002202241638005600006",
-					"JY08002202241638005600019",
-					"JY08002202241638005600014",
-					"JY08002202241638005600020",
-					"JY08002202241638005600007",
-					"JY08002202241638005600025",
-					"JY08002202241638005600023",
-					"JY08002202241638005600004",
-					"JY08002202241638005600012",
-					"JY08002202241638005600024",
-					"JY08002202241638005600001",
-					"JY08002202241638005600022",
-					"JY08002202241638005600017",
-					"JY08002202241638005600018",
-					"JY08002202241638005600005",
-					"JY08002202241638005600013",
-					"JY08002202241638005600002",
-					"JY08002201161949012800004",
-					"JY08002110111141000100031",
-					"20220428114109946_655_31_964",
-					"20220428142922333_386_245_82",
-					"20220428145504205_358_30_162",
-					"20220428145504205_358_30_226",
-					"20220428150853048_843_31_1719",
-					"20220428150853048_843_31_516",
-					"20220428150853048_843_31_1803",
-					"20220428150853048_843_31_1393",
-					"20220428150853048_843_31_316",
-					"20220428150853048_843_31_2469",
-					"20220428150853048_843_31_2074",
-					"20220428150853048_843_31_2539",
-					"20220428150853048_843_31_2553",
-					"20220428154152249_763_571_123",
-					"20220428154152249_763_571_314",
-					"20220428154152249_763_571_373",
-					"20220428174559428_111_13_101",
-					"20220428175413824_88_31_966",
-					"20220428205229521_353_571_30",
-					"20220428205650901_847_123_956",
-					"20220428205650901_847_123_1565",
-					"20220428205650901_847_123_318",
-					"Y302204230013",
-					"20220428205650901_847_123_5664",
-					"20220428205650901_847_123_4835",
-					"20220428205650901_847_123_4107",
-					"20220428205650901_847_123_5414",
-					"20220428205650901_847_123_4614",
-					"20220428205650901_847_123_5182",
-					"20220428205650901_847_123_5585",
-					"20220428205650901_847_123_5587",
-					"20220428205650901_847_123_2493",
-					"20220428231656067_505_123_900",
-					"20220428231656067_505_123_226",
-					"20220428231656067_505_123_1415",
-					"20220428231656067_505_123_263",
-					"20220428231656067_505_123_4016",
-					"20220428231656067_505_123_4017",
-					"20220428231656067_505_123_2898",
-					"20220428231656067_505_123_3766",
-					"20220428231656067_505_123_3812",
-					"20220428231656067_505_123_3562",
-					"20220428231656067_505_123_3563",
-					"20220429011720476_156_123_496",
-					"20220429011720476_156_123_246",
-					"20220429011720476_156_123_762",
-					"20220429081717883_261_123_84",
-					"20220429133412201_902_592_255",
-					"Y692202220004",
-					"TN17002204161500000600001",
-					"YH17002203302207006700001",
-					"KHY971778995231334400",
-					"KHY971779383304069120",
-					"KHY971779728591757312",
-					"KHY971779850970013696",
-					"KHY971779981127655424",
-					"KHY971778759187439616",
-					"KHY971779603978985472",
-					"KHY971780678267117568",
-					"KHY971779255047495680",
-					"KHY971780110034345984",
-					"KHY971780450678939648",
-					"KHY971780568879669248",
-					"Y20220423194914140864",
-					"KHY970756523233058816",
-					"KHY973233309393035264",
-					"20220528112952045_548_481_516",
-					"KHY974261830388166656",
-					"KHY974261954132717568",
-					"KHY974261700125667328",
-					"KHY971784864097574912",
-					"KHY971785204570202112",
-					"KHY971785744242909184",
-					"KHY972224225051090944",
-					"Y20220506093431707264",
-					"Y20220506095254342080",
-					"Y20220506100845385728",
-					"Y20220506101234990912",
-					"YH17002205131616002900001",
-					"WLWL17002205121358000800001",
-					"Y20220506103546479424",
-					"YH17002205122038006600001",
-					"Y20220506104116554752",
-					"YH17002205121621003300001",
-					"Y20220506110049541440",
-					"YH17002205121603002200001",
-					"Y20220506112105305344",
-					"YH17002205121603002300001",
-					"Y20220506113648344128",
-					"YH17002205121619002700001",
-					"Y20220506113902178304",
-					"YH17002205111842006700001",
-					"KHY972506808824569856",
-					"WLWL17002205161549001700001",
-					"WLWL17002205161331001100001",
-					"F20220507184904513664",
-					"KHY972923526868836352",
-					"KHY973157730522177536",
-					"C20220509110305992064",
-					"KHY973620572514824192",
-					"Y20220510095232112384",
-					"Y20220510095233083904",
-					"F20220510125307578880",
-					"C20220510131021083904",
-					"KHY974058126074589184",
-					"Y20220511072752809920",
-					"KHY974265865941954560",
-					"KHY974266191688380416",
-					"KHY974368509965307904",
-					"C20220512144001268096",
-					"C20220512122137920640",
-					"F20220512141231764928",
-					"hcd00224_YD2206280009",
-					"Y20220512113954913024",
-					"TT2022050811345918691224",
-					"Y20220512113955385728",
-					"KHY996111148375117824",
-					"KHY1002005929954324480",
-					"KHY1002005933636923392",
-					"KHY1001449952856457216",
-					"KHY997890747627941888",
-					"KHY974731605526589440",
-					"KHY997891939642064896",
-					"C20220513121014778240",
-					"Y722206061330",
-					"Y722206061583",
-					"Y722206070065",
-					"Y722206070326",
-					"Y722206071327",
-					"Y722206080147",
-					"Y722206080240",
-					"Y722206080251",
-					"Y722206080431",
-					"Y722206080624",
-					"Y722206080637",
-					"KHY974991715024908288",
-					"Y722206080652",
-					"KHY975082002652999680",
-					"Y722206080657",
-					"KHY975099768084770816",
-					"Y722206080655",
-					"Y722206080685",
-					"Y722206080773",
-					"Y722206090583",
-					"Y722206090794",
-					"Y722206091375",
-					"Y722206091444",
-					"Y722206091440",
-					"Y722206100094",
-					"Y722206100117",
-					"Y722206100522",
-					"Y722206110603",
-					"Y722206110608",
-					"Y722206110670",
-					"Y722206120758",
-					"KHY1002136203220430848",
-					"KHY996094177748017152",
-					"KHY996350730890940416",
-					"Y20220515160620791552",
-					"24000706115045715",
-					"KHY996108640144416768",
-					"Y20220516200555039616",
-					"KHY996820846300663808",
-					"KHY996108640047947776",
-					"Y482207070059",
-					"20220728152152447_80_171_834",
-					"20220728152152447_80_171_1768",
-					"20220728152152447_80_171_972",
-					"20220728152152447_80_171_1100",
-					"20220728152152447_80_171_712",
-					"20220728152152447_80_171_2449",
-					"20220728152152447_80_171_2122",
-					"20220728152452761_82_620_109",
-					"20220728152152447_80_171_2318",
-					"KHY1002243682463072256",
-					"KHY996108639778672640",
-					"20220728161528492_474_437_112",
-					"20220728161528492_474_437_221",
-					"KHY1000436725375512576",
-					"Y642207080120",
-					"20220728170609277_303_165_134",
-					"20220728170609277_303_165_245",
-					"20220728172101706_622_123_458",
-					"20220728172101706_622_123_34",
-					"20220728172101706_622_123_47",
-					"20220728172101706_622_123_561",
-					"20220728172101706_622_123_119",
-					"20220728172101706_622_123_180",
-					"20220728172101706_622_123_278",
-					"KHY1001822171699556352",
-					"20220728190144626_191_568_1200",
-					"20220728190144626_191_568_562",
-					"20220728190144626_191_568_1056",
-					"20220728190144626_191_568_315",
-					"20220728190144626_191_568_1123",
-					"20220728190144626_191_568_1148",
-					"KHY996730235674255361",
-					"20220728222209818_709_171_146",
-					"KHY998917121877950464",
-					"KHY1001857565876240384",
-					"KHY996819169992544256",
-					"KHY996711055780569088",
-					"KHY999331855813783552",
-					"KHY1001847233120256000",
-					"KHY999757633240117248",
-					"KHY997112580943417344",
-					"KHY1001790602881744896",
-					"Y482207080048",
-					"Y482207080059",
-					"Y482207090036",
-					"KHY996717661717094400",
-					"KHY997154999709765632",
-					"KHY1000434595436638208",
-					"Y20220516010659731392",
-					"Y20220516010700621824",
-					"Y20220519004041327616"
-			};
-			for(int i=0;i<nums.length;i++){
-				JSONObject paramJsonObj = initParamJsonObj_Realname(nums[i]);
-				String ret = postClient(URL, paramJsonObj);
-				System.out.println(ret);
-			}
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 整合参数(实名认证)
-	 *
-	 * @return
-	 */
-	public JSONObject initParamJsonObj_Realname(String num) {
-		/**
-		 * 基本参数
-		 */
-		JSONObject paramJsonObj = new JSONObject();
-		paramJsonObj.put("api", "WAY_BILL_NUM_FIND_OWNER_INVOICE");//CTCC_3RD_DETAIL_V11//CTCC_STATUS_CHECK_V11//CUCC_STATUS_CHECK_V11//CMCC_3RD_DETAIL_V15//CMCC_3RD_V2//CTCC_3RD_DETAIL_V11//
-		 //paramJsonObj.put("api", "MSISDNMD5TOIMEI");//MOBILE_CHECK_V1//CMCC_3RD_VERIFY_V4//CTCC_CHECK_V1
-		paramJsonObj.put("appKey", appKey);
-	    paramJsonObj.put("appSecret",
-		"7697CE9BB9D5A856CFDDE738320AD34EA53E483C");
-		//"84C1CE24EDF361F28072E313BD87EAB24CC727CF");
-
-	   
-
-		/**
-		 * 业务参数
-		 */
-		JSONObject dataJson = new JSONObject();
-		dataJson.put("num",num);
-		paramJsonObj.put("data", dataJson);
-		return paramJsonObj;
-	}
-
-	/*
-	 * 初始化业务参数(实名认证)
-	 *
-	 * 姓名,身份证,手机号
-	 *
-	 * @return
-	 */
-	public JSONObject initMainServiceParamJsonObj_Realname() {
-		/**
-		 * 具体业务参数放在data中
-		 */
-		  JSONObject dataJson = new JSONObject();
-        	/*   dataJson.put("name", "王同");
-	      dataJson.put("id_number","371081198911276112");
-	      dataJson.put("mobile","15562139518");*/
-		   /*dataJson.put("taxplayerCode", "91149900MA0LBCKM6F");
-	       dataJson.put("month", "2022-04");
-		  dataJson.put("pageNo", 4);
-		  dataJson.put("pageSize",10);*/ //没有就默认1000
-
-		 /* List<String> list = new ArrayList<>();
-			list.add("13752639577");
-	        dataJson.put("msisdnmd5list",list);*/
-		 dataJson.put("num","");
-		  return dataJson;
-	}
-
-	/**
-	 * 实现http post请求 注意编码 UTF-8
-	 *
-	 * @param url
-	 * @param paramObj
-	 * @return
-	 */
-	public String postClient(String url, JSONObject paramObj) {
-		String str = "";
-		HttpClient client = null;
-		PostMethod method = null;
-		try {
-			client = new HttpClient();
-			method = new PostMethod(url);
-			method.setRequestHeader("Content-Type", "application/json;charset=utf-8");
-			NameValuePair[] param = new NameValuePair[paramObj.size()];
-			@SuppressWarnings("unchecked")
-			Iterator<String> keys = paramObj.keys();
-			int i = 0;
-			while (keys.hasNext()) {
-				String key = (String) keys.next();
-				String value = paramObj.getString(key);
-				param[i] = new NameValuePair(key, value);
-				i++;
-			}
-			method.setRequestBody(param);
-			client.executeMethod(method);
-			str = convertStreamToString(method.getResponseBodyAsStream());
-		} catch (Exception e) {
-			e.printStackTrace();
-		} finally {
-			if (method != null) {
-				method.releaseConnection();
-			}
-		}
-		return str;
-	}
-
-	/**
-	 * 流转字符串
-	 *
-	 * @param is
-	 * @return
-	 */
-	public static String convertStreamToString(InputStream is) {
-		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
-		StringBuilder builder = new StringBuilder();
-		String line = null;
-		try {
-			while ((line = reader.readLine()) != null) {
-				builder.append(line + "\n");
-			}
-		} catch (IOException e) {
-			e.printStackTrace();
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-		}
-		return builder.toString();
-	}
-
-}

+ 9 - 33
src/main/java/com/jkcredit/invoice/util/WordUtil.java

@@ -1,52 +1,28 @@
 package com.jkcredit.invoice.util;
 
-import java.io.*;
-import java.util.HashMap;
-import java.util.Map;
-
 import freemarker.template.Configuration;
 import freemarker.template.Template;
 
-import javax.servlet.http.HttpServletResponse;
-
-public class WordUtil {
-    public static void main(String [] args){
-       /* try {
-            testExportSimpleWord();
-        }catch (Exception e){
+import java.io.*;
+import java.util.Map;
 
-        }*/
 
-    }
-    public static void ExportSimpleWord(Map<String,String> dataMap, String path, OutputStream outputStream) throws Exception {
-// 要填充的数据, 注意map的key要和word中${xxx}的xxx一致
-        /*Map<String, String> dataMap = new HashMap();
-        dataMap.put("a", "葛慧");
-        dataMap.put("b", "胡扬浩");
-        dataMap.put("c", "1234567890");
-        dataMap.put("d", "物资学院3号院");
-        dataMap.put("e", "17600977243");
-        dataMap.put("f", "工商银行物资学院支行");
-        dataMap.put("g", "2123123123123123");
-        dataMap.put("h", "08");
-        dataMap.put("i", "08");*/
-// Configuration用于读取ftl文件
+public class WordUtil {
+    public static void exportSimpleWord(Map<String,String> dataMap, String path, OutputStream outputStream) throws Exception {
         Configuration configuration = new Configuration();
         configuration.setDefaultEncoding("utf-8");
 
         /*
          * 以下是两种指定ftl文件所在目录路径的方式, 注意这两种方式都是 指定ftl文件所在目录的路径,而不是ftl文件的路径
          */
-// 指定路径的第一种方式(根据某个类的相对路径指定)
-       configuration.setClassForTemplateLoading(WordUtil.class,path);
-
-// 指定路径的第二种方式,我的路径是C:/a.ftl
+        // 指定路径的第一种方式(根据某个类的相对路径指定)
+        configuration.setClassForTemplateLoading(WordUtil.class,path);
+        // 指定路径的第二种方式,我的路径是C:/a.ftl
         //configuration.setDirectoryForTemplateLoading(new File("D:\\workspace\\manage_invoice\\src\\main\\resources\\static\\templates\\excel\\"));
-
-// 输出文档路径及名称
+        // 输出文档路径及名称
         File outFile = new File("e:/test.doc");
 
-// 以utf-8的编码读取ftl文件
+        // 以utf-8的编码读取ftl文件
         Template t = configuration.getTemplate("word.ftl", "utf-8");
         Writer out = new BufferedWriter(new OutputStreamWriter(
                 outputStream, "utf-8"), 10240);

+ 5 - 5
src/main/resources/mapper/customer/CustomerCarRecMapper.xml

@@ -91,19 +91,19 @@
     from t_customer_carRec
     where  company_name = BINARY #{companyName,jdbcType=VARCHAR} and bussiness_type=0
   </select>
-  <select id="selectByETC" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="selectByEtc" parameterType="java.lang.String" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
     from t_customer_carRec
     where  etc_num = BINARY #{etcNum,jdbcType=VARCHAR} AND bussiness_type=0
   </select>
-  <select id="selectByETCForLock" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="selectByEtcForLock" parameterType="java.lang.String" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
     from t_customer_carRec
     where  etc_num = BINARY #{etcNum,jdbcType=VARCHAR} AND bussiness_type=0 FOR UPDATE
   </select>
-  <update id="updateWaitETCStatus" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerCarRec">
+  <update id="updateWaitEtcStatus" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerCarRec">
     update t_customer_carRec set rec_status = #{recStatus,jdbcType=INTEGER} ,succ_time = #{succTime,jdbcType=VARCHAR}, fail_time = #{failTime,jdbcType=VARCHAR}
     , fail_reason = #{failReason,jdbcType=VARCHAR}, inter_type = #{interType,jdbcType=VARCHAR}
     where  companyNum = BINARY #{companyNum,jdbcType=VARCHAR} and  cust_phone = BINARY #{custPhone,jdbcType=VARCHAR} AND bussiness_type=0 and rec_status = 3
@@ -240,7 +240,7 @@
     </set>
     where  car_num = BINARY #{carNum,jdbcType=VARCHAR}  and bussiness_type=2
   </update>
-  <update id="updateETCByPrimaryKeySelective" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerCarRec">
+  <update id="updateEtcByPrimaryKeySelective" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerCarRec">
     update t_customer_carRec
     <set>
       <if test="companyName != null">
@@ -297,7 +297,7 @@
     where  car_num = BINARY #{carNum,jdbcType=VARCHAR}  and bussiness_type=2
   </update>
 
-  <update id="updateETCByPrimaryKey" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerCarRec">
+  <update id="updateEtcByPrimaryKey" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerCarRec">
     update t_customer_carRec
     set
     customer_name = #{customerName,jdbcType=VARCHAR},