|
@@ -2,6 +2,7 @@ package com.malk.hangshi.service.Impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.malk.hangshi.service.DingTalkService;
|
|
import com.malk.hangshi.service.DingTalkService;
|
|
|
import com.malk.hangshi.service.PayService;
|
|
import com.malk.hangshi.service.PayService;
|
|
@@ -167,7 +168,8 @@ public class PayServiceImpl implements PayService {
|
|
|
List banzus = UtilMap.getList(formData, "departmentSelectField_mjb7ixr6");//班组
|
|
List banzus = UtilMap.getList(formData, "departmentSelectField_mjb7ixr6");//班组
|
|
|
List yixianbumen = UtilMap.getList(formData, "departmentSelectField_mjb7ixr6");//一线部门
|
|
List yixianbumen = UtilMap.getList(formData, "departmentSelectField_mjb7ixr6");//一线部门
|
|
|
|
|
|
|
|
- List attachments = UtilMap.getList(formData, "attachmentField_mkv4ln1q");
|
|
|
|
|
|
|
+ String attachmentStr = UtilMap.getString(formData, "attachmentField_mkv4ln1q");
|
|
|
|
|
+ JSONArray attachments = JSONArray.parseArray(attachmentStr);
|
|
|
|
|
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
|
if (ObjectUtil.isNotNull(attachments) && attachments.size() > 0){
|
|
if (ObjectUtil.isNotNull(attachments) && attachments.size() > 0){
|
|
@@ -175,9 +177,10 @@ public class PayServiceImpl implements PayService {
|
|
|
attachments.forEach(e->{
|
|
attachments.forEach(e->{
|
|
|
JSONObject value = (JSONObject) JSONObject.parse(e.toString());
|
|
JSONObject value = (JSONObject) JSONObject.parse(e.toString());
|
|
|
String[] split = UtilMap.getString(value, "name").split("\\.");
|
|
String[] split = UtilMap.getString(value, "name").split("\\.");
|
|
|
- String downLoadUrl = UtilMap.getString(value, "downLoadUrl");
|
|
|
|
|
|
|
+ String downLoadUrl = "https://c6eln1.aliwork.com"+UtilMap.getString(value, "downloadUrl");
|
|
|
String fileName = split[0];
|
|
String fileName = split[0];
|
|
|
String type = split[1];
|
|
String type = split[1];
|
|
|
|
|
+ downLoadUrl = ydClient.convertTemporaryUrl(downLoadUrl,"APP_PG9VWQVT23CRFBOOOG6Y","73D66971EQO1KI40NT9M96FHV3BK3CZNBQGJMWX1");
|
|
|
Map map = ddService.uploadFileFormUrlForOverflow(ddClient.getAccessToken(), "957340835", downLoadUrl, fileName, type);
|
|
Map map = ddService.uploadFileFormUrlForOverflow(ddClient.getAccessToken(), "957340835", downLoadUrl, fileName, type);
|
|
|
Map<String, Object> result = UtilMap.map("spaceId, fileName, fileSize, fileType, fileId", UtilMap.getString(map, "spaceId"), fileName,
|
|
Map<String, Object> result = UtilMap.map("spaceId, fileName, fileSize, fileType, fileId", UtilMap.getString(map, "spaceId"), fileName,
|
|
|
UtilMap.getString(map, "size"), UtilMap.getString(map, "extension"), UtilMap.getString(map, "id"));
|
|
UtilMap.getString(map, "size"), UtilMap.getString(map, "extension"), UtilMap.getString(map, "id"));
|
|
@@ -239,7 +242,6 @@ public class PayServiceImpl implements PayService {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
private static void extracted(Map formData, List<List<Map>> lastList) {
|
|
private static void extracted(Map formData, List<List<Map>> lastList) {
|
|
|
- List<Map> details = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
List<Map> mapList1 = (List<Map>) formData.get(OPERATION_CONTROL.get("投资公司"));
|
|
List<Map> mapList1 = (List<Map>) formData.get(OPERATION_CONTROL.get("投资公司"));
|
|
|
List<Map> mapList2 = (List<Map>) formData.get(WORK_SAFETY.get("投资公司"));
|
|
List<Map> mapList2 = (List<Map>) formData.get(WORK_SAFETY.get("投资公司"));
|
|
@@ -255,6 +257,7 @@ public class PayServiceImpl implements PayService {
|
|
|
content[0] = content[0] + v;
|
|
content[0] = content[0] + v;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
|
details.add(UtilMap.map("name, value","类型","(一)运行控制"));
|
|
details.add(UtilMap.map("name, value","类型","(一)运行控制"));
|
|
|
lastList.add(details);
|
|
lastList.add(details);
|
|
@@ -266,6 +269,7 @@ public class PayServiceImpl implements PayService {
|
|
|
content[0] = content[0] + v;
|
|
content[0] = content[0] + v;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
|
details.add(UtilMap.map("name, value","类型","(二)安全生产"));
|
|
details.add(UtilMap.map("name, value","类型","(二)安全生产"));
|
|
|
lastList.add(details);
|
|
lastList.add(details);
|
|
@@ -277,6 +281,7 @@ public class PayServiceImpl implements PayService {
|
|
|
content[0] = content[0] + v;
|
|
content[0] = content[0] + v;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
|
details.add(UtilMap.map("name, value","类型","(三)质量控制"));
|
|
details.add(UtilMap.map("name, value","类型","(三)质量控制"));
|
|
|
lastList.add(details);
|
|
lastList.add(details);
|
|
@@ -288,6 +293,7 @@ public class PayServiceImpl implements PayService {
|
|
|
content[0] = content[0] + v;
|
|
content[0] = content[0] + v;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
|
details.add(UtilMap.map("name, value","类型","下属公司"));
|
|
details.add(UtilMap.map("name, value","类型","下属公司"));
|
|
|
lastList.add(details);
|
|
lastList.add(details);
|
|
@@ -299,6 +305,7 @@ public class PayServiceImpl implements PayService {
|
|
|
content[0] = content[0] + v;
|
|
content[0] = content[0] + v;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
|
details.add(UtilMap.map("name, value","类型","一线部门"));
|
|
details.add(UtilMap.map("name, value","类型","一线部门"));
|
|
|
lastList.add(details);
|
|
lastList.add(details);
|
|
@@ -310,10 +317,12 @@ public class PayServiceImpl implements PayService {
|
|
|
content[0] = content[0] + v;
|
|
content[0] = content[0] + v;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
details.add(UtilMap.map("name, value","内容",content[0]));
|
|
|
details.add(UtilMap.map("name, value","类型","室"));
|
|
details.add(UtilMap.map("name, value","类型","室"));
|
|
|
lastList.add(details);
|
|
lastList.add(details);
|
|
|
}
|
|
}
|
|
|
|
|
+ List<Map> details = new ArrayList<>();
|
|
|
details.add(UtilMap.map("name, value","内容",UtilMap.getString(formData, "textareaField_mkg9hebk")));
|
|
details.add(UtilMap.map("name, value","内容",UtilMap.getString(formData, "textareaField_mkg9hebk")));
|
|
|
details.add(UtilMap.map("name, value","类型","班组"));
|
|
details.add(UtilMap.map("name, value","类型","班组"));
|
|
|
lastList.add(details);
|
|
lastList.add(details);
|
|
@@ -419,7 +428,7 @@ public class PayServiceImpl implements PayService {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
if (mapList4.size()>0 && ObjectUtil.isNotNull(mapList4)) {
|
|
if (mapList4.size()>0 && ObjectUtil.isNotNull(mapList4)) {
|
|
|
- content[0] = content[0] + "下属公司 \n";
|
|
|
|
|
|
|
+ content[0] = content[0] + "\n下属公司 \n";
|
|
|
mapList4.forEach(e1 -> {
|
|
mapList4.forEach(e1 -> {
|
|
|
e1.forEach((k, v) -> {
|
|
e1.forEach((k, v) -> {
|
|
|
content[0] = content[0] + v;
|
|
content[0] = content[0] + v;
|