|
@@ -88,7 +88,7 @@ public class BusinessOpportunityController {
|
|
|
@RequestMapping("/exportData")
|
|
|
public HttpRespMsg exportData(BusinessOpportunity bo ,HttpServletRequest request) throws Exception {
|
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
|
- SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCompanyId, user.getCompanyId()).eq(SysForm::getCode, "Thread").eq(SysForm::getIsCurrent, 1));
|
|
|
+ SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCompanyId, user.getCompanyId()).eq(SysForm::getCode, "business").eq(SysForm::getIsCurrent, 1));
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, user.getCompanyId()));
|
|
|
String config = sysForm.getConfig();
|
|
|
JSONObject configOb = JSON.parseObject(config);
|
|
@@ -102,7 +102,7 @@ public class BusinessOpportunityController {
|
|
|
dataList.add(titleList);
|
|
|
HttpRespMsg msg = list(bo, request);
|
|
|
Map<String, Object> msgData = (Map<String, Object>) msg.getData();
|
|
|
- List<BusinessOpportunity> bos = (List<BusinessOpportunity>) msgData.get("record");
|
|
|
+ List<BusinessOpportunity> bos = (List<BusinessOpportunity>) msgData.get("data");
|
|
|
for (BusinessOpportunity bo1 : bos) {
|
|
|
List<String> item=new ArrayList<>();
|
|
|
for (int i = 0; i < configObJSONArray.size(); i++) {
|
|
@@ -132,7 +132,8 @@ public class BusinessOpportunityController {
|
|
|
String model = target.getString("model");
|
|
|
String targetName = model.substring(0, 1).toUpperCase() + model.substring(1);
|
|
|
Class<? extends BusinessOpportunity> aClass = bo1.getClass();
|
|
|
- String value = String.valueOf(aClass.getMethod("get" + targetName).invoke(bo1)==null?"":aClass.getMethod("get" + targetName).invoke(bo1));
|
|
|
+ Object o = aClass.getMethod("get" + targetName).invoke(bo1) == null ? "" : aClass.getMethod("get" + targetName).invoke(bo1);
|
|
|
+ String value = String.valueOf(o);
|
|
|
if(model.equals("inchargerId")){
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
value = "$userName"+String.valueOf(aClass.getMethod("getInchargerName").invoke(bo1))+"$";
|