Quellcode durchsuchen

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper into master

seyason vor 1 Jahr
Ursprung
Commit
c56aaa1fa1

+ 4 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/api.ts

@@ -0,0 +1,4 @@
+export const MOD = '/business'
+export const prefix = '/clue'
+export const GETSYSFILED = '/sys-dict/getListByCode'
+export const GETPERSONNEL = '/user/getSimpleActiveUserList'

+ 174 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -1,11 +1,183 @@
 <template>
-  <div>
-    business
+  <div class="h-full flex">
+    <div class="p-5 w-80 pr-0">
+      <div class="bg-white w-full h-full shadow-md rounded-md flex flex-col">
+        <div class="flex-1 p-3 overflow-y-auto">
+          <el-form :model="businessOpportunityForm" label-width="70px" style="max-width: 600px">
+            <el-form-item label="商机名称">
+              <el-input v-model="businessOpportunityForm.name" clearable placeholder="请输入"></el-input>
+            </el-form-item>
+            <el-form-item label="商机阶段">
+              <el-select v-model="businessOpportunityForm.stageId" placeholder="请选择">
+                <el-option v-for="item in fixedData.BusinessStage" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="客户名称">
+              <el-input v-model="businessOpportunityForm.customerName" clearable placeholder="请输入"></el-input>
+            </el-form-item>
+            <el-form-item label="联系人">
+              <el-input v-model="businessOpportunityForm.contactPerson" clearable placeholder="请输入"></el-input>
+            </el-form-item>
+            <el-form-item label="产品">
+              <el-select v-model="businessOpportunityForm.product" placeholder="请选择">
+                <el-option v-for="item in fixedData.Personnel" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="负责人">
+              <el-select v-model="businessOpportunityForm.inchargerId" placeholder="请选择">
+                <el-option v-for="item in fixedData.Personnel" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="创建时间">
+              <el-date-picker v-model="businessOpportunityForm.startTime" type="date" placeholder="请选择" :clearable="false"
+                format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
+            </el-form-item>
+            <el-form-item label="">
+              <el-date-picker v-model="businessOpportunityForm.endTime" type="date" placeholder="请选择" :clearable="false"
+                format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="w-full flex p-3 shadow-[0_-3px_5px_0px_rgba(0,0,0,0.2)]">
+          <El-button class="w-full">重置</El-Button>
+          <El-button type="primary" class="w-full">搜索</El-Button>
+        </div>
+      </div>
+    </div>
+    <div class="flex-1 p-5 overflow-auto">
+      <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
+        <div class="flex justify-end pb-3">
+          <el-button type="primary">新建商机</el-button>
+          <el-button type="primary">批量转移</el-button>
+          <el-button type="primary">批量删除</el-button>
+          <el-button type="primary">导入</el-button>
+          <el-button type="primary">导出</el-button>
+        </div>
+        <div class="flex-1 w-full overflow-hidden">
+          <el-table ref="clueTableRef" :data="businessTable" border v-loading="allLoading.businessTableLading"
+            style="width: 100%;height: 100%;">
+            <el-table-column type="selection" width="55" />
+            <el-table-column prop="name" label="商机名称" width="180">
+              <template #default="scope">
+                <el-button link type="primary" size="large">{{
+                  scope.row.name
+                }}</el-button>
+              </template>
+            </el-table-column>
+            <el-table-column prop="clueSourceId" label="客户名称" width="180"></el-table-column>
+            <el-table-column prop="phone" label="联系人" width="180">
+              <template #default="scope">
+                <el-button link type="primary" size="large">{{
+                  scope.row.phone
+                }}</el-button>
+              </template>
+            </el-table-column>
+            <el-table-column prop="email" label="商机金额" width="180"></el-table-column>
+            <el-table-column prop="customerIndustryId" label="商机阶段" width="180"></el-table-column>
+            <el-table-column prop="customerLevelId" label="预计成交" width="180"></el-table-column>
+            <el-table-column prop="inchargerId" label="负责人" width="180"></el-table-column>
+            <el-table-column prop="createName" label="创建人" width="180"></el-table-column>
+            <el-table-column prop="createTime" label="创建时间" width="180"></el-table-column>
+            <el-table-column label="操作" fixed="right" width="200">
+              <template #default="scope">
+                <el-button link type="primary" size="large">编辑</el-button>
+                <el-button link type="primary" size="large">新建任务</el-button>
+                <el-button link type="danger" size="large">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="flex justify-end pt-3">
+          <el-pagination layout="total, prev, pager, next, sizes" :total="businessTotalTable"
+            :hide-on-single-page="true" />
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <script lang="ts" setup>
+import { ref, reactive, onMounted, inject } from "vue";
+import { GETSYSFILED, MOD, GETPERSONNEL } from './api'
+import { post, get } from "@/utils/request";
+import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate } from '@/utils/tools'
 
+// 定义类型
+interface businessOpportunityFormType { // 线索筛选条件类型
+  name: string,
+  stageId: string | number,
+  customerName: string,
+  contactPerson: string,
+  product: string | number,
+  inchargerId: string | number,
+  startTime: string | number,
+  endTime: string | number,
+  pageIndex: string | number,
+  pageFrom: string | number
+}
+
+interface fixedDataInterface {
+  id: string | number,
+  companyId: string | number,
+  code: string,
+  name: string,
+  seq: string | number,
+}
+
+interface personnelInterface {
+  id: string | number,
+  name: string,
+  phone: string,
+  jobNumber: string
+}
+
+const businessTotalTable = ref(0)
+const businessTable = ref([
+  {name: '商机040101',phone: '张山'}
+])
+const allLoading = reactive({
+  businessTableLading: false
+})
+const businessOpportunityForm = reactive<businessOpportunityFormType>({
+  name: '',
+  stageId: '',
+  customerName: '',
+  contactPerson: '',
+  product: '',
+  inchargerId: '',
+  startTime: getFirstDayOfMonth(new Date()),
+  endTime: formatDate(new Date()),
+  pageIndex: 1,
+  pageFrom: 10
+})
+const fixedData = reactive({
+  BusinessStage: [] as fixedDataInterface[],
+  Personnel: [] as personnelInterface[]
+})
+
+async function getSystemField() {
+  const systemField = getAllListByCode(['商机阶段'])
+  for (let i in systemField) {
+    const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
+    for (let key of Object.keys(fixedData)) {
+      if (systemField[i] == key) {
+        Object.assign(fixedData, { [key]: data })
+      }
+    }
+  }
+
+  const { data } = await post(GETPERSONNEL, {})
+  fixedData.Personnel = data.map((item: any) => {
+    const { id, name, phone, jobNumber } = item
+    return {
+      id, name, phone, jobNumber
+    }
+  })
+}
+
+onMounted(() => {
+  getSystemField()
+})
 </script>
 
 <style lang="scss" scoped></style>

+ 10 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/TaskController.java

@@ -72,5 +72,15 @@ public class TaskController {
         return taskService.deleteTasks(taskIds);
     }
 
+    @RequestMapping("importData")
+    public HttpRespMsg importData(MultipartFile multipartFile){
+        return taskService.importData(multipartFile,request);
+    }
+
+    @RequestMapping("exportData")
+    public HttpRespMsg exportData(@RequestBody TaskDto taskDto) throws Exception {
+        return taskService.exportData(taskDto,request);
+    }
+
 }
 

+ 4 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/TaskService.java

@@ -29,4 +29,8 @@ public interface TaskService extends IService<Task> {
     HttpRespMsg updateTask(TaskDto taskDto, HttpServletRequest request);
 
     HttpRespMsg deleteTasks(List<Integer> taskIds);
+
+    HttpRespMsg importData(MultipartFile multipartFile, HttpServletRequest request);
+
+    HttpRespMsg exportData(TaskDto taskDto, HttpServletRequest request) throws Exception;
 }

+ 3 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ContactsServiceImpl.java

@@ -536,7 +536,7 @@ public class ContactsServiceImpl extends ServiceImpl<ContactsMapper, Contacts> i
             for (int i = 0; i < configObJSONArray.size(); i++) {
                 JSONObject target = configObJSONArray.getJSONObject(i);
                 String model = target.getString("model");
-                String targetName = model.substring(0, 1).toUpperCase() + model.substring(1);
+//                String targetName = model.substring(0, 1).toUpperCase() + model.substring(1);
                 Class<? extends ContactsVo> aClass = contactsVo.getClass();
                 String value="";
 //                String value = String.valueOf(aClass.getMethod("get" + targetName).invoke(contactsVo)==null?"":aClass.getMethod("get" + targetName).invoke(contactsVo));
@@ -548,10 +548,10 @@ public class ContactsServiceImpl extends ServiceImpl<ContactsMapper, Contacts> i
                     }
                 }*/
                 if(model.equals("sex")){
-                    value = String.valueOf(aClass.getMethod("getSex").invoke(contactsVo));
+                    value = String.valueOf(aClass.getMethod("getSex").invoke(contactsVo)).equals("null") ?"":String.valueOf(aClass.getMethod("getSex").invoke(contactsVo));
                 }
                 if(model.equals("name")){
-                    value = String.valueOf(aClass.getMethod("getName").invoke(contactsVo));
+                    value = String.valueOf(aClass.getMethod("getName").invoke(contactsVo)).equals("null")?"":String.valueOf(aClass.getMethod("getName").invoke(contactsVo));
                 }
                 item.add(value);
             }

+ 281 - 6
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -1,18 +1,15 @@
 package com.management.platform.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.additional.update.impl.LambdaUpdateChainWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.pagehelper.util.StringUtil;
 import com.management.platform.entity.*;
 import com.management.platform.entity.dto.TaskDto;
-import com.management.platform.entity.vo.ContactsVo;
+import com.management.platform.entity.vo.TasKVo;
 import com.management.platform.entity.vo.TasKVo;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
@@ -35,6 +32,8 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.io.*;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -66,6 +65,18 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
     @Resource
     private TaskRepeatDesignMapper taskRepeatDesignMapper;
 
+    @Resource
+    private WxCorpInfoService wxCorpInfoService;
+    
+    @Value(value = "${upload.path}")
+    private String path;
+
+    @Resource
+    private ExcelExportServiceImpl excelExportService;
+
+    @Resource
+    private SysFormMapper sysFormMapper;
+
 
     @Override
     @Transactional
@@ -231,6 +242,270 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
         return msg;
     }
 
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public HttpRespMsg importData(MultipartFile multipartFile, HttpServletRequest request) {
+        HttpRespMsg msg=new HttpRespMsg();
+        String fileName = multipartFile.getOriginalFilename();
+        File file = new File(fileName == null ? "file" : fileName);
+        User user = userMapper.selectById(request.getHeader("token"));
+        Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        
+        List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, companyId));
+        InputStream inputStream = null;
+        OutputStream outputStream = null;
+
+        try {
+            inputStream = multipartFile.getInputStream();
+            outputStream = new FileOutputStream(file);
+            byte[] buffer = new byte[4096];
+            int temp = 0;
+            while ((temp = inputStream.read(buffer, 0, 4096)) != -1) {
+                outputStream.write(buffer, 0, temp);
+            }
+            inputStream.close();
+            outputStream.close();
+
+            //解析表格
+            HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
+            //我们只需要第一个sheet
+            HSSFSheet sheet = workbook.getSheetAt(0);
+            //由于第一行需要指明列对应的标题
+            int rowNum = sheet.getLastRowNum();
+            //获取当前表单模板 校验规则
+            SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCode, "Task").eq(SysForm::getCompanyId, companyId).eq(SysForm::getIsCurrent, 1));
+            if(sysForm==null){
+                msg.setError("当前模块未配置自定义模板,需先完成配置");
+                return msg;
+            }
+
+            String config = sysForm.getConfig();
+            JSONObject configOb = JSON.parseObject(config);
+            JSONArray configObJSONArray = configOb.getJSONArray("list");
+
+            List<Task>  importTaskList=new ArrayList<>();
+            List<String> userNameList=new ArrayList<>();
+            HttpRespMsg respMsg=new HttpRespMsg();
+
+            for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
+                HSSFRow row = sheet.getRow(rowIndex);
+                if (row == null) {
+                    continue;
+                }
+                //跳过空行
+                if (ExcelUtil.isRowEmpty(row)) {
+                    continue;
+                }
+                //获取到当前行的列数据
+                int cellNum = row.getLastCellNum();
+
+                for (int i = 0; i < cellNum; i++) {
+                    JSONObject item = configObJSONArray.getJSONObject(i);
+                    String modelName = item.getString("model");
+                    HSSFCell cell = row.getCell(i);
+                    if(cell!=null){
+                        switch (item.getString("type")){
+                            case "time":cell.setCellType(CellType.NUMERIC);
+                                break;
+                            case "int":cell.setCellType(CellType.NUMERIC);
+                                break;
+                            default:cell.setCellType(CellType.STRING);
+                        }
+                    }
+                    if(modelName.equals("inchargerId")){
+                        if(!org.springframework.util.StringUtils.isEmpty(cell.getStringCellValue())){
+                            userNameList.add(cell.getStringCellValue());
+                        }
+                    }
+
+                }
+            }
+
+            System.out.println("参与搜素的人员列表"+userNameList + userNameList.size());
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&userNameList.size()>0){
+                respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
+                if(respMsg.code.equals("0")){
+                    msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
+                    return msg;
+                }
+            }
+            List<User> targetUserList= (List<User>) respMsg.data;
+
+            for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
+                HSSFRow row = sheet.getRow(rowIndex);
+                if (row == null) {
+                    continue;
+                }
+                //跳过空行
+                if (ExcelUtil.isRowEmpty(row)) {
+                    continue;
+                }
+                //获取到当前行的列数据
+                int cellNum = row.getLastCellNum();
+                Task task=new Task();
+                task.setCompanyId(companyId);
+                task.setCreaterId(user.getId());
+                task.setCreateDate(LocalDate.now());
+                for (int i = 0; i < cellNum; i++) {
+                    JSONObject item = configObJSONArray.getJSONObject(i);
+                    String modelName = item.getString("model");
+                    String className = modelName.substring(0, 1).toUpperCase() + modelName.substring(1);
+                    String getter="get"+className;
+                    String setter="set"+className;
+                    HSSFCell cell = row.getCell(i);
+                    if(cell!=null){
+                        switch (item.getString("type")){
+                            case "time":cell.setCellType(CellType.NUMERIC);
+                                break;
+                            case "int":cell.setCellType(CellType.NUMERIC);
+                                break;
+                            default:cell.setCellType(CellType.STRING);
+                        }
+                    }
+                    Class<Task> taskClass = Task.class;
+                    Field field = taskClass.getDeclaredField(modelName);
+                    Class<?> type = field.getType();
+                    Method method = taskClass.getMethod(setter, type);
+                    //校验当前列是否为必填
+                    JSONObject options = item.getJSONObject("options");
+                    JSONObject rules = options.getJSONObject("rules");
+                    Boolean required = rules.getBoolean("required");
+                    if(required){
+                        if(StringUtils.isEmpty(cell.getStringCellValue())){
+                            msg.setError(item.getString("label")+"值不能为空值");
+                            return msg;
+                        }
+                    }
+                    /*if(modelName.equals("taskCode")){
+                        if(!org.springframework.util.StringUtils.isEmpty(cell.getStringCellValue())){
+                            //系统中同公司已存在的产品编码 更新
+                            Optional<Task> first = taskList.stream().filter(p ->p.getTaskCode()!=null&& p.getTaskCode().equals(cell.getStringCellValue())).findFirst();
+                            if(first.isPresent()){
+                                task.setId(first.get().getId());
+                            }
+                        }
+                    }*/
+                    if(modelName.equals("inchargerId")){
+                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
+                            String userName = cell.getStringCellValue();
+                            Optional<User> first;
+                            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(userName)).findFirst();
+                                first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(userName))||(optional.isPresent()&&u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
+                            }else {
+                                first= userList.stream().filter(u -> u.getName().equals(userName)||(u.getJobNumber()!=null&&u.getJobNumber().equals(userName))).findFirst();
+                            }
+                            if (first.isPresent()) {
+                                task.setOwnerId(first.get().getId());
+                            } else {
+                                throw new Exception("["+userName+"]在系统中不存在");
+                            }
+                        }
+                    }
+                    /*if(cell.getCellType()==CellType.STRING.getCode()&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                        method.invoke(task,cell.getStringCellValue());
+                    } else if (cell.getCellType()==CellType.NUMERIC.getCode()) {
+
+
+                    }*/
+                    if (cell != null && cell.getCellTypeEnum() != CellType.BLANK) {
+                        if (cell.getCellTypeEnum() == CellType.STRING && cell.getStringCellValue() != null && !cell.getStringCellValue().isEmpty()) {
+                            // 字符串类型不为空
+                            method.invoke(task,cell.getStringCellValue());
+                        } else if (cell.getCellTypeEnum() == CellType.NUMERIC) {
+                            // 数值类型不为空
+                            double numericCellValue = cell.getNumericCellValue();
+                            if (type.getSimpleName().equals("Integer")){
+                                int intValue = (int) numericCellValue;
+                                method.invoke(task,intValue);
+                            }
+                            else {
+                                method.invoke(task, numericCellValue);
+                            }
+                        }
+                    }
+
+                }
+                importTaskList.add(task);
+            }
+
+            if(importTaskList.size()>0){
+                if(!saveOrUpdateBatch(importTaskList)){
+                    msg.setError("验证失败");
+                    return msg;
+                }
+            }
+
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg exportData(TaskDto taskDto, 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, "Task").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);
+        JSONArray configObJSONArray = configOb.getJSONArray("list");
+        List<List<String>> dataList=new ArrayList<>();
+        List<String> titleList=new ArrayList<>();
+        for (int i = 0; i < configObJSONArray.size(); i++) {
+            JSONObject item = configObJSONArray.getJSONObject(i);
+            titleList.add(item.getString("label"));
+        }
+        dataList.add(titleList);//设置表头
+
+        taskDto.setCompanyId(user.getCompanyId());
+        taskDto.setPageIndex(null).setPageSize(null);//暂时部不分页
+        List<TasKVo> taskVoList =taskMapper.getPageListTask(taskDto);
+        if (!taskVoList.isEmpty()){
+            taskVoList.forEach(tasKVo -> {
+                if (!tasKVo.getTaskExecutors().isEmpty()){
+                    Integer taskId = tasKVo.getId();
+                    LambdaQueryWrapper<TaskExecutor> lqw = new LambdaQueryWrapper<>();
+                    lqw.eq(TaskExecutor::getTaskId,taskId);
+                    List<TaskExecutor> taskExecutors = taskExecutorMapper.selectList(lqw);
+                    tasKVo.setTaskExecutors(taskExecutors);
+                }
+            });
+        }
+        for (TasKVo tasKVo : taskVoList) {
+            List<String> item=new ArrayList<>();
+            for (int i = 0; i < configObJSONArray.size(); i++) {
+                JSONObject target = configObJSONArray.getJSONObject(i);
+                String model = target.getString("model");
+//                String targetName = model.substring(0, 1).toUpperCase() + model.substring(1);
+                Class<? extends TasKVo> aClass = tasKVo.getClass();
+                String value="";
+//                String value = String.valueOf(aClass.getMethod("get" + targetName).invoke(tasKVo)==null?"":aClass.getMethod("get" + targetName).invoke(tasKVo));
+                /*if(model.equals("inchargerId")){
+                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                        value = "$userName"+String.valueOf(aClass.getMethod("getInchargerName").invoke(product))+"$";
+                    }else {
+                        value = String.valueOf(aClass.getMethod("getInchargerName").invoke(product));
+                    }
+                }*/
+                /*if(model.equals("sex")){
+                    value = String.valueOf(aClass.getMethod("getSex").invoke(tasKVo)).equals("null") ?"":String.valueOf(aClass.getMethod("getSex").invoke(tasKVo));
+                }*/
+                if(model.equals("taskName")){
+                    value = String.valueOf(aClass.getMethod("getTaskName").invoke(tasKVo)).equals("null")?"":String.valueOf(aClass.getMethod("getTaskName").invoke(tasKVo));
+                }
+                item.add(value);
+            }
+            dataList.add(item);
+        }
+        String fileName="联系人表导出_"+ System.currentTimeMillis();
+        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,dataList,path);
+    }
+
     public void updateTaskRepeatConfigure(Task task){
         task.setRepeatType(null).setRepeatEndNever(null).setRepeatEndCount(null)
                 .setRepeatEndDate(null).setRepeatDesignDay(null).setRepeatDesignSameday(null);

+ 6 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/TaskMapper.xml

@@ -124,7 +124,7 @@
             left join  task_executor on task.id=task_executor.task_id
 
         <where>
-            and 1=1 and is_delete=0
+            and 1=1 and task.is_delete=0
 
             <if test=" taskName!= null and taskName != ''">
                 AND task.task_name LIKE CONCAT('%', #{taskName}, '%')
@@ -167,7 +167,10 @@
             </if>
 
         </where>
-        limit #{pageIndex},#{pageSize}
+
+        <if test="pageIndex != null and pageSize != null">
+            LIMIT #{pageIndex}, #{pageSize}
+        </if>
 
     </select>
 
@@ -188,7 +191,7 @@
         left join  contacts on task.contacts_id=contacts.id
         left join  task_executor on task.id=task_executor.task_id
         <where>
-            and 1=1 and is_delete=0
+            and 1=1 and task.is_delete=0
 
             <if test=" taskName!= null and taskName != ''">
                 AND task.task_name LIKE CONCAT('%', #{taskName}, '%')