Browse Source

合同添加自定义字段

yusm 5 months ago
parent
commit
409b1d30cd

+ 32 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/Contract.java

@@ -16,11 +16,11 @@ import org.springframework.format.annotation.DateTimeFormat;
 
 /**
  * <p>
- *
+ * 
  * </p>
  *
  * @author Seyason
- * @since 2024-09-14
+ * @since 2024-11-27
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -172,6 +172,36 @@ public class Contract extends Model<Contract> {
     @TableField("sec_type_id")
     private Integer secTypeId;
 
+    /**
+     * 自定义字段存值
+     */
+    @TableField("plate1")
+    private String plate1;
+
+    /**
+     * 自定义字段存值
+     */
+    @TableField("plate2")
+    private String plate2;
+
+    /**
+     * 自定义字段存值
+     */
+    @TableField("plate3")
+    private String plate3;
+
+    /**
+     * 自定义字段存值
+     */
+    @TableField("plate4")
+    private String plate4;
+
+    /**
+     * 自定义字段存值
+     */
+    @TableField("plate5")
+    private String plate5;
+
     /**
      * 二级分类名称
      */

+ 0 - 12
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/DingDingService.java

@@ -53,16 +53,4 @@ public interface DingDingService {
     String inactiveUserNotInAuthRange(String corpid);
 
     HttpRespMsg fixAttendance(Integer companyId);
-
-    String getTranslationMediaId(String fileName,CompanyDingding dingding) throws Exception;
-
-    String syncTranslation(String mediaId,String fileName,String unionId,CompanyDingding dingding) throws Exception;
-
-    String getSyncTranslationResult(String jobId,CompanyDingding dingding) throws Exception;
-
-    HttpRespMsg getAuthInfo(String corpid) throws Exception;
-
-    HttpRespMsg refreshUserCardTime(Integer companyId, String userId, String date);
-
-    UserDingdingTime listUserScheduleByDay(Integer companyId, String userId, String date);
 }

+ 6 - 6
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/ExcelExportService.java

@@ -9,11 +9,11 @@ import java.util.Map;
 
 public interface ExcelExportService {
     public void testRead(String jobId);
-    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception;
-    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception;
-    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception;
-    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndListNew(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception;
-    public HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title) throws Exception;
+    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception;
+    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception;
+    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception;
+    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndListNew(WxCorpInfo wxCorpInfo, String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception;
+    public HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo, String title) throws Exception;
     void testAdd(String jobId);
-    HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String fileName, List<List<String>> allList, List<Map> mapList, String path) throws Exception;
+    HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo, String fileName, List<List<String>> allList, List<Map> mapList, String path) throws Exception;
 }

+ 2 - 5
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java

@@ -322,7 +322,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         }
         String fileName = MessageUtils.message("contract.export")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,allList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,allList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -1191,7 +1191,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             return httpRespMsg;
         }
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
-        CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
         HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus);
         HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
         List<ContractPageVO> data = (List<ContractPageVO>)resultDate.get("data");
@@ -1449,8 +1448,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
                 item.add(contract.getEndDate() == null ? "" : contract.getEndDate() + "");
                 if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1) {
                     contract.setCreatorName("$userName=" + contract.getCreatorWxCorpId() + "$");
-                } else if (dingding != null && dingding.getContactNeedTranslate() == 1) {
-                    contract.setCreatorName("$userName=" + contract.getCreatorName() + "$");
                 } else {
                     contract.setCreatorName(contract.getCreatorName());
                 }
@@ -1481,7 +1478,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         }
         String fileName = MessageUtils.message("contract.export")+System.currentTimeMillis();
         try {
-            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName,allList, path);
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,allList, path);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 8 - 227
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java

@@ -1,6 +1,5 @@
 package com.management.platform.service.impl;
 
-import com.management.platform.entity.CompanyDingding;
 import com.management.platform.entity.CorpwxJobResult;
 import com.management.platform.entity.User;
 import com.management.platform.entity.WxCorpInfo;
@@ -70,7 +69,7 @@ public class ExcelExportServiceImpl implements ExcelExportService {
         }
     }
 
-    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception {
+    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -149,52 +148,13 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
-        }else if(dingding != null && dingding.getContactNeedTranslate() == 1){
-            User user = userMapper.selectById(request.getHeader("token"));
-            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
-            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
-            System.out.println("上传待转译文件到钉钉, jobId==" + jobId);
-            int i = 0;
-            String syncTranslationResult = null;
-            /**
-             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
-             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-             */
-            long t = System.currentTimeMillis();
-            while (i < 30) {
-                if (i < 10) {
-                    Thread.sleep(300);
-                } else if (i < 20){
-                    Thread.sleep(1000);
-                } else {
-                    Thread.sleep(3000);
-                }
-                System.out.println("i=="+i+", "+LocalDateTime.now());
-                Integer status = corpddJobCenter.get(jobId);
-                if (status != null) {
-                    if (status == 1) {
-                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
-                        corpddJobCenter.remove(jobId);
-                    }
-                    break;
-                }
-                i++;
-            }
-            if (syncTranslationResult != null) {
-                long t2 = System.currentTimeMillis();
-                System.out.println("钉钉转译文件后地址是:"+syncTranslationResult+",耗时:" + (t2 - t) + "ms");
-                httpRespMsg.data = syncTranslationResult;
-            } else {
-                //httpRespMsg.setError("处理超时...");
-                httpRespMsg.setError(MessageUtils.message("request.outTime"));
-            }
         }else {
             httpRespMsg.data = resp;
         }
         return httpRespMsg;
     }
 
-    public HttpRespMsg exportGeneralExcelByTitleAndListNew(String userId,WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception {
+    public HttpRespMsg exportGeneralExcelByTitleAndListNew(String userId,WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -250,53 +210,14 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
-        }else if(dingding != null && dingding.getContactNeedTranslate() == 1){
-            User user = userMapper.selectById(request.getHeader("token"));
-            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
-            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
-            System.out.println("上传待转译文件到钉钉, jobId==" + jobId);
-            int i = 0;
-            String syncTranslationResult = null;
-            /**
-             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
-             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-             */
-            long t = System.currentTimeMillis();
-            while (i < 30) {
-                if (i < 10) {
-                    Thread.sleep(300);
-                } else if (i < 20){
-                    Thread.sleep(1000);
-                } else {
-                    Thread.sleep(3000);
-                }
-                System.out.println("i=="+i+", "+LocalDateTime.now());
-                Integer status = corpddJobCenter.get(jobId);
-                if (status != null) {
-                    if (status == 1) {
-                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
-                        corpddJobCenter.remove(jobId);
-                    }
-                    break;
-                }
-                i++;
-            }
-            if (syncTranslationResult != null) {
-                long t2 = System.currentTimeMillis();
-                System.out.println("钉钉转译文件后地址是:"+syncTranslationResult+",耗时:" + (t2 - t) + "ms");
-                httpRespMsg.data = syncTranslationResult;
-            } else {
-                //httpRespMsg.setError("处理超时...");
-                httpRespMsg.setError(MessageUtils.message("request.outTime"));
-            }
-        }else {
+        } else {
             httpRespMsg.data = resp;
         }
         return httpRespMsg;
     }
 
 
-    public HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, List<Map> mapList, String downloadPath) throws Exception {
+    public HttpRespMsg exportGeneralExcelForExpense(WxCorpInfo wxCorpInfo,  String title, List<List<String>> list, List<Map> mapList, String downloadPath) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -338,41 +259,13 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
-        }else if(dingding != null && dingding.getContactNeedTranslate() == 1){
-            User user = userMapper.selectById(request.getHeader("token"));
-            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
-            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
-            int i = 0;
-            String syncTranslationResult = null;
-            /**
-             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
-             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-             */
-            while (i < 10) {
-                Thread.sleep(300);
-                Integer status = corpddJobCenter.get(jobId);
-                if (status != null) {
-                    if (status == 1) {
-                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
-                        corpddJobCenter.remove(jobId);
-                    }
-                    break;
-                }
-                i++;
-            }
-            if (syncTranslationResult != null) {
-                httpRespMsg.data = syncTranslationResult;
-            } else {
-                //httpRespMsg.setError("处理超时...");
-                httpRespMsg.setError(MessageUtils.message("request.outTime"));
-            }
         }else {
             httpRespMsg.data = resp;
         }
         return httpRespMsg;
     }
 
-    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>> list, String downloadPath) throws Exception {
+    public HttpRespMsg exportGeneralExcelByTitleAndList2(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String resp = ExcelUtil.exportGeneralExcelByTitleAndList2(title, list, downloadPath);
         if (title.contains("/")) {
@@ -414,34 +307,6 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
-        }else if(dingding != null && dingding.getContactNeedTranslate() == 1){
-            User user = userMapper.selectById(request.getHeader("token"));
-            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
-            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix, user.getDingdingUnionid(),dingding);
-            int i = 0;
-            String syncTranslationResult = null;
-            /**
-             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
-             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-             */
-            while (i < 10) {
-                Thread.sleep(300);
-                Integer status = corpddJobCenter.get(jobId);
-                if (status != null) {
-                    if (status == 1) {
-                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
-                        corpddJobCenter.remove(jobId);
-                    }
-                    break;
-                }
-                i++;
-            }
-            if (syncTranslationResult != null) {
-                httpRespMsg.data = syncTranslationResult;
-            } else {
-                //httpRespMsg.setError("处理超时...");
-                httpRespMsg.setError(MessageUtils.message("request.outTime"));
-            }
         }else {
             httpRespMsg.data = resp;
         }
@@ -449,7 +314,7 @@ public class ExcelExportServiceImpl implements ExcelExportService {
     }
 
 
-    public  HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception {
+    public  HttpRespMsg exportMultiSheetGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>>[] multiSheetList, String downloadPath,String[] sheetsName) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String resp = ExcelUtil.exportMultiSheetGeneralExcelByTitleAndList(title,multiSheetList, downloadPath,sheetsName);
         if (title.contains("/")) {
@@ -491,34 +356,6 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
-        }else if(dingding != null && dingding.getContactNeedTranslate() == 1){
-            User user = userMapper.selectById(request.getHeader("token"));
-            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
-            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix,user.getDingdingUnionid(), dingding);
-            int i = 0;
-            String syncTranslationResult = null;
-            /**
-             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
-             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-             */
-            while (i < 10) {
-                Thread.sleep(300);
-                Integer status = corpddJobCenter.get(jobId);
-                if (status != null) {
-                    if (status == 1) {
-                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
-                        corpddJobCenter.remove(jobId);
-                    }
-                    break;
-                }
-                i++;
-            }
-            if (syncTranslationResult != null) {
-                httpRespMsg.data = syncTranslationResult;
-            } else {
-                //httpRespMsg.setError("处理超时...");
-                httpRespMsg.setError(MessageUtils.message("request.outTime"));
-            }
         }else {
             httpRespMsg.data = resp;
         }
@@ -526,7 +363,7 @@ public class ExcelExportServiceImpl implements ExcelExportService {
     }
 
     @Override
-    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndListNew(WxCorpInfo wxCorpInfo, CompanyDingding dingding, String title, List<List<String>>[] multiSheetList, String downloadPath, String[] sheetsName) throws Exception {
+    public HttpRespMsg exportMultiSheetGeneralExcelByTitleAndListNew(WxCorpInfo wxCorpInfo,  String title, List<List<String>>[] multiSheetList, String downloadPath, String[] sheetsName) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String resp = ExcelUtil.exportMultiSheetGeneralExcelByTitleAndListNew(title,multiSheetList, downloadPath,sheetsName);
         if (title.contains("/")) {
@@ -568,41 +405,13 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
-        }else if(dingding != null && dingding.getContactNeedTranslate() == 1){
-            User user = userMapper.selectById(request.getHeader("token"));
-            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
-            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix,user.getDingdingUnionid(), dingding);
-            int i = 0;
-            String syncTranslationResult = null;
-            /**
-             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
-             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-             */
-            while (i < 10) {
-                Thread.sleep(300);
-                Integer status = corpddJobCenter.get(jobId);
-                if (status != null) {
-                    if (status == 1) {
-                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
-                        corpddJobCenter.remove(jobId);
-                    }
-                    break;
-                }
-                i++;
-            }
-            if (syncTranslationResult != null) {
-                httpRespMsg.data = syncTranslationResult;
-            } else {
-                //httpRespMsg.setError("处理超时...");
-                httpRespMsg.setError(MessageUtils.message("request.outTime"));
-            }
         }else {
             httpRespMsg.data = resp;
         }
         return httpRespMsg;
     }
 
-    public  HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo, CompanyDingding dingding,String title) throws Exception {
+    public  HttpRespMsg exportTranForwx(WxCorpInfo wxCorpInfo, String title) throws Exception {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -643,34 +452,6 @@ public class ExcelExportServiceImpl implements ExcelExportService {
                 //httpRespMsg.setError("处理超时...");
                 httpRespMsg.setError(MessageUtils.message("request.outTime"));
             }
-        }else if(dingding != null && dingding.getContactNeedTranslate() == 1){
-            User user = userMapper.selectById(request.getHeader("token"));
-            String mediaId = dingDingService.getTranslationMediaId(fileUrlSuffix,dingding);
-            String jobId = dingDingService.syncTranslation(mediaId,fileUrlSuffix,user.getDingdingUnionid(), dingding);
-            int i = 0;
-            String syncTranslationResult = null;
-            /**
-             * 异步上传转译文件的任务完成时会触发回调,在DingDingController中的callback实现了对回调的处理,存储到corpddJobCenter缓存中
-             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
-             */
-            while (i < 10) {
-                Thread.sleep(300);
-                Integer status = corpddJobCenter.get(jobId);
-                if (status != null) {
-                    if (status == 1) {
-                        syncTranslationResult = dingDingService.getSyncTranslationResult(jobId,dingding);
-                        corpddJobCenter.remove(jobId);
-                    }
-                    break;
-                }
-                i++;
-            }
-            if (syncTranslationResult != null) {
-                httpRespMsg.data = syncTranslationResult;
-            } else {
-                //httpRespMsg.setError("处理超时...");
-                httpRespMsg.setError(MessageUtils.message("request.outTime"));
-            }
         }
         return httpRespMsg;
     }

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/SysRoleServiceImpl.java

@@ -33,7 +33,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
     public static String[] pmModules =  {"商机","线索", "客户","联系人","任务","报表服务", "销售订单","产品管理"};
     public static String[] financeModules =  {"商机","线索", "客户","联系人","任务","报表服务", "销售订单","产品管理"};
     public static String[] pmoModules =  {"商机","线索", "客户","联系人","任务","报表服务", "销售订单","产品管理"};
-    public static String[] corpLeaderModules =  {"商机","线索", "客户","联系人","任务","报表服务","数据分析", "销售订单","产品管理","组织架构","系统设置"};
+    public static String[] corpLeaderModules =  {"商机","线索", "客户","联系人","任务","报表服务","数据分析", "销售订单","产品管理","合同管理","组织架构","系统设置"};
 
     public static final HashMap<String, String[]> moduleMaps = new HashMap();
     static {

+ 6 - 83
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/ContractMapper.xml

@@ -20,93 +20,16 @@
         <result column="remarks" property="remarks" />
         <result column="payment" property="payment" />
         <result column="sec_type_id" property="secTypeId" />
+        <result column="plate1" property="plate1" />
+        <result column="plate2" property="plate2" />
+        <result column="plate3" property="plate3" />
+        <result column="plate4" property="plate4" />
+        <result column="plate5" property="plate5" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, company_id, creator_id, start_date, end_date, number, project_id, name, amounts, type_id, checkerId, status, indate, remarks, payment, sec_type_id
+        id, company_id, creator_id, start_date, end_date, number, project_id, name, amounts, type_id, checkerId, status, indate, remarks, payment, sec_type_id, plate1, plate2, plate3, plate4, plate5
     </sql>
-    <select id="selectContract" resultType="com.management.platform.entity.Contract">
-        select contract.id,contract.company_id,contract.creator_id,contract.number,contract.name,contract.amounts,contract.type_id,contract_type.type_name,contract.status,contract.indate,contract.remarks,
-        contract.start_date as startDate,contract.end_date as endDate,contract_type_sec.sec_type_name,contract.sec_type_id,
-        user.name as creatorName,user.corpwx_userid as creatorWxCorpId, contract.project_id, contract.payment, cp.pay_date AS next_payment_date, cp.amount AS next_payment_amount
-        from contract
-        left join contract_type
-        on contract.type_id = contract_type.id
-        left join contract_type_sec on contract.sec_type_id = contract_type_sec.id
-        LEFT JOIN (SELECT contract_id, pay_date, amount FROM contract_payment WHERE is_payed = 0 GROUP BY contract_id) cp ON cp.contract_id=contract.id
-        left join user
-        on contract.creator_id = user.id
-        left join contract_custom cc on cc.contract_id=contract.id
-        where contract.company_id = #{companyId}
-        <if test="number!=null">
-            and number like CONCAT('%', #{number}, '%')
-        </if>
-        <if test="name!=null">
-            and contract.name like CONCAT('%', #{name}, '%')
-        </if>
-        <if test="typeName!=null">
-            and contract_type.id = #{typeName}
-        </if>
-        <if test="secTypeId!=null">
-            and contract.sec_type_id = #{secTypeId}
-        </if>
-        <if test="status!=null">
-            and status = #{status}
-        </if>
-        <if test="startDate!=null and endDate !=null">
-            and indate between #{startDate} and #{endDate}
-        </if>
-        <if test="paymentStartDate != null and paymentEndDate != null">
-            and cp.pay_date between #{paymentStartDate} and #{paymentEndDate}
-        </if>
-        <if test="finishStatus!=null">
-            and cc.finish_status = #{finishStatus}
-        </if>
-        <if test="customerOrg!=null">
-            and cc.customer_org like  CONCAT('%', #{customerOrg}, '%')
-        </if>
-        order by contract.number desc
-        <if test="pageStart!=null and pageSize!=null">
-            limit #{pageStart},#{pageSize}
-        </if>
-    </select>
 
-    <select id="selectContractCnt" resultType="java.lang.Long">
-        select count(1) from contract
-        left join contract_type
-        on contract.type_id = contract_type.id
-        LEFT JOIN (SELECT contract_id, pay_date, amount FROM contract_payment WHERE is_payed = 0 GROUP BY contract_id) cp ON cp.contract_id=contract.id
-        left join user
-        on contract.creator_id = user.id
-        left join contract_custom cc on cc.contract_id=contract.id
-        where contract.company_id = #{companyId}
-        <if test="number!=null">
-            and number like CONCAT('%', #{number}, '%')
-        </if>
-        <if test="name!=null">
-            and contract.name like CONCAT('%', #{name}, '%')
-        </if>
-        <if test="typeName!=null">
-            and contract_type.id = #{typeName}
-        </if>
-        <if test="secTypeId!=null">
-            and contract.sec_type_id = #{secTypeId}
-        </if>
-        <if test="status!=null">
-            and status = #{status}
-        </if>
-        <if test="startDate!=null and endDate !=null">
-            and indate between #{startDate} and #{endDate}
-        </if>
-        <if test="paymentStartDate != null and paymentEndDate != null">
-            and cp.pay_date between #{paymentStartDate} and #{paymentEndDate}
-        </if>
-        <if test="finishStatus!=null">
-            and cc.finish_status = #{finishStatus}
-        </if>
-        <if test="customerOrg!=null">
-            and cc.customer_org like  CONCAT('%', #{customerOrg}, '%')
-        </if>
-    </select>
 </mapper>