|
@@ -492,28 +492,35 @@ public class PayServiceImpl implements PayService {
|
|
|
Map originator = ddr_new.getOriginator();
|
|
Map originator = ddr_new.getOriginator();
|
|
|
String userId = UtilMap.getString(originator, "userId");
|
|
String userId = UtilMap.getString(originator, "userId");
|
|
|
|
|
|
|
|
|
|
+ //所有附件类型使用
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
|
|
|
+ //写入OA审批的数据格式
|
|
|
|
|
+ List<Map> formValue = new ArrayList<>();
|
|
|
|
|
+
|
|
|
//附件
|
|
//附件
|
|
|
String key = UtilMap.getString(data, "attachmentKey");
|
|
String key = UtilMap.getString(data, "attachmentKey");
|
|
|
String value = UtilMap.getString(formData, key);
|
|
String value = UtilMap.getString(formData, key);
|
|
|
|
|
|
|
|
- //写入OA审批的数据格式
|
|
|
|
|
- List<Map> formValue = new ArrayList<>();
|
|
|
|
|
|
|
+ resultList.add(UtilMap.map("spaceId, fileName, fileSize, fileType, fileId", UtilMap.getString(formData, "textField_msve6for"),
|
|
|
|
|
+ UtilMap.getString(formData, "textField_msve6fos"), UtilMap.getString(formData, "textField_msve6fot"),
|
|
|
|
|
+ UtilMap.getString(formData, "textField_msve6fou"), UtilMap.getString(formData, "textField_msve6fox")));
|
|
|
|
|
|
|
|
//处理宜搭附件绑定至OA审批
|
|
//处理宜搭附件绑定至OA审批
|
|
|
JSONArray jsonArray = JSONArray.parseArray(value);
|
|
JSONArray jsonArray = JSONArray.parseArray(value);
|
|
|
- jsonArray.forEach(e->{
|
|
|
|
|
- JSONObject jsonObject = JSONObject.parseObject(e.toString());
|
|
|
|
|
- String downloadUrl = jsonObject.getString("downloadUrl");
|
|
|
|
|
-
|
|
|
|
|
- String fileFullName = jsonObject.getString("name");
|
|
|
|
|
- String url = ydClient.convertTemporaryUrl(downloadUrl, appType, systemToken);
|
|
|
|
|
-
|
|
|
|
|
- Map map = ddService.uploadFileFormUrlForOverflow(ddClient.getAccessToken(), userId, url, fileFullName, fileFullName.split("\\.")[1]);
|
|
|
|
|
- Map<String, Object> result = UtilMap.map("spaceId, fileName, fileSize, fileType, fileId", UtilMap.getString(map, "spaceId"), fileFullName,
|
|
|
|
|
- UtilMap.getString(map, "size"), UtilMap.getString(map, "extension"), UtilMap.getString(map, "id"));
|
|
|
|
|
- resultList.add(result);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (ObjectUtil.isNotNull(jsonArray) && jsonArray.size()>0){
|
|
|
|
|
+ jsonArray.forEach(e->{
|
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(e.toString());
|
|
|
|
|
+ String downloadUrl = jsonObject.getString("downloadUrl");
|
|
|
|
|
+
|
|
|
|
|
+ String fileFullName = jsonObject.getString("name");
|
|
|
|
|
+ String url = ydClient.convertTemporaryUrl(downloadUrl, appType, systemToken);
|
|
|
|
|
+
|
|
|
|
|
+ Map map = ddService.uploadFileFormUrlForOverflow(ddClient.getAccessToken(), userId, url, fileFullName, fileFullName.split("\\.")[1]);
|
|
|
|
|
+ Map<String, Object> result = UtilMap.map("spaceId, fileName, fileSize, fileType, fileId", UtilMap.getString(map, "spaceId"), fileFullName,
|
|
|
|
|
+ UtilMap.getString(map, "size"), UtilMap.getString(map, "extension"), UtilMap.getString(map, "id"));
|
|
|
|
|
+ resultList.add(result);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
formValue.add(UtilMap.map("name, value","合同正文, " + JSON.toJSONString(resultList)));
|
|
formValue.add(UtilMap.map("name, value","合同正文, " + JSON.toJSONString(resultList)));
|
|
|
|
|
|
|
|
//合同编号生成方式
|
|
//合同编号生成方式
|
|
@@ -623,16 +630,25 @@ public class PayServiceImpl implements PayService {
|
|
|
List<Map> ourDetails = new ArrayList<>();
|
|
List<Map> ourDetails = new ArrayList<>();
|
|
|
|
|
|
|
|
key = UtilMap.getString(data, "ourDetail");
|
|
key = UtilMap.getString(data, "ourDetail");
|
|
|
- String[] split = key.split(",");
|
|
|
|
|
- for (int i = 0; i < split.length; i++) {
|
|
|
|
|
- value = UtilMap.getString(formData, split[i]);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if ("/".equals(key)){
|
|
|
Map ourDetail = UtilMap.empty();
|
|
Map ourDetail = UtilMap.empty();
|
|
|
- ourDetail.put("value", value);
|
|
|
|
|
|
|
+ ourDetail.put("value", "/");
|
|
|
ourDetail.put("name", "我方主体名称");
|
|
ourDetail.put("name", "我方主体名称");
|
|
|
ourDetail.put("bizAlias","contract_mine_company_name");
|
|
ourDetail.put("bizAlias","contract_mine_company_name");
|
|
|
|
|
|
|
|
ourDetails.add(ourDetail);
|
|
ourDetails.add(ourDetail);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ String[] split = key.split(",");
|
|
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
|
|
+ value = UtilMap.getString(formData, split[i]);
|
|
|
|
|
+
|
|
|
|
|
+ Map ourDetail = UtilMap.empty();
|
|
|
|
|
+ ourDetail.put("value", value);
|
|
|
|
|
+ ourDetail.put("name", "我方主体名称");
|
|
|
|
|
+ ourDetail.put("bizAlias","contract_mine_company_name");
|
|
|
|
|
+
|
|
|
|
|
+ ourDetails.add(ourDetail);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ourDetails.add(UtilMap.map("name, value", "我方负责人, 待补充"));
|
|
// ourDetails.add(UtilMap.map("name, value", "我方负责人, 待补充"));
|
|
@@ -644,17 +660,27 @@ public class PayServiceImpl implements PayService {
|
|
|
List<Map> otherDetails = new ArrayList<>();
|
|
List<Map> otherDetails = new ArrayList<>();
|
|
|
|
|
|
|
|
key = UtilMap.getString(data, "otherDetail");
|
|
key = UtilMap.getString(data, "otherDetail");
|
|
|
- split = key.split(",");
|
|
|
|
|
- for (int i = 0; i < split.length; i++) {
|
|
|
|
|
-
|
|
|
|
|
- value = UtilMap.getString(formData, split[i]);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if ("/".equals(key)){
|
|
|
Map otherDetail = UtilMap.empty();
|
|
Map otherDetail = UtilMap.empty();
|
|
|
- otherDetail.put("value", value);
|
|
|
|
|
|
|
+ otherDetail.put("value", "/");
|
|
|
otherDetail.put("name", "对方主体名称");
|
|
otherDetail.put("name", "对方主体名称");
|
|
|
otherDetail.put("bizAlias", "contract_opposite_company_name");
|
|
otherDetail.put("bizAlias", "contract_opposite_company_name");
|
|
|
|
|
|
|
|
otherDetails.add(otherDetail);
|
|
otherDetails.add(otherDetail);
|
|
|
|
|
+
|
|
|
|
|
+ }else {
|
|
|
|
|
+ String[] split = key.split(",");
|
|
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
|
|
+
|
|
|
|
|
+ value = UtilMap.getString(formData, split[i]);
|
|
|
|
|
+
|
|
|
|
|
+ Map otherDetail = UtilMap.empty();
|
|
|
|
|
+ otherDetail.put("value", value);
|
|
|
|
|
+ otherDetail.put("name", "对方主体名称");
|
|
|
|
|
+ otherDetail.put("bizAlias", "contract_opposite_company_name");
|
|
|
|
|
+
|
|
|
|
|
+ otherDetails.add(otherDetail);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// otherDetails.add(UtilMap.map("name, value", "对方负责人, 待补充"));
|
|
// otherDetails.add(UtilMap.map("name, value", "对方负责人, 待补充"));
|
|
|
otherLastList.add(otherDetails);
|
|
otherLastList.add(otherDetails);
|