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

应收导入批量筛选多个信息

haoyu 2 лет назад
Родитель
Сommit
8be8f7fb16

+ 25 - 0
src/main/java/com/ydtech/modules/inv/model/vo/InvSourceQueryVo.java

@@ -12,6 +12,7 @@ import org.thymeleaf.util.DateUtils;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * 来源表
@@ -72,6 +73,12 @@ public class InvSourceQueryVo extends PageRequest implements Serializable {
     @ApiModelProperty("交强保单号")
     private String jqPolicyId;
 
+    /**
+     * 多个交强保单号
+     */
+    @ApiModelProperty("多个交强保单号")
+    private List<String>  jqPolicyIds;
+
     /**
      * 交强保费(含税)
      */
@@ -93,6 +100,12 @@ public class InvSourceQueryVo extends PageRequest implements Serializable {
     @ApiModelProperty("商业保单号")
     private String syPolicyId;
 
+    /**
+     * 多个商业保单号
+     */
+    @ApiModelProperty("多个商业保单号")
+    private List<String>  syPolicyIds;
+
     /**
      * 商业保费(含税)
      */
@@ -114,6 +127,12 @@ public class InvSourceQueryVo extends PageRequest implements Serializable {
     @ApiModelProperty("非车保单号")
     private String nonCarPolicyId;
 
+    /**
+     * 多个非车保单号
+     */
+    @ApiModelProperty("多个非车保单号")
+    private List<String> nonCarPolicyIds;
+
     /**
      * 非车保费(含税)
      */
@@ -142,6 +161,12 @@ public class InvSourceQueryVo extends PageRequest implements Serializable {
     @ApiModelProperty("车牌号")
     private String licenseno;
 
+    /**
+     * 多个车牌号
+     */
+    @ApiModelProperty("车牌号")
+    private List<String>  licensenos;
+
     /**
      * 出单日期
      */

+ 22 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java

@@ -365,6 +365,22 @@ public class InvReceivableServiceImpl implements InvReceivableService {
             invSourceQueryVo.setRevenueTimeStartTime(split1[0]);
             invSourceQueryVo.setRevenueTimeEndTime(split1[1]);
         }
+        if (invSourceQueryVo.getJqPolicyId() != null && !"".equals(invSourceQueryVo.getJqPolicyId())) {
+            String[] split1 = invSourceQueryVo.getJqPolicyId().split(",");
+            invSourceQueryVo.setJqPolicyIds(Arrays.asList(split1));
+        }
+        if (invSourceQueryVo.getSyPolicyId() != null && !"".equals(invSourceQueryVo.getSyPolicyId())) {
+            String[] split1 = invSourceQueryVo.getSyPolicyId().split(",");
+            invSourceQueryVo.setSyPolicyIds(Arrays.asList(split1));
+        }
+        if (invSourceQueryVo.getNonCarPolicyId() != null && !"".equals(invSourceQueryVo.getNonCarPolicyId())) {
+            String[] split1 = invSourceQueryVo.getNonCarPolicyId().split(",");
+            invSourceQueryVo.setNonCarPolicyIds(Arrays.asList(split1));
+        }
+        if (invSourceQueryVo.getLicenseno() != null && !"".equals(invSourceQueryVo.getLicenseno())) {
+            String[] split1 = invSourceQueryVo.getLicenseno().split(",");
+            invSourceQueryVo.setLicensenos(Arrays.asList(split1));
+        }
         Page<InvSource> pageData = invSourceMapper.getRecivablePage(page, invSourceQueryVo);
         List<InvSource> records = pageData.getRecords();
         records.forEach(x -> {
@@ -724,6 +740,12 @@ public class InvReceivableServiceImpl implements InvReceivableService {
         return i > 0 ? true : false;
     }
 
+    @Override
+    public List<String> getReceivableListByLicenseno(List<String> namesList) {
+        List<String> strings = invSettlementSourceMapper.getReceivableListByLicenseno(namesList);
+        return strings;
+    }
+
 }
 
 

+ 16 - 4
src/main/resources/mapper/modules/inv/InvSourceMapper.xml

@@ -136,16 +136,28 @@
         ) a
         where 1=1
         <if test="param.licenseno != null and param.licenseno != ''">
-            and a.licenseno = #{param.licenseno}
+            and a.licenseno in
+            <foreach item="licenseno" collection="param.licenseno.split(',')" open="(" separator="," close=")">
+                #{licenseno}
+            </foreach>
         </if>
         <if test="param.jqPolicyId != null and param.jqPolicyId != ''">
-            and a.jq_policy_id = #{param.jqPolicyId}
+            and a.jq_policy_id in
+            <foreach item="jqPolicyId" collection="param.jqPolicyId.split(',')" open="(" separator="," close=")">
+                #{jqPolicyId}
+            </foreach>
         </if>
         <if test="param.syPolicyId != null and param.syPolicyId != ''">
-            and a.sy_policy_id = #{param.syPolicyId}
+            and a.sy_policy_id in
+            <foreach item="syPolicyId" collection="param.syPolicyId.split(',')" open="(" separator="," close=")">
+                #{syPolicyId}
+            </foreach>
         </if>
         <if test="param.nonCarPolicyId != null and param.nonCarPolicyId != ''">
-            and a.non_car_policy_id = #{param.nonCarPolicyId}
+            and a.non_car_policy_id in
+            <foreach item="nonCarPolicyId" collection="param.nonCarPolicyId.split(',')" open="(" separator="," close=")">
+                #{nonCarPolicyId}
+            </foreach>
         </if>
         <if test="param.insuranceId != null and param.insuranceId != ''">
             and a.insurance_id = #{param.insuranceId}