|
@ -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; |
|
|
|
|
|
} |
|
|
|
|
|
} |