|
@@ -268,7 +268,7 @@ public class AWImplClient implements AWClint {
|
|
|
public Map doCheck(String taskId, boolean isTask) {
|
|
|
|
|
|
log.info("检查项check, {}", taskId);
|
|
|
- Map taskData = _getTaskFieldMap(taskId, AWServer.TASK_CODE, AWServer.TASK_CHECK_LINK, AWServer.TASK_ROLE, AWServer.TASK_STAGE, AWServer.TASK_CHECK_STATUS);
|
|
|
+ Map taskData = _getTaskFieldMap(taskId, AWServer.TASK_CODE, AWServer.TASK_CHECK_LINK, AWServer.TASK_ROLE, AWServer.TASK_STAGE, AWServer.TASK_CHECK_STATUS, AWServer.TASK_PRODUCT, AWServer.TASK_PRODUCT_VERSION);
|
|
|
Map rTask = UtilMap.getMap(taskData, "task");
|
|
|
String pCode = UtilMap.getString(rTask, "projectId");
|
|
|
if (AWServer.PROJECT_IGNORE_ID.contains(pCode)) {
|
|
@@ -332,7 +332,8 @@ public class AWImplClient implements AWClint {
|
|
|
formData.putAll(UtilMap.map("selectField_lqxuswze, textField_lrndwu07, textField_lqxuc9m4", UtilMap.getString(rProject, "textField_lrj7vnxb"), UtilMap.getString(rProject, "textareaField_lrj7vnxl"), UtilMap.getString(rProject, "textField_lqxtykcd")));
|
|
|
// 任务信息 [TBManager 操作]
|
|
|
Map<String, String> extra = (Map) tbClient.idMapQuery(creatorId, "dingTalk-user", ddConf.getCorpId()).get(0).get("extra");
|
|
|
- formData.putAll(UtilMap.map("textField_lrndwu09, textField_lrndwu0a, textField_lrndwu0b, employeeField_lrndwu0e", rTask.get("content"), taskData.get(AWServer.TASK_STAGE), taskData.get(AWServer.TASK_ROLE), Arrays.asList(UtilMap.map("value, name", extra.get("userId"), extra.get("userId")))));
|
|
|
+ // ppExt: TB映射钉钉信息仅返回 userId, 人员组件返回前端展示需要 name. 通过页面公式临时自动加载, 可通过TB接口或钉钉用户接口查询
|
|
|
+ formData.putAll(UtilMap.map("textField_lrndwu09, textField_lrndwu0a, textField_lrndwu0b, employeeField_lrndwu0e, textField_lvbrueqs, textField_lvbrueqt", rTask.get("content"), taskData.get(AWServer.TASK_STAGE), taskData.get(AWServer.TASK_ROLE), Arrays.asList(UtilMap.map("value, name", extra.get("userId"), extra.get("userId"))), taskData.get(AWServer.TASK_PRODUCT), taskData.get(AWServer.TASK_PRODUCT_VERSION)));
|
|
|
// 返回检查项
|
|
|
formData.put("tableField_lqxxgj4s", tList.stream().map(item -> {
|
|
|
item.put("associationFormField_lrrnem5r", YDConf.associationForm(ydConf.getAppType(), _matchFormUuid("CHECK"), UtilMap.getString(item, "instanceId"), UtilMap.getString(item, "textField_lrnd3h0r"), "", false));
|
|
@@ -826,8 +827,10 @@ public class AWImplClient implements AWClint {
|
|
|
// 推送crm: prd 单次推送必须为相同料号
|
|
|
void _pushCRM(String projectId, Map record) {
|
|
|
log.info("推送crm, {}", record);
|
|
|
- Map param = UtilMap.map("username, password, client_id, client_secret, grant_type", "interface@awinic.com.cn.uat", "welcome12", "3MVG959Nd8JMmavT2IGqAtf_hIbxepsElGbOpno6AO8KdQJSpSNqY9bnLRU2exuAEh3qIXb1oTn98S9h0WWZk", "3C9FC7427866D69586964F65A16D288EBBB1544335DD9FF3A03DE21DF14A7C6A", "password");
|
|
|
- String rsp = UtilHttp.doPost("https://test.salesforce.com/services/oauth2/token", null, param, UtilMap.empty());
|
|
|
+ //Map param = UtilMap.map("username, password, client_id, client_secret, grant_type", "interface@awinic.com.cn.uat", "welcome12", "3MVG959Nd8JMmavT2IGqAtf_hIbxepsElGbOpno6AO8KdQJSpSNqY9bnLRU2exuAEh3qIXb1oTn98S9h0WWZk", "3C9FC7427866D69586964F65A16D288EBBB1544335DD9FF3A03DE21DF14A7C6A", "password");
|
|
|
+ Map param = UtilMap.map("username, password, client_id, client_secret, grant_type", "interface@awinic.com.cn", "welcome12", "3MVG9d8..z.hDcPKSaWop76C8GRQarYhn0LpBnP_U2S3VJaT8a6l05e2pDkdk5oE4MInQYwyLMpqWM7bLDzqm", "26A90098BDBE8C356817938986472730BAE5D9536DA9096AC7C45A4973867100", "password");
|
|
|
+ //String rsp = UtilHttp.doPost("https://test.salesforce.com/services/oauth2/token", null, param, UtilMap.empty());
|
|
|
+ String rsp = UtilHttp.doPost("https://login.salesforce.com/services/oauth2/token", null, param, UtilMap.empty());
|
|
|
Map result = (Map) JSON.parse(rsp);
|
|
|
Map header = UtilMap.map("Authorization", "OAuth " + result.get("access_token"));
|
|
|
rsp = UtilHttp.doPost(UtilMap.getString(result, "instance_url") + "/services/apexrest/TBProductStageTimeRest", header, null, Arrays.asList(record), null);
|
|
@@ -1011,6 +1014,21 @@ public class AWImplClient implements AWClint {
|
|
|
log.info("同步预检项 ##, {}", type);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 提供verifier数据读取服务
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<Map> syncVerifier(String projectCode) {
|
|
|
+ List<Map> dataList = ydService.queryFormData_all(YDParam.builder()
|
|
|
+ .formUuid("FORM-23B67983E91C4ED3B063F9B629D6E964SGHH")
|
|
|
+ .searchCondition(JSON.toJSONString(UtilMap.map("textField_lt6xd8lm", projectCode)))
|
|
|
+ .build());
|
|
|
+
|
|
|
+ return dataList.stream().map(item -> {
|
|
|
+ return item;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
public void test() {
|