Просмотр исходного кода

Merge remote-tracking branch 'origin/test'

y 2 лет назад
Родитель
Сommit
330d9d0020

+ 6 - 5
src/main/java/com/ydtech/modules/protocol/service/impl/TaxSourceServiceImpl.java

@@ -313,6 +313,9 @@ public class TaxSourceServiceImpl extends ServiceImpl<TaxSourceMapper,TaxSourceD
      */
     @Override
     public String getAgreementId(String deptId, String userId, String companyId, String license, String volume) {
+        // 车牌前两位
+        String firstTwoPlates = license.substring(0, 2);
+
         String resultId = "";
         boolean isExclude = false;
         //排除的部门信息
@@ -322,8 +325,7 @@ public class TaxSourceServiceImpl extends ServiceImpl<TaxSourceMapper,TaxSourceD
                 .eq(TaxSourceExcludeDto::getType, TaxSourceStatusConstants.EXCLUDE_TYPE_DEPT));
 
         //部门排除
-        if (excludeDepts.stream()
-                .filter(taxSourceDto -> taxSourceDto.getExcludeInfo().equals(deptId)).count() > 0) {
+        if (excludeDepts.stream().anyMatch(taxSourceDto -> taxSourceDto.getExcludeInfo().equals(deptId))) {
             isExclude = true;
         }
 
@@ -332,8 +334,7 @@ public class TaxSourceServiceImpl extends ServiceImpl<TaxSourceMapper,TaxSourceD
                 .eq(TaxSourceExcludeDto::getType, TaxSourceStatusConstants.EXCLUDE_TYPE_LICENSE));
 
         //车牌排除
-        if (licenseExclude.stream()
-                .filter(taxSourceDto -> taxSourceDto.getExcludeInfo().equals(license)).count() > 0) {
+        if (licenseExclude.stream().anyMatch(taxSourceDto -> taxSourceDto.getExcludeInfo().contains(firstTwoPlates))) {
             isExclude = true;
         }
 
@@ -351,7 +352,7 @@ public class TaxSourceServiceImpl extends ServiceImpl<TaxSourceMapper,TaxSourceD
                 //查找配置的默认项
                 TaxSourceDto taxSourceDefaultDto = baseMapper.selectOne(new LambdaQueryWrapper<TaxSourceDto>()
                         .eq(TaxSourceDto::getInsCompanyId, companyId)
-                        .eq(TaxSourceDto::getLicense, license));
+                        .eq(TaxSourceDto::getLicense, firstTwoPlates));
                 if (taxSourceDefaultDto != null) {
                     resultId = taxSourceDefaultDto.getAgreementId();
                 }

+ 3 - 3
src/main/resources/application-test.yml

@@ -243,7 +243,7 @@ yc:
     #      cBsnsTyp: 19002
     #    userName: tianqin
     #    password: 123456
-    payCallBack: http://sxzgkj.baoxianzhanggui.com/web-api/api/yongCheng/callBack
+    payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yongCheng/callBack
     url: http://www.yongcheng.com:17002/
   #    url: http://140.206.189.151:17000/
 
@@ -306,7 +306,7 @@ zijin:
 
 image:
   # 验证码识别
-  identificationUrl: http://sxzgkj.baoxianzhanggui.com/zm/images/recognition
+  identificationUrl: https://sxzgkj.baoxianzhanggui.com/zm/images/recognition
 
 
 agreement:
@@ -359,7 +359,7 @@ xxl:
   job:
     admin:
       # 调度中心部署跟地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。
-      addresses: http://sxzgkj.baoxianzhanggui.com/xxl-job-admin
+      addresses: https://sxzgkj.baoxianzhanggui.com/xxl-job-admin
       # 执行器通讯TOKEN [选填]:非空时启用 系统默认 default_token
       accessToken: default_token
     executor: