Browse Source

Merge branch 'sprint/s4' into release/s4

release/s4
李壮壮 7 months ago
parent
commit
aad2ead919
4 changed files with 180 additions and 0 deletions
  1. +29
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/QuotationRequirementEAIService.java
  2. +27
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/QuotationRequirementEAIServiceImpl.java
  3. +109
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java
  4. +15
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationUtil.java

+ 29
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/QuotationRequirementEAIService.java View File

@ -0,0 +1,29 @@
package com.digiwin.athena.app.provider;
import com.digiwin.app.service.AllowAnonymous;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.app.service.DWService;
import com.digiwin.app.service.eai.EAIService;
import com.digiwin.athena.app.service.quotation.QuotationUtil;
import java.util.Map;
/**
* @author lz
* @version 1.0
* @title QuotationRequirementEAIService
* @description
* @create 2024/4/29 10:20
*/
public interface QuotationRequirementEAIService extends DWService {
/**
* 报价需求查询
* @param headers
* @param messageBody
* @return
* @throws Exception
*/
@EAIService(id = QuotationUtil.DEMO_ATHENAOPT_REQUIREMENT_INFO_GET)
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception;
}

+ 27
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/QuotationRequirementEAIServiceImpl.java View File

@ -0,0 +1,27 @@
package com.digiwin.athena.app.provider.impl;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.provider.QuotationRequirementEAIService;
import com.digiwin.athena.app.service.quotation.QuotationUtil;
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext;
import javax.annotation.Resource;
import java.util.Map;
/**
* @author lz
* @version 1.0
* @title PurchaseDemoEAIServiceImpl
* @description
* @create 2023/8/30 16:50
*/
public class QuotationRequirementEAIServiceImpl implements QuotationRequirementEAIService {
@Resource
private EAIServiceContext eaiServiceContext;
@Override
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception {
return eaiServiceContext.execute(QuotationUtil.DEMO_ATHENAOPT_REQUIREMENT_INFO_GET , headers, messageBody);
}
}

+ 109
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java View File

@ -0,0 +1,109 @@
package com.digiwin.athena.app.service.quotation;
import com.alibaba.fastjson.JSONObject;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.opt.common.eai.EAIUtil;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import org.springframework.stereotype.Service;
import java.util.*;
/**
* @author lz
* @version 1.0
* @title QuotationRequirement
* @description mock需求数据
* @create 2024/4/29 10:00
*/
@Service
public class QuotationRequirementInfoGetService extends AbsEAIService {
@Override
public String getServiceName() {
return QuotationUtil.DEMO_ATHENAOPT_REQUIREMENT_INFO_GET;
}
@Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
List<Map<String, Object>> requirementInfo = getRequirementInfo();
return EAIUtil.buildEAIResult(new JSONObject().fluentPut("requirement_info", requirementInfo));
}
/**
* @description mock需求数据
* @author lz
* @throws
* @time 2024/4/29 10:16
*/
public static List<Map<String, Object>> getRequirementInfo() {
List<Map<String, Object>> requirementInfo = new ArrayList<>();
// 第一个需求
Map<String, Object> requirement1 = new HashMap<>();
List<String> correlationCode1 = Arrays.asList("100203");
requirement1.put("correlation_code", correlationCode1);
requirement1.put("requirement_no", "100203");
requirement1.put("requirement_name", "产品色");
requirement1.put("requirement_description", "");
requirementInfo.add(requirement1);
// 第二个需求
Map<String, Object> requirement2 = new HashMap<>();
List<String> correlationCode2 = Arrays.asList("100203", "1-1");
requirement2.put("correlation_code", correlationCode2);
requirement2.put("requirement_no", "100203");
requirement2.put("requirement_name", "是否定制-客户定制色或工厂标准色");
requirement2.put("requirement_description", "");
requirementInfo.add(requirement2);
// 第三个需求
Map<String, Object> requirement3 = new HashMap<>();
List<String> correlationCode3 = Arrays.asList("100203", "2-1");
requirement3.put("correlation_code", correlationCode3);
requirement3.put("requirement_no", "100203");
requirement3.put("requirement_name", "产品色系-2");
requirement3.put("requirement_description", "");
requirementInfo.add(requirement3);
// 第四个需求
Map<String, Object> requirement4 = new HashMap<>();
List<String> correlationCode4 = Arrays.asList("100203", "3-1");
requirement4.put("correlation_code", correlationCode4);
requirement4.put("requirement_no", "100203");
requirement4.put("requirement_name", "每色MOQ-2");
requirement4.put("requirement_description", "");
requirementInfo.add(requirement4);
// 第五个需求
Map<String, Object> requirement5 = new HashMap<>();
List<String> correlationCode5 = Arrays.asList("100203", "4-1");
requirement5.put("correlation_code", correlationCode5);
requirement5.put("requirement_no", "100203");
requirement5.put("requirement_name", "是否有文件,若有,需附上文件-2");
requirement5.put("requirement_description", "");
requirementInfo.add(requirement5);
// 第六个需求
Map<String, Object> requirement6 = new HashMap<>();
List<String> correlationCode6 = Arrays.asList("100204");
requirement6.put("correlation_code", correlationCode6);
requirement6.put("requirement_no", "100203");
requirement6.put("requirement_name", "是否有文件,若有,需附上文件-2");
requirement6.put("requirement_description", "");
requirementInfo.add(requirement6);
// 第七个需求
Map<String, Object> requirement7 = new HashMap<>();
List<String> correlationCode7 = Arrays.asList("100204", "5-1");
requirement7.put("correlation_code", correlationCode7);
requirement7.put("requirement_no", "100204");
requirement7.put("requirement_name", "需求名称");
requirement7.put("requirement_description", "");
requirementInfo.add(requirement7);
return requirementInfo;
}
}

+ 15
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationUtil.java View File

@ -0,0 +1,15 @@
package com.digiwin.athena.app.service.quotation;
/**
* @author lz
* @version 1.0
* @title QuotationUtil
* @description
* @create 2024/4/29 10:01
*/
public class QuotationUtil {
public static final String DEMO_ATHENAOPT_REQUIREMENT_INFO_GET= "demo.athenaopt.requirement.info.get";
}

Loading…
Cancel
Save