Sfoglia il codice sorgente

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

Min 10 mesi fa
parent
commit
d71c4dde5b
16 ha cambiato i file con 161 aggiunte e 86 eliminazioni
  1. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/vite.config.ts
  2. 1 0
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/BusinessOpportunityController.java
  3. 1 0
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/ClueController.java
  4. 9 4
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/BusinessItemProduct.java
  5. 1 0
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/dto/TaskDto.java
  6. 3 1
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/mapper/ActionLogMapper.java
  7. 101 57
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/BusinessOpportunityServiceImpl.java
  8. 5 2
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ClueServiceImpl.java
  9. 12 3
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java
  10. 4 4
      fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/BusinessOpportunityMapper.xml
  11. 2 2
      fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/ClueMapper.xml
  12. 6 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  13. 7 8
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  14. 5 3
      fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json
  15. 2 0
      fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json
  16. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/vite.config.ts

@@ -3,7 +3,7 @@ import vue from '@vitejs/plugin-vue';
 
 import { resolve } from 'path';
 
-const target = 'http://192.168.2.142:10010';
+const target = 'http://192.168.2.28:10010';
 // const target = "http://127.0.0.1:10010";
 // const target = "http://192.168.2.178:10010";
 // const target = 'http://47.101.180.183:10010';

+ 1 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/BusinessOpportunityController.java

@@ -289,6 +289,7 @@ public class BusinessOpportunityController {
         HashMap<Object, Object> r = new HashMap<>();
         User user = userMapper.selectById(request.getHeader("Token"));
         bo.setIsDelete(1);
+        bo.setPageIndex((bo.getPageIndex()-1) * bo.getPageFrom());
         bo.setUserId(user.getId());
         bo.setCompanyId(user.getCompanyId());
         setNull(bo);

+ 1 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/ClueController.java

@@ -63,6 +63,7 @@ public class ClueController {
         Clue clue = new Clue();
         clue.setCompanyId(user.getCompanyId());
         clue.setUserId(user.getId());
+        clue.setIsDelete(0);
         boolean isAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看全部线索");
         boolean isNotAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看负责部门线索");
         List<Clue> list = new ArrayList<>();

+ 9 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/BusinessItemProduct.java

@@ -74,11 +74,16 @@ public class BusinessItemProduct extends Model<BusinessItemProduct> {
      */
     @TableField("total_price")
     private BigDecimal totalPrice;
+    /**
+     * 商机售价
+     */
+    @TableField("selling_price")
+    private BigDecimal sellingPrice;
 
 
-    @Override
-    protected Serializable pkVal() {
-        return this.id;
-    }
+//    @Override
+//    protected Serializable pkVal() {
+//        return this.id;
+//    }
 
 }

+ 1 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/dto/TaskDto.java

@@ -13,6 +13,7 @@ import java.time.LocalDate;
 @Data
 @Accessors(chain = true)
 public class TaskDto extends Task {
+    private Integer businessOpportunityId;
     private Integer pageIndex;
     private Integer pageSize;
 

+ 3 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/mapper/ActionLogMapper.java

@@ -18,5 +18,7 @@ import java.util.List;
 public interface ActionLogMapper extends BaseMapper<ActionLog> {
 
     @Select("select a.*,u.`name` userName from action_log a left join `user` u on a.user_id = u.id where code = 'clue' and item_id = #{id}")
-    List<ActionLog> selectByInfoList(Clue clue1);
+    List<ActionLog> selectByInfoList(Integer id);
+    @Select("select a.*,u.`name` userName from action_log a left join `user` u on a.user_id = u.id where code = 'business' and item_id = #{id}")
+    List<ActionLog> selectByInfoListBusiness(Integer id);
 }

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

@@ -39,6 +39,7 @@ import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.util.*;
+import java.util.stream.Collectors;
 
 
 /**
@@ -61,6 +62,8 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
     @Resource
     private TaskMapper taskMapper;
     @Resource
+    private ProductMapper productMapper;
+    @Resource
     private ActionLogMapper actionLogMapper;
     @Resource
     private BusinessItemProductMapper bipMapper;
@@ -78,6 +81,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
 
     @Resource
     private SysDictMapper sysDictMapper;
+
     @Override
     public List<BusinessOpportunity> getAll(BusinessOpportunity bo) {
         return bOMapper.selectAllList(bo);
@@ -91,11 +95,46 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
     @Override
     public BusinessOpportunity getInfo(BusinessOpportunity bo, User user) {
         BusinessOpportunity businessOpportunity = bOMapper.selectByIdToInfo(bo.getId());
-        businessOpportunity.setActionLogList(actionLogMapper.selectList(new QueryWrapper<ActionLog>().eq("item_id", bo.getId()).eq("code", "business")));
-        businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business",bo.getId()));
-        businessOpportunity.setTaskList(taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id",bo.getId())));
+        businessOpportunity.setActionLogList(actionLogMapper.selectByInfoListBusiness(bo.getId()));
+        businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business", bo.getId()));
+        List<Task> tasks = taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id", bo.getId()));
+        for (Task task : tasks) {
+            String executorId = task.getExecutorId();
+            if (executorId != null && executorId != ""){
+                List<String> list = Arrays.asList(executorId.split(","));
+                List<User> users = userMapper.selectList(new QueryWrapper<User>().in("id", list));
+                List<String> executorNamesList = users.stream()
+                        .map(User::getName)
+                        .collect(Collectors.toList());
+                task.setExecutorNames(executorNamesList);
+            }
+        }
+        businessOpportunity.setTaskList(tasks);
         List<BusinessItemProduct> businessItemProducts = bipMapper.selectList(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
-        if (businessItemProducts.size() > 0){
+        if (businessItemProducts.size() > 0) {
+
+            List<Integer> productIds = businessItemProducts.stream()
+                    .map(BusinessItemProduct::getProductId)
+                    .collect(Collectors.toList());
+            List<Product> products = productMapper.selectList(new QueryWrapper<Product>().in("id", productIds));
+            List<SysDict> sysDicts = sysDictMapper.selectList(new QueryWrapper<SysDict>().eq("code", "ProductType").or().eq("code", "ProductUnit"));
+            for (BusinessItemProduct businessItemProduct : businessItemProducts) {
+                for (Product product : products) {
+                    if(businessItemProduct.getProductId().equals(product.getId())){
+                        businessItemProduct.setProductName(product.getProductName());
+                        for (SysDict sysDict : sysDicts) {
+                            if (product.getType().equals(sysDict.getId())){
+                                businessItemProduct.setProductType(sysDict.getName());
+                            }
+                            if (product.getUnit().equals(sysDict.getId())){
+                                businessItemProduct.setUnit(sysDict.getName());
+                            }
+                        }
+                    }
+                }
+            }
+
+
             BigDecimal finalPrice = new BigDecimal(0);
             BigDecimal discountedPrice = new BigDecimal(0);
             for (BusinessItemProduct businessItemProduct : businessItemProducts) {
@@ -107,7 +146,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
                 // 折后价格
                 discountedPrice = discountedPrice.add(price.multiply(divide));
             }
-            BigDecimal divide = discountedPrice.divide(finalPrice,2,BigDecimal.ROUND_UP);
+            BigDecimal divide = discountedPrice.divide(finalPrice, 2, BigDecimal.ROUND_UP);
             // 整单折扣率
             businessOpportunity.setFinalPrice(divide.multiply(new BigDecimal(100)));
         }
@@ -140,18 +179,17 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
     @Transactional(rollbackFor = Exception.class)
     public void insert(BusinessOpportunity bo) {
         setNull(bo);
-        bo.setCreateTime(new Date());
         bOMapper.insert(bo);
         List<BusinessItemProduct> businessItemProducts = JSONArray.parseArray(bo.getBusinessItemProductList(), BusinessItemProduct.class);
         for (BusinessItemProduct businessItemProduct : businessItemProducts) {
             businessItemProduct.setBusinessId(bo.getId());
-//            businessItemProduct.setId(null);
             bipMapper.insert(businessItemProduct);
         }
         ActionLog actionLog = new ActionLog();
         actionLog.setUserId(bo.getUserId());
         actionLog.setItemId(bo.getId());
         actionLog.setCode("business");
+        actionLog.setCreatTime(new Date());
         actionLog.setName("创建了商机");
         actionLogMapper.insert(actionLog);
     }
@@ -161,7 +199,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
     public void update(BusinessOpportunity bo, String userId) {
         setNull(bo);
         bOMapper.updateById(bo);
-        bipMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id",bo.getId()));
+        bipMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
         List<BusinessItemProduct> businessItemProducts = JSONArray.parseArray(bo.getBusinessItemProductList(), BusinessItemProduct.class);
         for (BusinessItemProduct businessItemProduct : businessItemProducts) {
             businessItemProduct.setBusinessId(bo.getId());
@@ -219,13 +257,12 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
     private String path;
 
 
-
     @Override
     @Transactional(rollbackFor = Exception.class)
     public HttpRespMsg saveProduct(BusinessOpportunity bo, User user) {
         HttpRespMsg msg = new HttpRespMsg();
         msg.setMsg("操作成功");
-        biMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id",bo.getId()));
+        biMapper.delete(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
         List<BusinessItemProduct> businessItemProducts = JSONArray.parseArray(bo.getBusinessItemProductList(), BusinessItemProduct.class);
         for (BusinessItemProduct businessItemProduct : businessItemProducts) {
             biMapper.insert(businessItemProduct);
@@ -241,6 +278,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
 
     @Value(value = "${upload.file}")
     private String filePath;
+
     @Override
     public Object uploadFile(BusinessOpportunity bo, HttpServletRequest request, MultipartFile file) {
         User user = userMapper.selectById(request.getHeader("token"));
@@ -316,7 +354,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
         try {
             ServletOutputStream os = response.getOutputStream();
             UploadFile uploadFile = uploadFileMapper.selectById(file.getId());
-            if (uploadFile == null ){
+            if (uploadFile == null) {
                 msg.setError("文件未找到");
                 return msg;
             }
@@ -354,7 +392,10 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
 
     @Override
     public Object reFileName(UploadFile uploadFile, HttpServletRequest request) {
-        return uploadFileMapper.update(null, new UpdateWrapper<UploadFile>().eq("id", uploadFile.getId()).set("name", uploadFile.getName()));
+        uploadFileMapper.update(null, new UpdateWrapper<UploadFile>().eq("item_id", uploadFile.getId()).eq("code", "business").set("name", uploadFile.getName()));
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.setMsg("操作成功");
+        return httpRespMsg;
     }
 
     @Override
@@ -378,12 +419,12 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
 
     @Override
     public Map<String, Object> getDataSummary(Integer companyId, String startDate, String endDate, String userId, List<String> targetUserIds) {
-        return bOMapper.getDataSummary(companyId,startDate,endDate,userId,targetUserIds);
+        return bOMapper.getDataSummary(companyId, startDate, endDate, userId, targetUserIds);
     }
 
     @Override
     public List<Map<String, Object>> getDataStage(Integer companyId, String startDate, String endDate, String userId, List<String> targetUserIds) {
-        return bOMapper.getDataStage(companyId,startDate,endDate,userId,targetUserIds);
+        return bOMapper.getDataStage(companyId, startDate, endDate, userId, targetUserIds);
     }
 
     @Override
@@ -393,7 +434,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
 
     @Override
     public HttpRespMsg importData(MultipartFile multipartFile) {
-        HttpRespMsg msg=new HttpRespMsg();
+        HttpRespMsg msg = new HttpRespMsg();
         String fileName = multipartFile.getOriginalFilename();
         File file = new File(fileName == null ? "file" : fileName);
         User user = userMapper.selectById(request.getHeader("token"));
@@ -421,15 +462,15 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
             int rowNum = sheet.getLastRowNum();
             //获取当前表单模板 校验规则
             SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCode, "Thread").eq(SysForm::getCompanyId, companyId).eq(SysForm::getIsCurrent, 1));
-            if(sysForm==null){
+            if (sysForm == null) {
                 msg.setError("当前模块未配置自定义模板,需先完成配置");
                 return msg;
             }
             String config = sysForm.getConfig();
             JSONObject configOb = JSON.parseObject(config);
             JSONArray configObJSONArray = configOb.getJSONArray("list");
-            List<String> userNameList=new ArrayList<>();
-            HttpRespMsg respMsg=new HttpRespMsg();
+            List<String> userNameList = new ArrayList<>();
+            HttpRespMsg respMsg = new HttpRespMsg();
             for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {
                 XSSFRow row = sheet.getRow(rowIndex);
                 if (row == null) {
@@ -445,33 +486,34 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
                     JSONObject item = configObJSONArray.getJSONObject(i);
                     String modelName = item.getString("model");
                     XSSFCell cell = row.getCell(i);
-                    if(cell!=null){
-                        switch (item.getString("type")){
+                    if (cell != null) {
+                        switch (item.getString("type")) {
 //                            case "time":cell.setCellType(CellType.NUMERIC);
 //                                break;
-                            default:cell.setCellType(CellType.STRING);
+                            default:
+                                cell.setCellType(CellType.STRING);
                         }
                     }
-                    if(modelName.equals("inchargerId")){
+                    if (modelName.equals("inchargerId")) {
                         System.out.println("=====");
                         System.out.println(modelName);
                         System.out.println(cell.toString());
-                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
+                        if (!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)+"]的人员存在重复,请使用工号!");
+            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;
+            List<User> targetUserList = (List<User>) respMsg.data;
             //直接忽略空行 从row1开始
             for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
                 XSSFRow row = sheet.getRow(rowIndex);
@@ -484,7 +526,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
                 }
                 //获取到当前行的列数据
                 int cellNum = row.getLastCellNum();
-                BusinessOpportunity bo =new BusinessOpportunity();
+                BusinessOpportunity bo = new BusinessOpportunity();
                 bo.setCompanyId(companyId);
                 bo.setCreateTime(new Date());
                 bo.setCreatorId(user.getId());
@@ -492,65 +534,66 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
                     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;
+                    String getter = "get" + className;
+                    String setter = "set" + className;
                     XSSFCell cell = row.getCell(i);
-                    if(cell!=null){
-                        switch (item.getString("type")){
+                    if (cell != null) {
+                        switch (item.getString("type")) {
 //                            case "time":cell.setCellType(CellType.NUMERIC);
 //                                break;
-                            default:cell.setCellType(CellType.STRING);
+                            default:
+                                cell.setCellType(CellType.STRING);
                         }
                     }
                     //校验当前列是否为必填
                     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")+"值不能为空值");
+                    if (required) {
+                        if (StringUtils.isEmpty(cell.getStringCellValue())) {
+                            msg.setError(item.getString("label") + "值不能为空值");
                             return msg;
                         }
                     }
-                    if(modelName.equals("inchargerId")){
-                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
+                    if (modelName.equals("inchargerId")) {
+                        if (!StringUtils.isEmpty(cell.getStringCellValue())) {
                             String userName = cell.getStringCellValue();
                             Optional<User> first;
-                            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                            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();
+                                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()) {
                                 bo.setInchargerId(first.get().getId());
                             } else {
-                                msg.setError("负责人["+userName+"]在系统中不存在");
+                                msg.setError("负责人[" + userName + "]在系统中不存在");
                                 return msg;
                             }
                         }
-                    }else if(modelName.equals("contactsId")){
-                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
+                    } else if (modelName.equals("contactsId")) {
+                        if (!StringUtils.isEmpty(cell.getStringCellValue())) {
                             String userName = cell.getStringCellValue();
                             Optional<User> first;
-                            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                            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();
+                                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()) {
                                 bo.setContactsId(Integer.parseInt(first.get().getId()));
                             } else {
-                                msg.setError("负责人["+userName+"]在系统中不存在");
+                                msg.setError("负责人[" + userName + "]在系统中不存在");
                                 return msg;
                             }
                         }
-                    }else {
-                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
+                    } else {
+                        if (!StringUtils.isEmpty(cell.getStringCellValue())) {
                             Class<Clue> clueClass = Clue.class;
-                            Method method = clueClass.getMethod(setter,String.class);
-                            method.invoke(bo,cell.getStringCellValue());
+                            Method method = clueClass.getMethod(setter, String.class);
+                            method.invoke(bo, cell.getStringCellValue());
                         }
                     }
 
@@ -577,6 +620,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
         bOMapper.update(bo, new UpdateWrapper<BusinessOpportunity>().eq("id", bo.getId()).set("contacts_id", bo.getContactsId()));
         ActionLog al = new ActionLog();
         al.setCode("business");
+        al.setCreatTime(new Date());
         al.setName("关联了联系人");
         al.setUserId(user.getId());
         al.setItemId(bo.getId());
@@ -599,7 +643,7 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
         bOMapper.update(bo, new UpdateWrapper<BusinessOpportunity>().eq("id", bo.getId()).set("Stage_Id", bo.getStageId()));
         ActionLog al = new ActionLog();
         al.setCode("business");
-        al.setName("推进了阶段至"+bo.getStageValue());
+        al.setName("推进了阶段至" + bo.getStageValue());
         al.setUserId(user.getId());
         al.setItemId(bo.getId());
         actionLogMapper.insert(al);

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

@@ -194,7 +194,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
     @Override
     public Clue getInfo(Clue clue) {
         Clue clue1 = clueMapper.selectById2Info(clue.getId());
-        clue1.setClueLogList(actionLogMapper.selectByInfoList(clue1));
+        clue1.setClueLogList(actionLogMapper.selectByInfoList(clue1.getId()));
         clue1.setFiles(uploadFileMapper.selectByInfoList("clue", clue1.getId()));
         List<Task> tasks = taskMapper.selectList(new QueryWrapper<Task>().in("clue_id", clue.getId()));
         for (Task task : tasks) {
@@ -366,7 +366,10 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
 
     @Override
     public Object reFileName(UploadFile uploadFile, HttpServletRequest request) {
-        return uploadFileMapper.update(null, new UpdateWrapper<UploadFile>().eq("id", uploadFile.getId()).set("name", uploadFile.getName()));
+        uploadFileMapper.update(null, new UpdateWrapper<UploadFile>().eq("item_id", uploadFile.getId()).eq("code", "clue").set("name", uploadFile.getName()));
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        httpRespMsg.setMsg("操作成功");
+        return httpRespMsg;
     }
 
     @Override

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

@@ -102,6 +102,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
     @Resource
     private ClueMapper clueMapper;
 
+    @Resource
+    private ActionLogMapper logMapper;
+
     @Resource
     private ContactsMapper contactsMapper;
 
@@ -172,9 +175,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
         taskLog.setUserName(user.getName());
         taskLog.setCompanyId(user.getCompanyId());
         taskLogMapper.insert(taskLog);
-
-
-
+        if (taskDto.getBusinessOpportunityId() != null){
+            ActionLog actionLog = new ActionLog();
+            actionLog.setCreatTime(new Date());
+            actionLog.setUserId(userId);
+            actionLog.setCode("business");
+            actionLog.setName("新建了相关任务");
+            actionLog.setItemId(taskDto.getBusinessOpportunityId());
+            logMapper.insert(actionLog);
+        }
         return httpRespMsg;
     }
 

+ 4 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/BusinessOpportunityMapper.xml

@@ -36,7 +36,7 @@
         (select `name` from  stage where id =  stage_id) stageValue,
         (select custom_name from custom where id = customer_id) customerName,
         (select `name` from contacts where id = contacts_id) contactsName,
-        (select `name` from `user` where id = contacts_id) inchargerName,
+        (select `name` from `user` where id = incharger_id) inchargerName,
         (select `name` from `user` where id = creator_id) creatorName,
         (SELECT sum(total) from business_product WHERE business_id = id) total
         from business_opportunity
@@ -100,7 +100,7 @@
         (select `name` from  stage where id =  stage_id) stageValue,
         (select custom_name from custom where id = customer_id) customerName,
         (select `name` from contacts where id = contacts_id) contactsName,
-        (select `name` from `user` where id = contacts_id) inchargerName,
+        (select `name` from `user` where id = incharger_id) inchargerName,
         (select `name` from `user` where id = creator_id) creatorName,
         (SELECT sum(total) from business_product WHERE business_id = id)
         from business_opportunity
@@ -170,7 +170,7 @@
         (select `name` from  stage where id =  stage_id) stageValue,
         (select custom_name from custom where id = customer_id) customerName,
         (select `name` from contacts where id = contacts_id) contactsName,
-        (select `name` from `user` where id = contacts_id) inchargerName,
+        (select `name` from `user` where id = incharger_id) inchargerName,
         (select `name` from `user` where id = creator_id) creatorName,
         (SELECT sum(total) from business_product WHERE business_id = id)
         from business_opportunity
@@ -235,7 +235,7 @@
                (select `name` from stage where id = stage_id)          stageValue,
                (select custom_name from custom where id = customer_id) customerName,
                (select `name` from contacts where id = contacts_id)    contactsName,
-               (select `name` from `user` where id = contacts_id)      inchargerName,
+               (select `name` from `user` where id = incharger_id)      inchargerName,
                (select `name` from `user` where id = creator_id)       creatorName,
                (SELECT sum(total) from business_product WHERE business_id = id)
         from business_opportunity

+ 2 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/ClueMapper.xml

@@ -380,8 +380,8 @@
             or c.incharger_id is null)
     </select>
     <select id="getAllList2" resultType="com.management.platform.entity.Clue">
-        select id,
-               clue_name
+        select c.id,
+               c.clue_name
         from clue c
                  left join sys_dict sd on c.customer_level_id = sd.id
         where

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -719,6 +719,12 @@ public class ReportController {
                 }else if(fillMonths ==5){
                     //前一天
                     targetDate=curMonth.minusDays(1);
+                }else if(fillMonths ==6){
+                    //前2天
+                    targetDate=curMonth.minusDays(2);
+                }else if(fillMonths ==7){
+                    //前3天
+                    targetDate=curMonth.minusDays(3);
                 }
 
                 DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");

+ 7 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -5985,28 +5985,27 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             if (company.getIsInternational() == 1) {
                                 operateDate = operateDate.plusSeconds(offsetSeconds);
                             }
-							
-								
                             String time = dtf.format(operateDate);
                             String msg= "";
 							if (auditMsg != null) {
 								if(needCorpWxTranslate){
 									Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(audit.getOperatorId())).findFirst();
 									if(first.isPresent()){
-										String corpwxUserId = first.get().getCorpwxUserid();
-										if (!StringUtils.isEmpty(corpwxUserId) && auditMsg.contains(corpwxUserId)) {
+                                        User corpwxUser = first.get();
+										String corpwxUserName = corpwxUser.getName();
+										if (!StringUtils.isEmpty(corpwxUserName) && (auditMsg.contains(corpwxUserName))) {
 											if(auditMsg.contains("提交了")){
 												int i = auditMsg.indexOf("提");
 												String substring = auditMsg.substring(0, i);
-												msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"$\\");
+												msg = time+" " + auditMsg.replace(substring,"$userName="+corpwxUserName+"$");
 											}else if(auditMsg.contains("审核通过了")){
 												int i = auditMsg.indexOf("审");
 												String substring = auditMsg.substring(0, i);
-												msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"$\\");
+												msg = time+" " + auditMsg.replace(substring,"$userName="+corpwxUserName+"$");
 											}else if(auditMsg.contains("驳回了")) {
 												int i = auditMsg.indexOf("驳");
 												String substring = auditMsg.substring(0, i);
-												msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"$\\");
+												msg = time+" " + auditMsg.replace(substring,"$userName="+corpwxUserName+"$");
 											}
 										} else {
 											msg = time+" " + auditMsg;
@@ -6037,7 +6036,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                                 }else {
 									msg = time+" " + auditMsg;
 								}
-							} 
+							}
                             if (!isFirst) {
                                 sb.append("->");
                             } else {

+ 5 - 3
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -176,7 +176,7 @@
   "textLink": {
     "fillInTheWork": "Fill out the daily",
     "fillInAWeek": "Fill in week",
-    "helpToFillIn": "Fill in the daily newspaper",
+    "helpToFillIn": "Fill in the daily report",
     "batchFillIn": "Fill in bulk",
     "workHoursImport": "Work hours import",
     "exportWork": "Export daily",
@@ -984,8 +984,10 @@
   "donlimit": "not limited",
   "lastlastmonth": "Can be filled up to the previous month",
   "lastmonth": "Can be filled up to last month",
-  "newspaperwithin": "Daily newspapers can be filled within 7 days",
-  "previousdaydaily": "You can fill in the daily newspaper 1 day before",
+  "newspaperwithin": "Daily report can be filled within 7 days",
+  "previousdaydaily": "Can fill in the daily report 1 day before",
+  "previous2daydaily": "Can fill in the daily report 2 days before",
+  "previous3daydaily": "Can fill in the daily report 3 days before",
   "afternoonworkinghours": "Please enter the working hours in the afternoon",
   "dayworkinghours": "Please select full working hours",
   "morningworkinghours": "Please enter the working hours in the morning",

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -990,6 +990,8 @@
   "lastlastmonth": "可补填到上上月",
   "newspaperwithin": "可补填7天内日报",
   "previousdaydaily": "可补填前1天日报",
+  "previous2daydaily": "可补填前2天日报",
+  "previous3daydaily": "可补填前3天日报",
   "dayworkinghours": "请选择全天工作时长",
   "morningworkinghours": "请输入上午工作时长",
   "afternoonworkinghours": "请输入下午工作时长",

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -810,7 +810,7 @@
                     dayList:['01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30'],
                     hourList:['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23']
                 },
-                monthTimeList:[{id:0, name:this.$t('donlimit')},{id:1, name:this.$t('canbefilled')},{id:2, name:this.$t('lastmonth')},{id:3, name:this.$t('lastlastmonth')},{id:4, name:this.$t('newspaperwithin')},{id:5, name:this.$t('previousdaydaily')}],
+                monthTimeList:[{id:0, name:this.$t('donlimit')},{id:1, name:this.$t('canbefilled')},{id:2, name:this.$t('lastmonth')},{id:3, name:this.$t('lastlastmonth')},{id:4, name:this.$t('newspaperwithin')},{id:5, name:this.$t('previousdaydaily')},{id:6, name:this.$t('previous2daydaily')},{id:7, name:this.$t('previous3daydaily')}],
                 progress:30,
                 startTime:null,
                 endTime:null,