|
@@ -28,6 +28,7 @@ import com.gree.mall.miniapp.plus.service.*;
|
|
|
import com.gree.mall.miniapp.utils.DateUtils;
|
|
|
import com.gree.mall.miniapp.utils.StringUtil;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.elasticsearch.client.RestHighLevelClient;
|
|
|
import org.elasticsearch.index.query.BoolQueryBuilder;
|
|
@@ -37,7 +38,9 @@ import org.elasticsearch.search.aggregations.AggregationBuilders;
|
|
|
import org.elasticsearch.search.aggregations.Aggregations;
|
|
|
import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder;
|
|
|
import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilter;
|
|
|
+import org.springframework.data.domain.PageImpl;
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
|
|
|
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
|
|
|
import org.springframework.data.elasticsearch.core.SearchHits;
|
|
@@ -52,6 +55,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class OrderBaseLogic {
|
|
|
|
|
|
private final PgOrderBaseService pgOrderBaseService;
|
|
@@ -107,35 +111,46 @@ public class OrderBaseLogic {
|
|
|
// 构建查询,最大只能查两万数据
|
|
|
NativeSearchQuery searchQuery = new NativeSearchQueryBuilder()
|
|
|
.withQuery(boolQuery)
|
|
|
- .withPageable(PageRequest.of(1, 20000))
|
|
|
+ .withPageable(PageRequest.of(0, 10000))
|
|
|
.build();
|
|
|
|
|
|
// 执行查询
|
|
|
- List<PgOrderWorkerEs> pgOrderWorkerEs = elasticsearchRestTemplate.search(searchQuery, PgOrderWorkerEs.class).map(searchHit -> searchHit.getContent())
|
|
|
+ List<PgOrderWorkerDateEs> pgOrderWorkerEs = elasticsearchRestTemplate.search(searchQuery, PgOrderWorkerDateEs.class).map(searchHit -> searchHit.getContent())
|
|
|
.toList();
|
|
|
|
|
|
- List<String> orderBaseIds = pgOrderWorkerEs.stream().map(PgOrderWorkerEs::getOrderBaseId).collect(Collectors.toList());
|
|
|
+ List<String> orderBaseIds = pgOrderWorkerEs.stream().map(PgOrderWorkerDateEs::getOrderBaseId).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (CollectionUtil.isEmpty(orderBaseIds))
|
|
|
+ return new CountOrderStatusBean();
|
|
|
|
|
|
BoolQueryBuilder boolQueryOrder = QueryBuilders.boolQuery()
|
|
|
- .mustNot(QueryBuilders.termsQuery("order_status", "YQX","FWQX","FL","FWZT","YCGB"))
|
|
|
+ .mustNot(QueryBuilders.termsQuery("order_status", "YQX","FWQX","FL","FWZT","YCGB","YZP"))
|
|
|
;
|
|
|
boolQueryOrder.must(
|
|
|
QueryBuilders.boolQuery().should(QueryBuilders.termsQuery("id", orderBaseIds))
|
|
|
.should(QueryBuilders.termsQuery("order_status", OrderBaseStatusEnum.DQD.getKey()))
|
|
|
);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//待接单
|
|
|
+ // A 或 B 的条件
|
|
|
+ BoolQueryBuilder orConditionAB = QueryBuilders.boolQuery()
|
|
|
+ .must(QueryBuilders.matchQuery("is_import_excel", false))
|
|
|
+ .must(QueryBuilders.matchQuery("order_status", OrderBaseStatusEnum.DJD.getKey()));
|
|
|
+
|
|
|
+ // C 或 D 的条件
|
|
|
+ BoolQueryBuilder orConditionCD = QueryBuilders.boolQuery()
|
|
|
+ .must(QueryBuilders.matchQuery("is_import_excel", true))
|
|
|
+ .must(QueryBuilders.matchQuery("is_meet", false));
|
|
|
+
|
|
|
NativeSearchQuery searchQueryDJD = new NativeSearchQueryBuilder()
|
|
|
.withQuery(boolQueryOrder)
|
|
|
.withPageable(PageRequest.of(1, 1))
|
|
|
.addAggregation(this.getAggs(AggregationBuilders.filter("DJD", QueryBuilders.boolQuery()
|
|
|
- .must(
|
|
|
- QueryBuilders.boolQuery().should(QueryBuilders.termsQuery("id", orderBaseIds))
|
|
|
- .should(QueryBuilders.termsQuery("order_status", OrderBaseStatusEnum.DJD.getKey()))
|
|
|
- )
|
|
|
- .must(
|
|
|
- QueryBuilders.boolQuery().should(QueryBuilders.termsQuery("id", orderBaseIds))
|
|
|
- .should(QueryBuilders.termsQuery("order_status", OrderBaseStatusEnum.DJD.getKey()))
|
|
|
- )
|
|
|
+ .should(orConditionAB).should(orConditionCD)
|
|
|
)))
|
|
|
.build();
|
|
|
SearchHits response = elasticsearchRestTemplate.search(searchQueryDJD, OrderBaseEs.class);
|
|
@@ -148,7 +163,7 @@ public class OrderBaseLogic {
|
|
|
.withQuery(boolQueryOrder)
|
|
|
.withPageable(PageRequest.of(1, 1))
|
|
|
.addAggregation(this.getAggs(AggregationBuilders.filter("FWZ", QueryBuilders.boolQuery()
|
|
|
- .must(QueryBuilders.termsQuery("order_status","FWZ","GCSZT","BFWG","DSM","YZP","XSBH","TJXSBH","ZBBH","FZXBH","WDBH"))
|
|
|
+ .must(QueryBuilders.termsQuery("order_status","FWZ","GCSZT","BFWG","DSM","XSBH","TJXSBH","ZBBH","FZXBH","WDBH"))
|
|
|
)))
|
|
|
.build();
|
|
|
SearchHits responseFWZ = elasticsearchRestTemplate.search(searchQueryFWZ, OrderBaseEs.class);
|
|
@@ -194,7 +209,9 @@ public class OrderBaseLogic {
|
|
|
.withQuery(boolQueryOrder)
|
|
|
.withPageable(PageRequest.of(1, 1))
|
|
|
.addAggregation(this.getAggs(AggregationBuilders.filter("JRWG", QueryBuilders.boolQuery()
|
|
|
- .must(QueryBuilders.rangeQuery("over_time").from(DateUtil.beginOfDay(new Date())).to(DateUtil.endOfDay(new Date())))
|
|
|
+ .must(QueryBuilders.rangeQuery("over_time")
|
|
|
+ .gte(DateUtil.format(DateUtil.beginOfDay(new Date()),"yyyy-MM-dd HH:mm:ss"))
|
|
|
+ .lte(DateUtil.format(DateUtil.endOfDay(new Date()),"yyyy-MM-dd HH:mm:ss")))
|
|
|
)))
|
|
|
.build();
|
|
|
SearchHits responseJRWG = elasticsearchRestTemplate.search(searchQueryJRWG, OrderBaseEs.class);
|
|
@@ -206,7 +223,9 @@ public class OrderBaseLogic {
|
|
|
.withQuery(boolQueryOrder)
|
|
|
.withPageable(PageRequest.of(1, 1))
|
|
|
.addAggregation(this.getAggs(AggregationBuilders.filter("JBNWG", QueryBuilders.boolQuery()
|
|
|
- .must(QueryBuilders.rangeQuery("over_time").from(DateUtil.beginOfDay(DateUtil.offsetMonth(new Date(),-6))).to(DateUtil.endOfDay(new Date())))
|
|
|
+ .must(QueryBuilders.rangeQuery("over_time")
|
|
|
+ .gte(DateUtil.format(DateUtil.beginOfDay(DateUtil.offsetMonth(new Date(),-6)),"yyyy-MM-dd HH:mm:ss"))
|
|
|
+ .lte(DateUtil.format(DateUtil.endOfDay(new Date()),"yyyy-MM-dd HH:mm:ss")))
|
|
|
)))
|
|
|
.build();
|
|
|
SearchHits responseJBNWG = elasticsearchRestTemplate.search(searchQueryJBNWG, OrderBaseEs.class);
|
|
@@ -279,12 +298,28 @@ public class OrderBaseLogic {
|
|
|
);
|
|
|
mySchedule7Day.setDayList(dayList);
|
|
|
|
|
|
- List<String> orderBaseIds = pgOrderWorkerService.lambdaQuery()
|
|
|
- .and(item -> item.eq(PgOrderWorker::getWorkerId, currentCompanyWechat.getUserId())
|
|
|
- .or(!StringUtil.isEmpty(currentCompanyWechat.getUser().getWorkerNumber()))
|
|
|
- .eq(PgOrderWorker::getWorkerNumber,currentCompanyWechat.getUser().getWorkerNumber())
|
|
|
- )
|
|
|
- .list().stream().map(PgOrderWorker::getOrderBaseId).distinct().collect(Collectors.toList());
|
|
|
+ BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
|
|
|
+
|
|
|
+ // 根据参数动态添加筛选条件
|
|
|
+ if (StringUtil.isEmpty(currentCompanyWechat.getUser().getWorkerNumber())) {
|
|
|
+ boolQuery.must(QueryBuilders.matchQuery("worker_idcard", currentCompanyWechat.getUser().getIdCard()));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ boolQuery.must(QueryBuilders.matchQuery("worker_number", currentCompanyWechat.getUser().getWorkerNumber()));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 构建查询,最大只能查两万数据
|
|
|
+ NativeSearchQuery searchQuery = new NativeSearchQueryBuilder()
|
|
|
+ .withQuery(boolQuery)
|
|
|
+ .withPageable(PageRequest.of(0, 10000))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ // 执行查询
|
|
|
+ List<PgOrderWorkerDateEs> pgOrderWorkerEs = elasticsearchRestTemplate.search(searchQuery, PgOrderWorkerDateEs.class).map(searchHit -> searchHit.getContent())
|
|
|
+ .toList();
|
|
|
+
|
|
|
+ List<String> orderBaseIds = pgOrderWorkerEs.stream().map(PgOrderWorkerDateEs::getOrderBaseId).collect(Collectors.toList());
|
|
|
if(CollectionUtils.isEmpty(orderBaseIds)){
|
|
|
return mySchedule7Day;
|
|
|
}
|
|
@@ -356,13 +391,13 @@ public class OrderBaseLogic {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 工单列表
|
|
|
+ * 工单列表mysql
|
|
|
* @param byDay 1=今天 2=明天 3=其他
|
|
|
* @param startTime
|
|
|
* @param endTime
|
|
|
* @return
|
|
|
*/
|
|
|
- public IPage<OrderBaseVO> list(String keyword,String pgIncreOrderId,Boolean isYb,Boolean isWb,OrderBaseStatusEnum orderBaseStatusEnum,
|
|
|
+ public IPage<OrderBaseVO> listMysql(String keyword,String pgIncreOrderId,Boolean isYb,Boolean isWb,OrderBaseStatusEnum orderBaseStatusEnum,
|
|
|
Integer byDay,String startTime,String endTime,Integer pageNum,Integer pageSize){
|
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
|
|
|
if(!StringUtils.equals(currentCompanyWechat.getUser().getType(),UserTypeEnum.WORKER.getKey())){
|
|
@@ -425,7 +460,6 @@ public class OrderBaseLogic {
|
|
|
orderStatusList.add(OrderBaseStatusEnum.FWZ.getKey());
|
|
|
orderStatusList.add(OrderBaseStatusEnum.GCSZT.getKey());
|
|
|
orderStatusList.add(OrderBaseStatusEnum.BFWG.getKey());
|
|
|
- orderStatusList.add(OrderBaseStatusEnum.YZP.getKey());
|
|
|
orderStatusList.add(OrderBaseStatusEnum.DSM.getKey());
|
|
|
|
|
|
orderStatusList.add(OrderBaseStatusEnum.WDBH.getKey());
|
|
@@ -532,6 +566,193 @@ public class OrderBaseLogic {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ public IPage<OrderBaseVO> list(String keyword,String pgIncreOrderId,Boolean isYb,Boolean isWb,OrderBaseStatusEnum orderBaseStatusEnum,
|
|
|
+ Integer byDay,String startTime,String endTime,Integer pageNum,Integer pageSize){
|
|
|
+
|
|
|
+ CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
|
|
|
+ if(!StringUtils.equals(currentCompanyWechat.getUser().getType(),UserTypeEnum.WORKER.getKey())){
|
|
|
+ return new Page<>(pageNum,pageSize);
|
|
|
+ }
|
|
|
+ //查询师傅拥有工单
|
|
|
+ BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
|
|
|
+
|
|
|
+ // 根据参数动态添加筛选条件
|
|
|
+ if (StringUtil.isEmpty(currentCompanyWechat.getUser().getWorkerNumber())) {
|
|
|
+ boolQuery.must(QueryBuilders.matchQuery("worker_idcard", currentCompanyWechat.getUser().getIdCard()));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ boolQuery.must(QueryBuilders.matchQuery("worker_number", currentCompanyWechat.getUser().getWorkerNumber()));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 构建查询,最大只能查两万数据
|
|
|
+ NativeSearchQuery searchQuery = new NativeSearchQueryBuilder()
|
|
|
+ .withQuery(boolQuery)
|
|
|
+ .withPageable(PageRequest.of(0, 10000))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ // 执行查询
|
|
|
+ List<PgOrderWorkerDateEs> pgOrderWorkerEs = elasticsearchRestTemplate.search(searchQuery, PgOrderWorkerDateEs.class).map(searchHit -> searchHit.getContent())
|
|
|
+ .toList();
|
|
|
+
|
|
|
+ List<String> orderBaseIds = pgOrderWorkerEs.stream().map(PgOrderWorkerDateEs::getOrderBaseId).collect(Collectors.toList());
|
|
|
+
|
|
|
+
|
|
|
+ if(byDay != null){
|
|
|
+ if(byDay == 1) {
|
|
|
+ startTime = DateUtil.formatDateTime(DateUtil.beginOfDay(new Date()));
|
|
|
+ endTime = DateUtil.formatDateTime(DateUtil.endOfDay(new Date()));
|
|
|
+ }else if(byDay == 2){
|
|
|
+ startTime = DateUtil.formatDateTime(DateUtil.offsetDay(DateUtil.beginOfDay(new Date()),1));
|
|
|
+ endTime = DateUtil.formatDateTime(DateUtil.offsetDay(DateUtil.endOfDay(new Date()),1));
|
|
|
+ }else if(byDay == 3){
|
|
|
+ startTime = DateUtil.formatDateTime(DateUtil.beginOfDay(new Date()));
|
|
|
+ endTime = DateUtil.formatDateTime(DateUtil.offsetDay(DateUtil.endOfDay(new Date()),1));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 创建 Bool 查询
|
|
|
+ BoolQueryBuilder boolQueryOrder = QueryBuilders.boolQuery()
|
|
|
+ .mustNot(QueryBuilders.termsQuery("order_status", "YQX","FWQX","FL","FWZT","YCGB","YZP"))
|
|
|
+ ;
|
|
|
+ boolQueryOrder.must(
|
|
|
+ QueryBuilders.boolQuery().should(QueryBuilders.termsQuery("id", orderBaseIds))
|
|
|
+ .should(QueryBuilders.termsQuery("order_status", OrderBaseStatusEnum.DQD.getKey()))
|
|
|
+ );
|
|
|
+
|
|
|
+ if (!StringUtil.isEmpty(startTime)) {
|
|
|
+ boolQueryOrder.must(QueryBuilders.rangeQuery("create_time")
|
|
|
+ .gte(startTime)
|
|
|
+ .lte(endTime)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ String orderStatus = orderBaseStatusEnum != null ? orderBaseStatusEnum.getKey() : null;
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(keyword)){
|
|
|
+ boolQueryOrder.must(
|
|
|
+ QueryBuilders.boolQuery().should(QueryBuilders.wildcardQuery("id","*"+keyword+"*"))
|
|
|
+ .should(QueryBuilders.wildcardQuery("user_name","*"+keyword+"*"))
|
|
|
+ .should(QueryBuilders.wildcardQuery("order_small_type_text","*"+keyword+"*"))
|
|
|
+ .should(QueryBuilders.wildcardQuery("user_mobile","*"+keyword+"*"))
|
|
|
+ .should(QueryBuilders.wildcardQuery("address","*"+keyword+"*"))
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.equals(orderStatus, OrderBaseStatusEnum.DJD.getKey())) {
|
|
|
+ // A 或 B 的条件
|
|
|
+ BoolQueryBuilder orConditionAB = QueryBuilders.boolQuery()
|
|
|
+ .must(QueryBuilders.matchQuery("is_import_excel", false))
|
|
|
+ .must(QueryBuilders.matchQuery("order_status", OrderBaseStatusEnum.DJD.getKey()));
|
|
|
+
|
|
|
+ // C 或 D 的条件
|
|
|
+ BoolQueryBuilder orConditionCD = QueryBuilders.boolQuery()
|
|
|
+ .must(QueryBuilders.matchQuery("is_import_excel", true))
|
|
|
+ .must(QueryBuilders.matchQuery("is_meet", false));
|
|
|
+
|
|
|
+ boolQueryOrder
|
|
|
+ .must( QueryBuilders.boolQuery()
|
|
|
+ .should(orConditionAB).should(orConditionCD));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.equals(orderStatus, OrderBaseStatusEnum.FWZ.getKey())) {
|
|
|
+ boolQueryOrder .must(QueryBuilders.termsQuery("order_status","FWZ","GCSZT","BFWG","DSM","XSBH","TJXSBH","ZBBH","FZXBH","WDBH"));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.equals(orderStatus, OrderBaseStatusEnum.YCD.getKey())) {
|
|
|
+ boolQueryOrder.must(QueryBuilders.termsQuery("is_exception",true));
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.equals(orderStatus, OrderBaseStatusEnum.YWG.getKey())) {
|
|
|
+ boolQueryOrder.must(QueryBuilders.termsQuery("order_status","YWG","YJS","GCSZX","YWGO","WDWG"));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.equals(orderStatus, OrderBaseStatusEnum.DQD.getKey())) {
|
|
|
+ boolQueryOrder.must(QueryBuilders.termsQuery("order_status","DQD"));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtils.equals(orderStatus, OrderBaseStatusEnum.DCL.getKey())) {
|
|
|
+ boolQueryOrder.mustNot(QueryBuilders.termsQuery("order_status","YWG","YJS","GCSZX","YWGO","WDWG","DQD"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pageSize == -1) {
|
|
|
+ pageSize = 10;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 创建分页请求
|
|
|
+ Pageable pageable = PageRequest.of(pageNum-1, pageSize);
|
|
|
+
|
|
|
+ // 创建查询
|
|
|
+ Query searchQueryOrder = new NativeSearchQueryBuilder()
|
|
|
+ .withQuery(boolQueryOrder)
|
|
|
+ .withPageable(pageable)
|
|
|
+ .build();
|
|
|
+
|
|
|
+
|
|
|
+ SearchHits<OrderBaseEs> searchHits = elasticsearchRestTemplate.search(searchQueryOrder, OrderBaseEs.class);
|
|
|
+
|
|
|
+
|
|
|
+ // 获取结果和总数
|
|
|
+ List<OrderBaseEs> content = searchHits.get().map(hit -> hit.getContent()).collect(Collectors.toList());
|
|
|
+ long totalHits = searchHits.getTotalHits();
|
|
|
+
|
|
|
+ List<OrderBaseVO> orderBaseVOS = BeanUtil.copyToList(content, OrderBaseVO.class);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //服务单标识
|
|
|
+ List<String> orderIds = orderBaseVOS
|
|
|
+ .stream()
|
|
|
+ .map(OrderBaseVO::getId)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ List<AdminWebsit> adminWebsits = new ArrayList<>();
|
|
|
+ Map<String, String> adminWebsitMap = new HashMap<>();
|
|
|
+
|
|
|
+ if (CollectionUtil.isNotEmpty(orderBaseVOS)) {
|
|
|
+ adminWebsits = adminWebsitService.lambdaQuery()
|
|
|
+ .eq(AdminWebsit::getCompanyWechatId, currentCompanyWechat.getCompanyWechatId())
|
|
|
+ .in(AdminWebsit::getWebsitId, orderBaseVOS.stream().map(OrderBaseVO::getWebsitId).collect(Collectors.toList()))
|
|
|
+ .list();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CollectionUtil.isNotEmpty(adminWebsits)) {
|
|
|
+ adminWebsitMap = adminWebsits.stream().collect(Collectors.toMap(AdminWebsit::getWebsitId, AdminWebsit::getAttr));
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, List<PgOrderFlag>> mapList = this.getOrderFlags(orderIds);
|
|
|
+ for (OrderBaseVO orderBaseVO : orderBaseVOS) {
|
|
|
+ orderBaseVO.setOrderFlags(mapList.get(orderBaseVO.getId()));
|
|
|
+ //明细
|
|
|
+ orderBaseVO.setPgOrderProducts(
|
|
|
+ pgOrderProductService.lambdaQuery().eq(PgOrderProduct::getOrderBaseId,orderBaseVO.getId()).list()
|
|
|
+ );
|
|
|
+ //待抢单状态隐藏
|
|
|
+ if(StringUtils.equals(orderBaseVO.getOrderStatus(),OrderBaseStatusEnum.DQD.getKey())){
|
|
|
+ orderBaseVO.setUserMobile(orderBaseVO.getUserMobile().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
|
|
|
+ orderBaseVO.setAddress(orderBaseVO.getProvince()+orderBaseVO.getCity()+orderBaseVO.getArea()+orderBaseVO.getStreet()+"****");
|
|
|
+ }
|
|
|
+ final String attr = adminWebsitMap.get(orderBaseVO.getWebsitId());
|
|
|
+
|
|
|
+ orderBaseVO.setAttr(attr);
|
|
|
+ if (StringUtils.isNotBlank(attr)
|
|
|
+ && attr.equals(WebsitAttrEnum.SELF.getKey())
|
|
|
+ && "安装, 拆移机".contains(orderBaseVO.getOrderSmallTypeText())) {
|
|
|
+ orderBaseVO.setNeedSlave(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Page<OrderBaseVO> page = new Page<>();
|
|
|
+ page.setRecords(orderBaseVOS);
|
|
|
+ page.setCurrent(pageNum);
|
|
|
+ page.setTotal(totalHits);
|
|
|
+ page.setSize(pageSize);
|
|
|
+
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 客户的工单列表
|
|
|
* @param flag 1=待预约 2=服务中 3=待评价 4=已完成
|
|
@@ -680,8 +901,7 @@ public class OrderBaseLogic {
|
|
|
PgOrderBase pgOrderBase = pgOrderBaseService.getById(orderBaseId);
|
|
|
if (!pgOrderBase.getIsImportExcel() && (!(StringUtils.equals(pgOrderBase.getOrderStatus(), OrderBaseStatusEnum.DJD.getKey())
|
|
|
|| StringUtils.equals(pgOrderBase.getOrderStatus(), OrderBaseStatusEnum.DSM.getKey())
|
|
|
- || StringUtils.equals(pgOrderBase.getOrderStatus(), OrderBaseStatusEnum.YZP.getKey()))
|
|
|
- )) {
|
|
|
+ ))) {
|
|
|
throw new RemoteServiceException("当前状态不可接单");
|
|
|
}
|
|
|
|