|
@@ -4,35 +4,24 @@ import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
-import com.management.platform.entity.*;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.management.platform.entity.Company;
|
|
|
|
+import com.management.platform.entity.SysForm;
|
|
import com.management.platform.mapper.CompanyMapper;
|
|
import com.management.platform.mapper.CompanyMapper;
|
|
import com.management.platform.mapper.SysFormMapper;
|
|
import com.management.platform.mapper.SysFormMapper;
|
|
import com.management.platform.mapper.UserMapper;
|
|
import com.management.platform.mapper.UserMapper;
|
|
import com.management.platform.service.SysFormService;
|
|
import com.management.platform.service.SysFormService;
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.management.platform.util.ExcelUtil;
|
|
import com.management.platform.util.ExcelUtil;
|
|
import com.management.platform.util.HttpRespMsg;
|
|
import com.management.platform.util.HttpRespMsg;
|
|
import com.management.platform.util.MessageUtils;
|
|
import com.management.platform.util.MessageUtils;
|
|
-import org.apache.poi.hssf.usermodel.*;
|
|
|
|
-import org.apache.poi.ss.usermodel.*;
|
|
|
|
-import org.apache.poi.ss.util.CellRangeAddressList;
|
|
|
|
-import org.apache.poi.xssf.streaming.SXSSFCell;
|
|
|
|
-import org.apache.poi.xssf.streaming.SXSSFRow;
|
|
|
|
-import org.apache.poi.xssf.streaming.SXSSFSheet;
|
|
|
|
-import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
|
|
|
-import org.apache.poi.xssf.usermodel.XSSFColor;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
-import java.io.File;
|
|
|
|
-import java.io.FileOutputStream;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -69,6 +58,7 @@ public class SysFormServiceImpl extends ServiceImpl<SysFormMapper, SysForm> impl
|
|
msg.setError("当前表单未配置模板,请先完成模板配置");
|
|
msg.setError("当前表单未配置模板,请先完成模板配置");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
+
|
|
if (!code.equals("Contract")) {
|
|
if (!code.equals("Contract")) {
|
|
String config = sysForm.getConfig();
|
|
String config = sysForm.getConfig();
|
|
JSONObject configOb = JSON.parseObject(config);
|
|
JSONObject configOb = JSON.parseObject(config);
|
|
@@ -89,7 +79,7 @@ public class SysFormServiceImpl extends ServiceImpl<SysFormMapper, SysForm> impl
|
|
heads.add(item.getString("label"));
|
|
heads.add(item.getString("label"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (code.equals("Business")){
|
|
|
|
|
|
+ if (code.equals("Business")) {
|
|
for (int i = 0; i < heads.size(); i++) {
|
|
for (int i = 0; i < heads.size(); i++) {
|
|
String s = heads.get(i);
|
|
String s = heads.get(i);
|
|
if (s.contains("商机")) {
|
|
if (s.contains("商机")) {
|
|
@@ -98,9 +88,15 @@ public class SysFormServiceImpl extends ServiceImpl<SysFormMapper, SysForm> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
- Collections.addAll(heads,"合同编号","合同名称","合同金额","合同类型","计划开始时间","计划结束时间","部门","自定义字段","备注","是否已回款","回款日期","金额","是否已开票","开票日期","发票种类","税率","税额");
|
|
|
|
|
|
+ if (company.getIsSimple()==1 &&code.equals("Task")){
|
|
|
|
+ heads.clear();
|
|
|
|
+ Collections.addAll(heads, "任务名称", "执行人", "开始时间", "截止时间", "客户名称","客户类型", "预约工作内容", "预约金额", "实际工作内容", "实际金额", "用户反馈");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ Collections.addAll(heads, "合同编号", "合同名称", "合同金额", "合同类型", "计划开始时间", "计划结束时间", "部门", "自定义字段", "备注", "是否已回款", "回款日期", "金额", "是否已开票", "开票日期", "发票种类", "税率", "税额");
|
|
}
|
|
}
|
|
|
|
+
|
|
List<List<String>> allList = new ArrayList<>();
|
|
List<List<String>> allList = new ArrayList<>();
|
|
allList.add(heads);
|
|
allList.add(heads);
|
|
String title;
|
|
String title;
|