yusm 2 месяцев назад
Родитель
Сommit
3433f5fbba

+ 11 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/SysFormController.java

@@ -41,7 +41,18 @@ public class SysFormController {
     public HttpRespMsg list(){
         HttpRespMsg msg=new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        Company company = companyMapper.selectById(companyId);
         List<SysForm> list = sysFormService.list(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCompanyId, companyId));
+        if (!list.isEmpty()&&company.getIsExistBusiness()==0){
+            for (SysForm sysForm : list) {
+                String config = sysForm.getConfig();
+                String replacedConfig = config.replaceAll("商机", "项目");
+                sysForm.setConfig(replacedConfig);
+                if (sysForm.getName().contains("商机")){
+                    sysForm.setName(sysForm.getName().replaceAll("商机","项目"));
+                }
+            }
+        }
         msg.setData(list);
         return msg;
     }

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

@@ -468,6 +468,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
     public HttpRespMsg importData(MultipartFile multipartFile) {
         System.out.println("=====开始进行商机导入=====");
         HttpRespMsg msg=new HttpRespMsg();
+        String str = getString();
         if(!multipartFile.getOriginalFilename().endsWith(".xlsx")){
             msg.setError("文件格式错误,请使用.xlsx格式的Excel文件进行导入");
             return msg;
@@ -697,10 +698,11 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
 //                List<ActionLog> ads = new ArrayList<>();
                 for (BusinessOpportunity bo : importProductList) {
                     ActionLog actionLog = new ActionLog();
-                    actionLog.setName("新增了商机");
+                    actionLog.setName("新增了"+str);
                     actionLog.setItemId(bo.getId());
                     actionLog.setCode("business");
                     actionLog.setUserId(user.getId());
+                    actionLog.setCreatTime(new Date());
                     actionLogMapper.insert(actionLog);
                 }
             }

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

@@ -51,6 +51,7 @@ public class UserCommonModuleServiceImpl extends ServiceImpl<UserCommonModuleMap
     public HttpRespMsg getCommonModules(HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user= userMapper.selectById(request.getHeader("token"));
+        Company company = companyMapper.selectById(user.getCompanyId());
         if(null == user){
             httpRespMsg.setError("用户不存在");
             return httpRespMsg;
@@ -95,7 +96,11 @@ public class UserCommonModuleServiceImpl extends ServiceImpl<UserCommonModuleMap
         if(CollectionUtils.isNotEmpty(modelIds)){
             commonModules = commonModules.stream().filter(t -> modelIds.contains(t.getModuleId())).collect(Collectors.toList());
         }
-
+        if (company.getIsExistBusiness()==0) {
+            for (UserCommonModuleVO module : commonModules) {
+                module.setModuleName(module.getModuleName().replaceAll("商机","项目"));
+            }
+        }
         httpRespMsg.setData(commonModules);
         return httpRespMsg;
     }