|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.digiwin.athena.app.service.order; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.TypeReference; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.digiwin.app.service.DWEAIResult; |
|
|
@ -16,6 +17,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author CR-7 |
|
|
@ -37,7 +39,8 @@ public class SalesOrderDetailGetEAIService extends AbsEAIService { |
|
|
|
@Override |
|
|
|
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { |
|
|
|
EAIRequest request = EAIRequest.build(messageBody); |
|
|
|
|
|
|
|
List<SalesOrderDetailEntity> salesOrderDetailDTOList = request.getObject("sales_order_detail", new TypeReference<List<SalesOrderDetailEntity>>(){}); |
|
|
|
List<Long> idList = salesOrderDetailDTOList.stream().map(SalesOrderDetailEntity::getId).collect(Collectors.toList()); |
|
|
|
// 两次开窗查询 |
|
|
|
LambdaQueryWrapper queryWrapper; |
|
|
|
if(request.getParameter().get(ParameterConstant.OPTION).equals(ParameterConstant.SET_NUMBER)){ |
|
|
@ -45,7 +48,8 @@ public class SalesOrderDetailGetEAIService extends AbsEAIService { |
|
|
|
.eq(SalesOrderDetailEntity::getTenantSid,0L); |
|
|
|
}else{ |
|
|
|
queryWrapper = Wrappers.<SalesOrderDetailEntity>lambdaQuery() |
|
|
|
.eq(SalesOrderDetailEntity::getTenantSid,1L); |
|
|
|
.eq(SalesOrderDetailEntity::getTenantSid,1L) |
|
|
|
.in(SalesOrderDetailEntity::getId,idList); |
|
|
|
} |
|
|
|
|
|
|
|
List<SalesOrderDetailEntity> list = salesOrderDetailService.list(queryWrapper); |
|
|
|