Browse Source

feat:数据状态改为前端传入

master
郑贵龙 1 year ago
parent
commit
8d8b21281d
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionTaskGetEAIService.java

+ 3
- 1
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionTaskGetEAIService.java View File

@ -41,6 +41,8 @@ public class ProductionTaskGetEAIService extends AbsEAIService {
EAIRequest eaiRequest = EAIRequest.build(messageBody); EAIRequest eaiRequest = EAIRequest.build(messageBody);
List<ProductionDetailsEntity> productionDetailsEntities = eaiRequest.getObject("get_data", new TypeReference<List<ProductionDetailsEntity>>() {}); List<ProductionDetailsEntity> productionDetailsEntities = eaiRequest.getObject("get_data", new TypeReference<List<ProductionDetailsEntity>>() {});
String status = eaiRequest.getString("production_status");
for (ProductionDetailsEntity productionDetailsEntity : productionDetailsEntities) { for (ProductionDetailsEntity productionDetailsEntity : productionDetailsEntities) {
if (StringUtils.isEmpty(productionDetailsEntity.getWorkNo())){ if (StringUtils.isEmpty(productionDetailsEntity.getWorkNo())){
throw new DWBusinessException("缺少必填参数"); throw new DWBusinessException("缺少必填参数");
@ -50,7 +52,7 @@ public class ProductionTaskGetEAIService extends AbsEAIService {
LambdaQueryWrapper<ProductionDetailsEntity> lmq = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ProductionDetailsEntity> lmq = new LambdaQueryWrapper<>();
List<String> woNoList = productionDetailsEntities.stream().map(ProductionDetailsEntity::getWorkNo).collect(Collectors.toList()); List<String> woNoList = productionDetailsEntities.stream().map(ProductionDetailsEntity::getWorkNo).collect(Collectors.toList());
lmq.eq(ProductionDetailsEntity::getTenantSid,SecurityUtil.getUserProfile().getTenantSid()); lmq.eq(ProductionDetailsEntity::getTenantSid,SecurityUtil.getUserProfile().getTenantSid());
lmq.eq(ProductionDetailsEntity::getProductionStatus, TabStatusEnums.PENDING.getValue().toString());
lmq.eq(ProductionDetailsEntity::getProductionStatus, status);
lmq.in(ProductionDetailsEntity::getWorkNo,woNoList); lmq.in(ProductionDetailsEntity::getWorkNo,woNoList);
List<ProductionDetailsEntity> list = productionDetailsService.list(lmq); List<ProductionDetailsEntity> list = productionDetailsService.list(lmq);


Loading…
Cancel
Save