|
@@ -2,9 +2,11 @@ package com.qunzhixinxi.hnqz.admin.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.qunzhixinxi.hnqz.admin.api.constant.UpmsType;
|
|
|
import com.qunzhixinxi.hnqz.admin.api.entity.WmTaskSubmissionPercentRule;
|
|
|
+import com.qunzhixinxi.hnqz.admin.config.UpmsConfig;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.WmScorePackage;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.WmScorePackageStatus;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.WmTask;
|
|
@@ -52,6 +54,7 @@ public class WmDeptTaskServiceImpl implements WmDeptTaskService {
|
|
|
private final WmTaskService wmTaskService;
|
|
|
private final WmTaskTypeService wmTaskTypeService;
|
|
|
private final Sequence taskSequence;
|
|
|
+ private final UpmsConfig upmsConfig;
|
|
|
|
|
|
/**
|
|
|
* 企业任务保存-企业通用
|
|
@@ -117,11 +120,21 @@ public class WmDeptTaskServiceImpl implements WmDeptTaskService {
|
|
|
// 时间
|
|
|
taskContent.setTemp3(params.getMeetingTime());
|
|
|
// 文件上传
|
|
|
- taskContent.setTemp4(String.join(",", params.getFiles()));
|
|
|
+ StringBuilder temp4 = new StringBuilder();
|
|
|
+ if (ArrayUtil.isNotEmpty(params.getFiles())) {
|
|
|
+ for (int i = 0; i < params.getFiles().length; i++) {
|
|
|
+ String file = params.getFiles()[i];
|
|
|
+ temp4.append(StrUtil.startWith(file, "http")? file : upmsConfig.getClientUrl() + file);
|
|
|
+ if (i < params.getFiles().length - 1) {
|
|
|
+ temp4.append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ taskContent.setTemp4(temp4.toString());
|
|
|
// 外采费用
|
|
|
taskContent.setTemp5(params.getOutsourcingAmount());
|
|
|
// 凭证
|
|
|
- taskContent.setTemp6(String.join(",", params.getOutsourcingAmountProof()));
|
|
|
+ taskContent.setTemp6(this.convertFileUrlArrayToString(params.getFiles()));
|
|
|
// 任务积分
|
|
|
taskContent.setTemp7(String.valueOf(params.getScore()));
|
|
|
// 总结
|
|
@@ -206,19 +219,19 @@ public class WmDeptTaskServiceImpl implements WmDeptTaskService {
|
|
|
// 会议人次
|
|
|
taskContent.setTemp4(params.getMeetingNumber());
|
|
|
// 会议邀请函
|
|
|
- taskContent.setTemp5(String.join(",", params.getMeetingInvitationUrl()));
|
|
|
+ taskContent.setTemp5(this.convertFileUrlArrayToString(params.getMeetingInvitationUrl()));
|
|
|
// 会议计划表
|
|
|
- taskContent.setTemp6(String.join(",", params.getMeetingPlanUrl()));
|
|
|
+ taskContent.setTemp6(this.convertFileUrlArrayToString(params.getMeetingPlanUrl()));
|
|
|
// 会议签到表
|
|
|
- taskContent.setTemp7(String.join(",", params.getMeetingCheckInUrl()));
|
|
|
+ taskContent.setTemp7(this.convertFileUrlArrayToString(params.getMeetingCheckInUrl()));
|
|
|
// 现场照片
|
|
|
- taskContent.setTemp8(String.join(",", params.getLivePhotosUrl()));
|
|
|
+ taskContent.setTemp8(this.convertFileUrlArrayToString(params.getLivePhotosUrl()));
|
|
|
// 会议内容
|
|
|
- taskContent.setTemp9(String.join(",", params.getMeetingContentUrl()));
|
|
|
+ taskContent.setTemp9(this.convertFileUrlArrayToString(params.getMeetingContentUrl()));
|
|
|
// 外采费用
|
|
|
taskContent.setTemp10(params.getOutsourcingAmount());
|
|
|
// 外采费用凭证
|
|
|
- taskContent.setTemp11(String.join(",", params.getOutsourcingAmountProof()));
|
|
|
+ taskContent.setTemp11(this.convertFileUrlArrayToString(params.getOutsourcingAmountProof()));
|
|
|
// 总结
|
|
|
taskContent.setTemp12(params.getMeetingSummary());
|
|
|
log.info("保存taskContent参数:{}", taskContent);
|
|
@@ -300,19 +313,19 @@ public class WmDeptTaskServiceImpl implements WmDeptTaskService {
|
|
|
// 参加人次
|
|
|
taskContent.setTemp4(params.getMeetingNumber());
|
|
|
// 活动策划书
|
|
|
- taskContent.setTemp5(String.join(",", params.getEventPlannerUrl()));
|
|
|
+ taskContent.setTemp5(this.convertFileUrlArrayToString(params.getEventPlannerUrl()));
|
|
|
// 活动计划表
|
|
|
- taskContent.setTemp6(String.join(",", params.getMeetingPlanUrl()));
|
|
|
+ taskContent.setTemp6(this.convertFileUrlArrayToString(params.getMeetingPlanUrl()));
|
|
|
// 会议签到表
|
|
|
- taskContent.setTemp7(String.join(",", params.getMeetingCheckInUrl()));
|
|
|
+ taskContent.setTemp7(this.convertFileUrlArrayToString(params.getMeetingCheckInUrl()));
|
|
|
// 现场照片
|
|
|
- taskContent.setTemp8(String.join(",", params.getLivePhotosUrl()));
|
|
|
+ taskContent.setTemp8(this.convertFileUrlArrayToString(params.getLivePhotosUrl()));
|
|
|
// 会议内容
|
|
|
- taskContent.setTemp9(String.join(",", params.getMeetingContentUrl()));
|
|
|
+ taskContent.setTemp9(this.convertFileUrlArrayToString(params.getMeetingContentUrl()));
|
|
|
// 外采费用
|
|
|
taskContent.setTemp10(params.getOutsourcingAmount());
|
|
|
// 外采费用凭证
|
|
|
- taskContent.setTemp11(String.join(",", params.getOutsourcingAmountProof()));
|
|
|
+ taskContent.setTemp11(this.convertFileUrlArrayToString(params.getOutsourcingAmountProof()));
|
|
|
// 总结
|
|
|
taskContent.setTemp12(params.getMeetingSummary());
|
|
|
log.info("保存taskContent参数:{}", taskContent);
|
|
@@ -398,4 +411,24 @@ public class WmDeptTaskServiceImpl implements WmDeptTaskService {
|
|
|
wmScorePackageService.updateById(updatePackage);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 将文件地址数组转换为字符串
|
|
|
+ *
|
|
|
+ * @param array 数组
|
|
|
+ * @return {@link String}
|
|
|
+ */
|
|
|
+ private String convertFileUrlArrayToString(String[] array) {
|
|
|
+ StringBuilder temp = new StringBuilder();
|
|
|
+ if (ArrayUtil.isNotEmpty(array)) {
|
|
|
+ for (int i = 0; i < array.length; i++) {
|
|
|
+ String file = array[i];
|
|
|
+ temp.append(StrUtil.startWith(file, "http")? file : upmsConfig.getClientUrl() + file);
|
|
|
+ if (i < array.length - 1) {
|
|
|
+ temp.append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return temp.toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|