|
@@ -8,10 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.management.platform.entity.*;
|
|
import com.management.platform.entity.*;
|
|
import com.management.platform.entity.vo.TasKVo;
|
|
import com.management.platform.entity.vo.TasKVo;
|
|
-import com.management.platform.mapper.ClueLogMapper;
|
|
|
|
-import com.management.platform.mapper.ClueMapper;
|
|
|
|
-import com.management.platform.mapper.SysFormMapper;
|
|
|
|
-import com.management.platform.mapper.UserMapper;
|
|
|
|
|
|
+import com.management.platform.mapper.*;
|
|
import com.management.platform.service.ClueService;
|
|
import com.management.platform.service.ClueService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.management.platform.service.SysFunctionService;
|
|
import com.management.platform.service.SysFunctionService;
|
|
@@ -48,6 +45,8 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
private SysFunctionService sysFunctionService;
|
|
private SysFunctionService sysFunctionService;
|
|
@Autowired
|
|
@Autowired
|
|
private ClueMapper clueMapper;
|
|
private ClueMapper clueMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ClueUploadfileMapper clueUploadfileMapper;
|
|
@Resource
|
|
@Resource
|
|
private WxCorpInfoService wxCorpInfoService;
|
|
private WxCorpInfoService wxCorpInfoService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -152,10 +151,11 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
@Override
|
|
@Override
|
|
public Clue getInfo(Clue clue) {
|
|
public Clue getInfo(Clue clue) {
|
|
Clue clue1 = clueMapper.selectById(clue.getId());
|
|
Clue clue1 = clueMapper.selectById(clue.getId());
|
|
- QueryWrapper<ClueLog> queryWrapper = new QueryWrapper<>();
|
|
|
|
- queryWrapper.eq("clue_id", clue.getId());
|
|
|
|
- List<ClueLog> logs = clueLogMapper.selectList(queryWrapper);
|
|
|
|
- clue1.setClueLogList(logs);
|
|
|
|
|
|
+ clue1.setClueLogList(clueLogMapper.selectList(
|
|
|
|
+ new QueryWrapper<ClueLog>().eq("clue_id", clue.getId())
|
|
|
|
+ ));
|
|
|
|
+ clue1.setClueUploadfileList(clueUploadfileMapper.selectList(
|
|
|
|
+ new QueryWrapper<ClueUploadfile>().eq("clue_id", clue.getId())));
|
|
return clue1;
|
|
return clue1;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -176,20 +176,20 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void getAndTransfer(Clue clue,User user) {
|
|
|
|
|
|
+ public void getAndTransfer(Clue clue, User user) {
|
|
UpdateWrapper<Clue> updateWrapper = new UpdateWrapper<>();
|
|
UpdateWrapper<Clue> updateWrapper = new UpdateWrapper<>();
|
|
- updateWrapper.eq("id",clue.getId());
|
|
|
|
|
|
+ updateWrapper.eq("id", clue.getId());
|
|
String inchargerId = clue.getInchargerId();
|
|
String inchargerId = clue.getInchargerId();
|
|
ClueLog clueLog = new ClueLog();
|
|
ClueLog clueLog = new ClueLog();
|
|
clueLog.setUserId(user.getId());
|
|
clueLog.setUserId(user.getId());
|
|
clueLog.setClueId(clue.getId());
|
|
clueLog.setClueId(clue.getId());
|
|
clueLog.setCreatTime(new Date());
|
|
clueLog.setCreatTime(new Date());
|
|
- if (inchargerId == null ){
|
|
|
|
|
|
+ if (inchargerId == null) {
|
|
//认领
|
|
//认领
|
|
clueLog.setName("认领了线索");
|
|
clueLog.setName("认领了线索");
|
|
clue.setInchargerId(user.getId());
|
|
clue.setInchargerId(user.getId());
|
|
clueLogMapper.insert(clueLog);
|
|
clueLogMapper.insert(clueLog);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
//转移
|
|
//转移
|
|
clueLog.setName("转移了线索");
|
|
clueLog.setName("转移了线索");
|
|
clue.setInchargerId(clue.getInchargerId());
|
|
clue.setInchargerId(clue.getInchargerId());
|
|
@@ -201,16 +201,18 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public int getTotal1(Clue clue, User user) {
|
|
public int getTotal1(Clue clue, User user) {
|
|
- return clueMapper.getTotal1(clue,user.getId());
|
|
|
|
|
|
+ return clueMapper.getTotal1(clue, user.getId());
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public int getTotal2(Clue clue, User user) {
|
|
public int getTotal2(Clue clue, User user) {
|
|
- return clueMapper.getTotal2(clue,user.getId());
|
|
|
|
|
|
+ return clueMapper.getTotal2(clue, user.getId());
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
@Value(value = "${upload.path}")
|
|
@Value(value = "${upload.path}")
|
|
private String path;
|
|
private String path;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg exportData(Clue clue, HttpServletRequest request) throws Exception {
|
|
public HttpRespMsg exportData(Clue clue, HttpServletRequest request) throws Exception {
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
@@ -219,8 +221,8 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
String config = sysForm.getConfig();
|
|
String config = sysForm.getConfig();
|
|
JSONObject configOb = JSON.parseObject(config);
|
|
JSONObject configOb = JSON.parseObject(config);
|
|
JSONArray configObJSONArray = configOb.getJSONArray("list");
|
|
JSONArray configObJSONArray = configOb.getJSONArray("list");
|
|
- List<List<String>> dataList=new ArrayList<>();
|
|
|
|
- List<String> titleList=new ArrayList<>();
|
|
|
|
|
|
+ List<List<String>> dataList = new ArrayList<>();
|
|
|
|
+ List<String> titleList = new ArrayList<>();
|
|
for (int i = 0; i < configObJSONArray.size(); i++) {
|
|
for (int i = 0; i < configObJSONArray.size(); i++) {
|
|
JSONObject item = configObJSONArray.getJSONObject(i);
|
|
JSONObject item = configObJSONArray.getJSONObject(i);
|
|
titleList.add(item.getString("label"));
|
|
titleList.add(item.getString("label"));
|
|
@@ -230,8 +232,8 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
|
|
|
clue.setCompanyId(user.getCompanyId());
|
|
clue.setCompanyId(user.getCompanyId());
|
|
|
|
|
|
- String fileName="线索表导出_"+ System.currentTimeMillis();
|
|
|
|
- return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,dataList,path);
|
|
|
|
|
|
+ String fileName = "线索表导出_" + System.currentTimeMillis();
|
|
|
|
+ return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, dataList, path);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|