|
@ -4,8 +4,10 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.digiwin.app.service.DWEAIResult; |
|
|
import com.digiwin.app.service.DWEAIResult; |
|
|
|
|
|
import com.digiwin.athena.app.infra.constant.ParameterConstant; |
|
|
import com.digiwin.athena.app.infra.entity.SalesOrderDetailEntity; |
|
|
import com.digiwin.athena.app.infra.entity.SalesOrderDetailEntity; |
|
|
import com.digiwin.athena.app.infra.service.SalesOrderDetailService; |
|
|
import com.digiwin.athena.app.infra.service.SalesOrderDetailService; |
|
|
|
|
|
import com.digiwin.athena.opt.common.eai.EAIRequest; |
|
|
import com.digiwin.athena.opt.common.eai.EAIUtil; |
|
|
import com.digiwin.athena.opt.common.eai.EAIUtil; |
|
|
import com.digiwin.athena.opt.common.eai.service.AbsEAIService; |
|
|
import com.digiwin.athena.opt.common.eai.service.AbsEAIService; |
|
|
import lombok.extern.log4j.Log4j2; |
|
|
import lombok.extern.log4j.Log4j2; |
|
@ -27,7 +29,6 @@ public class SalesOrderDetailGetEAIService extends AbsEAIService { |
|
|
@Resource |
|
|
@Resource |
|
|
SalesOrderDetailService salesOrderDetailService; |
|
|
SalesOrderDetailService salesOrderDetailService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public String getServiceName() { |
|
|
public String getServiceName() { |
|
|
return SalesOrderDetailUtil.DEMO_SO_ITEM_INFO_GET; |
|
|
return SalesOrderDetailUtil.DEMO_SO_ITEM_INFO_GET; |
|
@ -35,8 +36,17 @@ public class SalesOrderDetailGetEAIService extends AbsEAIService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { |
|
|
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { |
|
|
LambdaQueryWrapper queryWrapper = Wrappers.<SalesOrderDetailEntity>lambdaQuery() |
|
|
|
|
|
.eq(SalesOrderDetailEntity::getTenantSid,0); |
|
|
|
|
|
|
|
|
EAIRequest request = EAIRequest.build(messageBody); |
|
|
|
|
|
|
|
|
|
|
|
// 两次开窗查询 |
|
|
|
|
|
LambdaQueryWrapper queryWrapper; |
|
|
|
|
|
if(request.getParameter().get(ParameterConstant.OPTION).equals(ParameterConstant.SET_NUMBER)){ |
|
|
|
|
|
queryWrapper = Wrappers.<SalesOrderDetailEntity>lambdaQuery() |
|
|
|
|
|
.eq(SalesOrderDetailEntity::getTenantSid,0L); |
|
|
|
|
|
}else{ |
|
|
|
|
|
queryWrapper = Wrappers.<SalesOrderDetailEntity>lambdaQuery() |
|
|
|
|
|
.eq(SalesOrderDetailEntity::getTenantSid,1L); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
List<SalesOrderDetailEntity> list = salesOrderDetailService.list(queryWrapper); |
|
|
List<SalesOrderDetailEntity> list = salesOrderDetailService.list(queryWrapper); |
|
|
|
|
|
|
|
|