Jelajahi Sumber

客户修改

Guo1B0 10 bulan lalu
induk
melakukan
c8d543745d

+ 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';

+ 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);
 }

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

@@ -91,7 +91,7 @@ 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.setActionLogList(actionLogMapper.selectByInfoListBusiness(bo.getId()));
         businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business",bo.getId()));
         businessOpportunity.setTaskList(taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id",bo.getId())));
         List<BusinessItemProduct> businessItemProducts = bipMapper.selectList(new QueryWrapper<BusinessItemProduct>().eq("business_id", bo.getId()));
@@ -140,18 +140,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);
     }
@@ -577,6 +576,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());

+ 1 - 1
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) {

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

@@ -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