Procházet zdrojové kódy

工单添加账户类别查询

qin před 1 rokem
rodič
revize
665914b698

+ 18 - 0
src/main/java/com/poteviohealth/cgp/statistics/model/indto/OrderServiceWebInDTO.java

@@ -128,4 +128,22 @@ public class OrderServiceWebInDTO extends OrgPageQuery {
     @ApiModelProperty(value="精确查找联系电话")
     private String phone;
 
+    @ApiModelProperty(value="客户Id")
+    private Long customerId;
+
+    @ApiModelProperty(value = "区域id", name = "countryId")
+    private Integer countryId;
+
+    @ApiModelProperty(value = "街道id", name = "streetId")
+    private Integer streetId;
+
+    @ApiModelProperty(value = "社区id", name = "communityId")
+    private Integer communityId;
+
+    @ApiModelProperty(value="抽查状态:0:未抽查;1:已抽查")
+    private Integer reviewStatus;
+
+    @ApiModelProperty(value="卡类别名称")
+    private String cards;
+
 }

+ 35 - 0
src/main/java/com/poteviohealth/cgp/statistics/service/impl/OrderServiceImpl.java

@@ -629,6 +629,9 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
         if (StringUtils.isNotEmpty(orderServiceWebInDTO.getSearchValueOrderCode())) {
             orderQueryWrapper.eq(prefix + "sn", orderServiceWebInDTO.getSearchValueOrderCode());
         }
+        if (StringUtils.isNotBlank(orderServiceWebInDTO.getCards())) {
+            orderQueryWrapper.like(prefix + "card_names", orderServiceWebInDTO.getCards());
+        }
         if (null != orderServiceWebInDTO.getOrderStatus()) {
             if(orderServiceWebInDTO.getOrderStatus().equals(17)){
                 //已回访
@@ -656,6 +659,38 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
         if (StringUtils.isNotEmpty(orderServiceWebInDTO.getReviewReason())) {
             orderQueryWrapper.likeRight(prefix + "review_reason",orderServiceWebInDTO.getReviewReason());
         }
+        if(orderServiceWebInDTO.getCountryId() != null){
+            orderQueryWrapper.eq(prefix + "country_id", orderServiceWebInDTO.getCountryId());
+        }
+        if(orderServiceWebInDTO.getStreetId() != null){
+            orderQueryWrapper.eq(prefix + "street_id", orderServiceWebInDTO.getStreetId());
+        }
+        if(orderServiceWebInDTO.getCommunityId() != null){
+            orderQueryWrapper.eq(prefix + "community_id", orderServiceWebInDTO.getCommunityId());
+        }
+
+        if(orderServiceWebInDTO.getReviewStatus() != null){
+
+            String roles = "";
+            List<String> authList = TokenContext.cureWebUser().getAuthorities();
+            if(authList.contains("10")){
+                roles = "10";
+            }else if(authList.contains("11")){
+                roles = "11";
+            }else if(authList.contains("12")){
+                roles = "12";
+            }
+            if(!"".equals(roles)){
+                if(orderServiceWebInDTO.getReviewStatus().equals(1)){
+                    orderQueryWrapper.like(prefix + "review_government_role", roles);
+                }else{
+                    String val = roles;
+                    orderQueryWrapper.and(wr->wr.isNull(prefix + "review_government_role").or().notLike(prefix + "review_government_role",val));
+                    orderQueryWrapper.eq(prefix + "order_status", 6);
+                }
+            }
+        }
+
         if(orderServiceWebInDTO.getStationId() != null && orderServiceWebInDTO.getSource() != null){
             switch (orderServiceWebInDTO.getSource()){
                 case 0: