Parcourir la source

解决订单审核-我的审核。 领取后,没有从待领取中消失的问题

lipf il y a 4 mois
Parent
commit
6df2298c9c

+ 15 - 0
commons/src/main/java/com/jzg/commons/entity/dto/FeeAuditParam.java

@@ -96,6 +96,21 @@ public class FeeAuditParam extends PageRequest {
     @Schema(description = "领取人")
     private String receiveUser;
 
+    /**
+     * 在订单审核-任务中心&我的审核,两个页面,调用的都是同一个接口 feeAudit/auditList
+     * 但是实际业务邀请中,
+     *      任务中心要求查看的是该租户下的所有的数据。
+     *      我的审核要求查看的是,指定用户领取后的数据。
+     *      ---
+     *      在任务中心,待领取tab页,需要查询所有未被领取的数据, 在我的审核tab页中,需要查询所有本人已经领取,但是未处理的数据
+     *      现在两个待领取的tab页,一个需要查询出所有未领取的数据,一个需要查询本人领取过的数据。 同时还不能对其他tab页的数据造成影响。
+     *      ---
+     *      allToReceive 表示 查询全部待领取,默认是false,查询的时候,不对receiveUser进行判断,
+     *      只有在任务中心-待审核 tab页面,会给他赋值 true, 此时,会要求专门查询 recieve_user 和 recieve_time 为空的
+     */
+    @Schema(description = "是否要查询全部待领取")
+    private boolean allTodoReceive;
+
     @Schema(description = "审核方式 1 人工审核 2 自动审核")
     private Integer auditType;
 

+ 6 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsFeeAuditController.java

@@ -38,11 +38,14 @@ public class InsFeeAuditController {
 
     /**
      * 订单列表分页
+     *
+     * 支持查询租户下的所有数据,或者租户下,指定业务员领取后的数据。
      * @return HttpResult<Page<FeeAuditVo>>
      */
     @PostMapping("/auditList")
     @Operation(summary = "订单审核列表分页")
     public HttpResult<Page<FeeAuditVo>> auditList(@RequestBody FeeAuditParam param){
+        log.info("订单审核列表分页=[{}]", JSONUtil.toJsonStr(param));
         param.setSystemCode(baseController.getUserSystemCode());
         Page<FeeAuditVo> result = insFeeAuditService.queryPage(param);
         return HttpResult.ok(result);
@@ -77,7 +80,9 @@ public class InsFeeAuditController {
     @GetMapping("/isLock")
     @Operation(summary = "判断领取按钮是否锁定")
     public HttpResult<Boolean> isLock(String orderNo){
-        return HttpResult.ok(insFeeAuditService.isLock(orderNo));
+        Boolean lock = insFeeAuditService.isLock(orderNo);
+        String msg = lock ? "订单已被领取":"";
+        return HttpResult.ok(msg, lock);
     }
 
     /**

+ 9 - 22
tenant/insurance/quotation-summary/src/main/resources/mapper/InsFeeAuditMapper.xml

@@ -80,17 +80,12 @@
         LEFT JOIN ins_orders_external_policy ioep on ioep.order_no = io.id AND ioep.is_delete=0
         <where>
             and ifa.is_delete=0 and ifa.system_code = #{param.systemCode}
-            <choose>
-                <when test="param.receiveUser != null and param.receiveUser != ''">
-                    and ifa.receive_user = #{param.receiveUser}
-                </when>
-                <when test="param.isProblem != null and param.isProblem == 1">
-                    and ifa.receive_user is NOT NULL
-                </when>
-                <otherwise>
-                    and ifa.receive_user is NULL
-                </otherwise>
-            </choose>
+            <if test="param.receiveUser != null and param.receiveUser != ''">
+                and ifa.receive_user = #{param.receiveUser}
+            </if>
+            <if test="param.allTodoReceive != null and param.allTodoReceive == true">
+                and ifa.receive_user is null
+            </if>
             <if test="param.auditType != null">
                 and ifa.audit_type = #{param.auditType}
             </if>
@@ -215,17 +210,9 @@
         LEFT JOIN ins_orders_external_policy ioep on ioep.order_no = io.id AND ioep.is_delete=0
         <where>
             and ifa.is_delete=0
-            <choose>
-                <when test="param.receiveUser != null and param.receiveUser != ''">
-                    and ifa.receive_user = #{param.receiveUser}
-                </when>
-                <when test="param.isProblem != null and param.isProblem == 1">
-                    and ifa.receive_user is NOT NULL
-                </when>
-                <otherwise>
-                    and ifa.receive_user is NULL
-                </otherwise>
-            </choose>
+            <if test="param.receiveUser != null and param.receiveUser != ''">
+                and ifa.receive_user = #{param.receiveUser}
+            </if>
             <if test="param.auditType != null">
                 and ifa.audit_type = #{param.auditType}
             </if>