Преглед изворни кода

Merge remote-tracking branch 'origin/developerH' into developer

Duan_xu пре 2 година
родитељ
комит
987fca0129
23 измењених фајлова са 1070 додато и 64 уклоњено
  1. 16 0
      src/main/java/com/caimei/modules/user/dao/CmRemaksDao.java
  2. 2 0
      src/main/java/com/caimei/modules/user/dao/CmSpDao.java
  3. 12 0
      src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java
  4. 74 1
      src/main/java/com/caimei/modules/user/entity/CmClubRemarks.java
  5. 46 0
      src/main/java/com/caimei/modules/user/entity/CmRemaks.java
  6. 74 0
      src/main/java/com/caimei/modules/user/entity/VisitRemarkVo.java
  7. 35 0
      src/main/java/com/caimei/modules/user/service/CmRemaksService.java
  8. 6 4
      src/main/java/com/caimei/modules/user/service/CmSpService.java
  9. 34 0
      src/main/java/com/caimei/modules/user/service/NewCmClubService.java
  10. 7 7
      src/main/java/com/caimei/modules/user/web/NewCmShopController.java
  11. 31 14
      src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java
  12. 32 6
      src/main/java/com/caimei/modules/user/web/newUser/SpController.java
  13. 24 0
      src/main/resources/mappings/modules/user/CmRemaksMapper.xml
  14. 2 0
      src/main/resources/mappings/modules/user/CmSpMapper.xml
  15. 57 11
      src/main/resources/mappings/modules/user/NewCmClubMapper.xml
  16. 23 12
      src/main/resources/mappings/modules/user/VisitRemarkMapper.xml
  17. 2 1
      src/main/webapp/WEB-INF/views/modules/consult/type/cmConsulttypeList.jsp
  18. 69 0
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyRemarksList.jsp
  19. 81 4
      src/main/webapp/WEB-INF/views/modules/userNew/cmRegistRemarksList.jsp
  20. 203 0
      src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksForm.jsp
  21. 91 0
      src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksList.jsp
  22. 76 3
      src/main/webapp/WEB-INF/views/modules/userNew/cmUnRegistRemarksList.jsp
  23. 73 1
      src/main/webapp/WEB-INF/views/modules/userNew/cmVisitRemarksList.jsp

+ 16 - 0
src/main/java/com/caimei/modules/user/dao/CmRemaksDao.java

@@ -0,0 +1,16 @@
+package com.caimei.modules.user.dao;
+
+import com.caimei.modules.user.entity.CmRemaks;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2022/5/19
+ */
+@MyBatisDao
+public interface CmRemaksDao extends CrudDao<CmRemaks> {
+
+}

+ 2 - 0
src/main/java/com/caimei/modules/user/dao/CmSpDao.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.user.dao;
 
+import com.caimei.modules.user.entity.CmClubRemarks;
 import com.caimei.modules.user.entity.CmSaleMan;
 import com.caimei.modules.user.entity.CmUser;
 import com.caimei.modules.user.entity.NewCmSp;
@@ -32,4 +33,5 @@ public interface CmSpDao extends CrudDao<NewCmSp> {
     void choseManager(Integer serviceProviderID);
 
     void deleteManager();
+
 }

+ 12 - 0
src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java

@@ -47,4 +47,16 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
     String findClassName(String string);
 
 
+    String upremakasList(CmRemaks cmRemaks);
+
+    void addRemarks(CmRemaks cmRemaks);
+
+    void upremarks(CmRemaks cmRemaks);
+
+    void deleteRamarks(CmRemaks cmRemaks);
+
+    List<Integer> ClubsIds(ClubChangeSp clubChangeSp);
+
+    void oldname(@Param("oldserviceProviderId")Integer oldserviceProviderId,@Param("clubID")Integer clubID,@Param("oldSpID")Integer oldSpID,@Param("newSpID")Integer newSpID);
+    void oldnames(@Param("clubID")Integer clubID,@Param("oldSpID")Integer oldSpID,@Param("newSpID")Integer newSpID);
 }

+ 74 - 1
src/main/java/com/caimei/modules/user/entity/CmClubRemarks.java

@@ -32,7 +32,7 @@ public class CmClubRemarks extends DataEntity<CmClubRemarks> {
     private Integer remarksId;
 
     /**
-     *  协销姓名
+     * 协销姓名
      */
     private String spName;
     /**
@@ -96,6 +96,79 @@ public class CmClubRemarks extends DataEntity<CmClubRemarks> {
      */
     private List<RemarksFileVo> fileList;
 
+    /**
+     * 机构类型
+     */
+    private String clubType;
+    /**
+     * 价格敏感度
+     */
+    private String pinceSensitve;
+    /**
+     * 意向程度
+     */
+    private String satisfied;
+    /**
+     * 跟进状态
+     */
+    private String followup;
+    /**
+     * 额外说明
+     */
+    private String extra;
+    /**
+     * 非持久化字段旧协销名
+     */
+    private String oldName;
+
+    public String getOldName() {
+        return oldName;
+    }
+
+    public void setOldName(String oldName) {
+        this.oldName = oldName;
+    }
+
+    public String getClubType() {
+        return clubType;
+    }
+
+    public void setClubType(String clubType) {
+        this.clubType = clubType;
+    }
+
+    public String getPinceSensitve() {
+        return pinceSensitve;
+    }
+
+    public void setPinceSensitve(String pinceSensitve) {
+        this.pinceSensitve = pinceSensitve;
+    }
+
+    public String getSatisfied() {
+        return satisfied;
+    }
+
+    public void setSatisfied(String satisfied) {
+        this.satisfied = satisfied;
+    }
+
+    public String getFollowup() {
+        return followup;
+    }
+
+    public void setFollowup(String followup) {
+        this.followup = followup;
+    }
+
+    public String getExtra() {
+        return extra;
+    }
+
+    public void setExtra(String extra) {
+        this.extra = extra;
+    }
+
     public String getConsultType() {
         return consultType;
     }

+ 46 - 0
src/main/java/com/caimei/modules/user/entity/CmRemaks.java

@@ -0,0 +1,46 @@
+package com.caimei.modules.user.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2022/5/9
+ */
+public class CmRemaks extends DataEntity<CmRemaks> {
+    private Integer remarksId;
+
+    private String remarks;
+
+    private Date addtime;
+
+    public Integer getRemarksId() {
+        return remarksId;
+    }
+
+    public void setRemarksId(Integer remarksId) {
+        this.remarksId = remarksId;
+    }
+
+    @Override
+    public String getRemarks() {
+        return remarks;
+    }
+
+    @Override
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getAddtime() {
+        return addtime;
+    }
+
+    public void setAddtime(Date addtime) {
+        this.addtime = addtime;
+    }
+}

+ 74 - 0
src/main/java/com/caimei/modules/user/entity/VisitRemarkVo.java

@@ -99,6 +99,80 @@ public class VisitRemarkVo extends DataEntity<VisitRemarkVo> {
      */
     private List<Server> serverList;
 
+    /**
+     * 机构类型
+     */
+    private String clubType;
+    /**
+     * 价格敏感度
+     */
+    private String pinceSensitve;
+    /**
+     * 意向程度
+     */
+    private String satisfied;
+    /**
+     * 跟进状态
+     */
+    private String followup;
+    /**
+     * 额外说明
+     */
+    private String extra;
+
+    /**
+     * 非持久化字段旧协销名
+     */
+    private String oldName;
+
+    public String getOldName() {
+        return oldName;
+    }
+
+    public void setOldName(String oldName) {
+        this.oldName = oldName;
+    }
+
+    public String getClubType() {
+        return clubType;
+    }
+
+    public void setClubType(String clubType) {
+        this.clubType = clubType;
+    }
+
+    public String getPinceSensitve() {
+        return pinceSensitve;
+    }
+
+    public void setPinceSensitve(String pinceSensitve) {
+        this.pinceSensitve = pinceSensitve;
+    }
+
+    public String getSatisfied() {
+        return satisfied;
+    }
+
+    public void setSatisfied(String satisfied) {
+        this.satisfied = satisfied;
+    }
+
+    public String getFollowup() {
+        return followup;
+    }
+
+    public void setFollowup(String followup) {
+        this.followup = followup;
+    }
+
+    public String getExtra() {
+        return extra;
+    }
+
+    public void setExtra(String extra) {
+        this.extra = extra;
+    }
+
     public String getConsultType() {
         return consultType;
     }

+ 35 - 0
src/main/java/com/caimei/modules/user/service/CmRemaksService.java

@@ -0,0 +1,35 @@
+package com.caimei.modules.user.service;
+
+import com.caimei.modules.user.dao.CmRemaksDao;
+import com.caimei.modules.user.entity.CmRemaks;
+import com.thinkgem.jeesite.common.service.CrudService;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.thinkgem.jeesite.common.persistence.Page;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2022/5/19
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmRemaksService extends CrudService<CmRemaksDao, CmRemaks> {
+
+    @Autowired
+    private CmRemaksDao cmRemaksDao;
+
+    @Transactional(readOnly = false)
+    public List<CmRemaks> findList(CmRemaks cmRemaks) {
+        return cmRemaksDao.findList(cmRemaks);
+    }
+
+    @Transactional(readOnly = false)
+    public Page<CmRemaks> findPage(Page<CmRemaks> page, CmRemaks cmRemaks) {
+        return super.findPage(page, cmRemaks);
+    }
+}

+ 6 - 4
src/main/java/com/caimei/modules/user/service/CmSpService.java

@@ -1,6 +1,7 @@
 package com.caimei.modules.user.service;
 
 import com.caimei.modules.user.dao.CmSpDao;
+import com.caimei.modules.user.entity.CmClubRemarks;
 import com.caimei.modules.user.entity.CmSaleMan;
 import com.caimei.modules.user.entity.CmUser;
 import com.caimei.modules.user.entity.NewCmSp;
@@ -27,11 +28,11 @@ public class CmSpService extends CrudService<CmSpDao, NewCmSp> {
 	public NewCmSp get(String id) {
 		return super.get(id);
 	}
-	
+
 	public List<NewCmSp> findList(NewCmSp newCmSp) {
 		return super.findList(newCmSp);
 	}
-	
+
 	public Page<NewCmSp> findPage(Page<NewCmSp> page, NewCmSp newCmSp) {
 		return super.findPage(page, newCmSp);
 	}
@@ -40,7 +41,7 @@ public class CmSpService extends CrudService<CmSpDao, NewCmSp> {
 	public void update(NewCmSp newCmSp) {
 		cmSpDao.update(newCmSp);
 	}
-	
+
 	@Transactional(readOnly = false)
 	public void save(NewCmSp newCmSp) {
 		super.save(newCmSp);
@@ -68,4 +69,5 @@ public class CmSpService extends CrudService<CmSpDao, NewCmSp> {
 		cmSpDao.deleteManager();
 		cmSpDao.choseManager(serviceProviderID);
 	}
-}
+
+}

+ 34 - 0
src/main/java/com/caimei/modules/user/service/NewCmClubService.java

@@ -2,6 +2,7 @@ package com.caimei.modules.user.service;
 
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 
 import com.caimei.modules.consult.entity.type.CmConsulttype;
@@ -21,6 +22,7 @@ import com.caimei.modules.user.dao.NewCmClubDao;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.xml.crypto.Data;
 
 /**
  * 用户模块重构--会所管理Service
@@ -161,4 +163,36 @@ public class NewCmClubService extends CrudService<NewCmClubDao, NewCmClub> {
     public List<ServiceProviderModel> findGroup(Integer leaderId) {
         return newCmClubDao.findGroup(leaderId);
     }
+
+    @Transactional(readOnly = false)
+    public String upremakasList(CmRemaks cmRemaks){return newCmClubDao.upremakasList(cmRemaks);}
+
+    @Transactional(readOnly = false)
+    public void upremarks(CmRemaks cmRemaks){newCmClubDao.upremarks(cmRemaks);}
+
+    @Transactional(readOnly = false)
+    public void addRemarks(CmRemaks cmRemaks){
+         newCmClubDao.addRemarks(cmRemaks);
+     }
+
+    @Transactional(readOnly = false)
+     public void deleteRamarks(CmRemaks cmRemaks){newCmClubDao.deleteRamarks(cmRemaks);}
+
+    @Transactional(readOnly = false)
+    public List<Integer> ClubsIds(ClubChangeSp clubChangeSp){
+
+          return newCmClubDao.ClubsIds(clubChangeSp);
+    }
+
+    @Transactional(readOnly = false)
+    public void oldname(Integer oldserviceProviderId,Integer clubID , Integer oldSpID,Integer newSpID){
+
+         newCmClubDao.oldname(oldserviceProviderId, clubID,oldSpID,newSpID);
+    }
+
+    @Transactional(readOnly = false)
+    public void oldnames(Integer clubID , Integer oldSpID,Integer newSpID){
+
+        newCmClubDao.oldnames(clubID,oldSpID,newSpID);
+    }
 }

+ 7 - 7
src/main/java/com/caimei/modules/user/web/NewCmShopController.java

@@ -690,15 +690,15 @@ public class NewCmShopController extends BaseController {
         } else if (!newCmShop.getFirstShopType().equals(newCmShops.getFirstShopType())) {
             list.add("修改了公司类型");
         }
-
-        if (newCmShops.getSecondShopType() == null) {
-            if (!newCmShop.getSecondShopType().equals("")) {
-                list.add("新增了医疗类型");
+        if (newCmShop.getMainpro() == null) {
+            if (newCmShops.getSecondShopType() == null) {
+                if (!newCmShop.getSecondShopType().equals("")) {
+                    list.add("新增了医疗类型");
+                }
+            } else if (!newCmShop.getSecondShopType().equals(newCmShops.getSecondShopType())) {
+                list.add("修改了医疗类型");
             }
-        } else if (!newCmShop.getSecondShopType().equals(newCmShops.getSecondShopType())) {
-            list.add("修改了医疗类型");
         }
-
         if (newCmShops.getMainpro() == null) {
             if (!newCmShop.getMainpro().equals("")) {
                 list.add("新增了主营内容");

+ 31 - 14
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -57,6 +57,8 @@ public class AgencyController extends BaseController {
     @Autowired
     private NewCmClubService newCmClubService;
     @Autowired
+    private CmRemaksService cmRemaksService;
+    @Autowired
     private CmUserOrganizeService cmUserOrganizeService;
     @Autowired
     private CmUserService cmUserService;
@@ -79,12 +81,6 @@ public class AgencyController extends BaseController {
     @Autowired
     private SysLogService sysLogService;
 
-    public static NewCmClub newCm;
-    public static CmClubinfo cmClu;
-    public static CmUser cmUs;
-    public static String types;
-    public static NewCmSp newCms;
-
     @ModelAttribute
     public NewCmClub get(@RequestParam(required = false) String id) {
         NewCmClub entity = null;
@@ -146,7 +142,6 @@ public class AgencyController extends BaseController {
 
         Page<NewCmClub> page = newCmClubService.findPage(new Page<NewCmClub>(request, response, 20), newCmClub);
         model.addAttribute("newCmClub", newCmClub);
-        newCm = newCmClub;
         model.addAttribute("page", page);
         return "modules/userNew/cmAgencyList";
     }
@@ -756,8 +751,6 @@ public class AgencyController extends BaseController {
                 clubChangeSp.setApplyTime(new Date());
                 clubChangeSp.setCheckStatus("0");
                 clubChangeSpReviewService.save(clubChangeSp);
-                newCm=newCmClub;
-                newCms=newCmSp;
                 map.put("success", true);
                 map.put("msg", "操作成功");
             } else {
@@ -905,7 +898,6 @@ public class AgencyController extends BaseController {
             companyUser.setAuditTime(currTime);
             newCmClubService.update(newCmClub);
             cmUserService.update(companyUser);
-            cmUs=companyUser;
             //直接注册成为企业机构 或 升级成为机构
             if (CollectionUtils.isNotEmpty(cmUsers)) {
                 //个人用户升级成为企业机构
@@ -1050,8 +1042,6 @@ public class AgencyController extends BaseController {
                 cmUser.setClubStatus("90");
             }
             cmUserService.update(cmUser);
-            cmUs=cmUser;
-            types=type;
             if (cmClub.getStatus() != 90) {
                 cmClub.setStatus(90);
                 newCmClubService.update(cmClub);
@@ -1128,12 +1118,39 @@ public class AgencyController extends BaseController {
     }
 
     @RequestMapping("cmrenaksList")
-    public String renaks() {
+    public String renaks(CmRemaks cmRemaks,HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<CmRemaks> page = cmRemaksService.findPage(new Page<CmRemaks>(request, response,20), cmRemaks);
+        model.addAttribute("page",page);
+        model.addAttribute("cmRemaks",cmRemaks);
         return "modules/userNew/cmRemaksList";
     }
 
     @RequestMapping("cmrenaksForm")
-    public String renaksForm() {
+    public String renaksForm(CmRemaks cmRemaks,HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(cmRemaks.getRemarksId()!=null){
+           String remaks= newCmClubService.upremakasList(cmRemaks);
+            model.addAttribute("list",cmRemaks);
+            model.addAttribute("remaks",remaks);
+            model.addAttribute("remaksId",cmRemaks.getRemarksId());
+        }
         return "modules/userNew/cmRemaksForm";
     }
+    @RequestMapping("addcmrenaksForm")
+    public String addrenaksForm(CmRemaks cmRemaks,HttpServletRequest request, HttpServletResponse response, Model model) {
+       if(cmRemaks.getRemarksId()!=null){
+           System.out.println("》》》》进入修改方法");
+           newCmClubService.upremarks(cmRemaks);
+       }else {
+           System.out.println("》》》》进入新增方法");
+           cmRemaks.setAddtime(new Date());
+           newCmClubService.addRemarks(cmRemaks);
+       }
+        return "redirect:" + Global.getAdminPath() + "/new/user/agency/cmrenaksList";
+    }
+    @RequestMapping("deleteRamarks")
+    public String deleteRamarks(CmRemaks cmRemaks,HttpServletRequest request, HttpServletResponse response, Model model) {
+         newCmClubService.deleteRamarks(cmRemaks);
+        return "redirect:" + Global.getAdminPath() + "/new/user/agency/cmrenaksList";
+    }
+
 }

+ 32 - 6
src/main/java/com/caimei/modules/user/web/newUser/SpController.java

@@ -68,6 +68,8 @@ public class SpController extends BaseController {
     private CmBindService cmBindService;
     @Autowired
     private SysLogService sysLogService;
+    @Autowired
+    private NewCmClubService newCmClubService;
 
     @ModelAttribute
     public NewCmSp get(@RequestParam(required = false) String id) {
@@ -116,13 +118,33 @@ public class SpController extends BaseController {
             if (StringUtils.equals("pass", reviewStatus)) {
                 ClubChangeSp cssp = clubChangeSpReviewService.getClubChangeSpById(clubChangeSpRecordID);
                 if (null != cssp) {
-                    String clubIDs = sysLogService.ClubsName(clubChangeSpRecordID);
+                    String ClubsNames = sysLogService.ClubsName(clubChangeSpRecordID);
+                    System.out.println("操作员" + ClubsNames);
+
+                    Integer oldserviceProviderId=cssp.getOldSpID();
+                    Integer clubId=cssp.getClubID();
+                    Integer oldSpID=cssp.getOldSpID();
+                    Integer newspId=cssp.getNewSpID();
+                    List<Integer> oldname= newCmClubService.ClubsIds(cssp);
+                    for(Integer i : oldname){
+                    System.out.println("旧协销>>>>>>"+oldname+oldname.contains(null));
+                    if(i==null){
+                        System.out.println("旧协销id添加成功");
+                        newCmClubService.oldname(oldserviceProviderId,clubId,oldSpID,newspId);
+                     }else {
+                        newCmClubService.oldnames(clubId,oldSpID,newspId);
+                    }
+                    }
+                    System.out.println("旧ID>>>>>>>>" + cssp.getOldSpID());
+                    System.out.println("ID>>>>>>>>" + cssp.getNewSpID());
+                    System.out.println("ID>>>>>>>>" + cssp.getClubID());
                     // 查询serviceprovider协销表
                     List<ServiceProviderModel> serviceprovider = serviceProviderDao.getServiceproviderById(cssp.getNewSpID());
                     // 查询cm_bind表
                     if (CollectionUtils.isNotEmpty(serviceprovider)) {
                         ServiceProviderModel serviceProvider = serviceprovider.get(0);
                         Integer userID = serviceProvider.getUserID();
+                        System.out.println("ID>>>>>>>>" + userID);
                         List<CmBind> bind = cmBindService.findCmbindByUserId(userID);
 
                         //fixme gclub -- club 更换协销
@@ -136,6 +158,7 @@ public class SpController extends BaseController {
                             club.setFlag(cmBind.getBindID() + ",");
                             club.setInviterBindID(cmBind.getBindID());
                         }
+
                         club.setInviterName(serviceProvider.getName());
                         cmClubService.save(club);
                         // 更新通过状态
@@ -145,20 +168,23 @@ public class SpController extends BaseController {
                         clubChangeSpReviewService.updateCheckStatusById(clubChangeSp);
                         map.put("success", true);
                         map.put("msg", "操作成功");
-                        String clubID = sysLogService.ClubsName(clubChangeSpRecordID);
+                        String ClubsName = sysLogService.ClubsName(clubChangeSpRecordID);
+//                        Integer clubId=newCmClubService.ClubsIds(ClubsNames);
                         String jgName = sysLogService.JgName(clubChangeSpRecordID);
                         String linkMans = sysLogService.ClubName(clubChangeSpRecordID);
                         sysLog.setOperationtime(new Date());
-                       if(clubIDs==null){
-                           sysLog.setActioncontent("采美默认协销经理(官方账号)" + "更换为" + clubID);
+                       if(ClubsNames==null){
+                           sysLog.setActioncontent("采美默认协销经理(官方账号)" + "更换为" + ClubsName);
                        }else {
-                           sysLog.setActioncontent(clubIDs + "更换为" + clubID);
+                           sysLog.setActioncontent(ClubsNames + "更换为" + ClubsName);
                        }
                         sysLog.setOperationtype("更换协销");
                         sysLog.setContact(linkMans);
                         sysLog.setInstitutionName(jgName);
                         SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
-                        System.out.println("操作员" + principal.getName());
+                        System.out.println("操作员" + ClubsName);
+//                        System.out.println("ID>>>>>>>>" +clubId);
+                        System.out.println("ID>>>>>>>>" + clubChangeSpRecordID);
                         String username = principal.getName();
                         sysLog.setOperator(username);
                         //调用service保存SysLog实体类到数据库

+ 24 - 0
src/main/resources/mappings/modules/user/CmRemaksMapper.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.user.dao.CmRemaksDao">
+
+    <select id="findList" resultType="CmRemaks">
+        SELECT remarksId,remarks,addtime
+        FROM `cm_remarks`
+        <where>
+            <if test="remarks != null and remarks != ''">
+                AND remarks LIKE "%"#{remarks}"%"
+            </if>
+        </where>
+
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+        </when>
+                <otherwise>
+                    order by addtime desc
+                </otherwise>
+        </choose>
+    </select>
+
+</mapper>

+ 2 - 0
src/main/resources/mappings/modules/user/CmSpMapper.xml

@@ -217,4 +217,6 @@
 		left join serviceprovider s on csr.leaderId = s.serviceProviderID
 		where csr.delflag = 0
 	</select>
+
+
 </mapper>

+ 57 - 11
src/main/resources/mappings/modules/user/NewCmClubMapper.xml

@@ -403,7 +403,7 @@
                         s.linkMan                                                                     as spName,
                         ccr.addTime,
                         ccr.questionMan,
-                        ccr.consultType                                                               as consult,
+                        ccr.consultType as consult,ccr.clubType,ccr.pinceSensitve,ccr.satisfied,ccr.followup,ccr.extra,
                         (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID = csr.leaderId) AS leaderName
         from cm_club_remarks ccr
                  left join serviceprovider s on ccr.serviceProviderId = s.serviceProviderID
@@ -449,10 +449,13 @@
     <select id="findRegistList" resultType="com.caimei.modules.user.entity.CmClubRemarks">
         SELECT DISTINCT
         ccr.id AS remarksId, ccr.remarks,s.linkman AS spName, ccr.addTime,ccr.questionMan,
-        csr.leaderId AS leaderId,ifnull(ccr.consultType,'') as consult, c.Name as clubName,
-        (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID= csr.leaderId) AS leaderName
+        csr.leaderId AS leaderId,ifnull(ccr.consultType,'') as consult, c.Name as
+        clubName,ccr.clubType,ccr.pinceSensitve,ccr.satisfied,ccr.followup,ccr.extra,
+        (SELECT name FROM serviceprovider s WHERE s.serviceProviderID= csr.leaderId) AS leaderName
+#         (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID= ccr.serviceProviderID) AS oldName
         FROM cm_club_remarks ccr
         LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
+#         LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
         LEFT JOIN club c ON c.clubId=ccr.clubId
         LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
         LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
@@ -477,6 +480,11 @@
             </if>
         </where>
         ORDER BY ADDTIME DESC
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+        </choose>
     </select>
     <select id="findConsults" resultType="com.caimei.modules.consult.entity.type.CmConsulttype">
         select id, className, createdTime
@@ -502,14 +510,52 @@
         where id = #{string}
     </select>
 
-<!--    <insert id="insert">-->
-<!--        INSERT INTO `cm_remarks`(remarks, `addtime`)-->
-<!--        VALUES (#{remarks}, #{addtime})-->
+    <delete id="deleteRamarks">
+        DELETE
+        FROM `cm_remarks`
+        WHERE remarksId = #{remarksId}
+    </delete>
+
+    <insert id="addRemarks">
+        INSERT INTO `cm_remarks`(remarks, `addtime`)
+        VALUES (#{remarks}, #{addtime})
+    </insert>
+    <update id="upremarks">
+        UPDATE `cm_remarks`
+        SET remarks = #{remarks}
+        WHERE remarksId = #{remarksId}
+    </update>
+
+    <select id="upremakasList" resultType="java.lang.String">
+        SELECT remarks
+        FROM `cm_remarks`
+        WHERE remarksId = #{remarksId}
+    </select>
+
+    <select id="ClubsIds" resultType="java.lang.Integer">
+        select oldserviceProviderId
+        FROM `cm_club_remarks`
+        WHERE clubId = #{clubID}
+    </select>
+
+<!--    <insert id="oldname">-->
+<!--        INSERT INTO `cm_old_remarks`(serviceProviderId, `serviceProviderName`)-->
+<!--        VALUES (#{serviceProviderId}, #{serviceProviderName})-->
 <!--    </insert>-->
-<!--    <update id="updateByStatus">-->
-<!--        UPDATE `cm_remarks`-->
-<!--        SET remarks = #{remarks}-->
-<!--        WHERE remarksId = #{remarksId}-->
-<!--    </update>-->
+
+    <update id="oldname">
+    UPDATE `cm_club_remarks`
+    SET oldserviceProviderId = #{oldserviceProviderId},
+        serviceProviderId=#{newSpID}
+    WHERE clubId = #{clubID}
+      AND serviceProviderId=#{oldSpID}
+</update>
+
+    <update id="oldnames">
+        UPDATE `cm_club_remarks`
+        SET serviceProviderId=#{newSpID}
+        WHERE clubId = #{clubID}
+          AND serviceProviderId=#{oldSpID}
+    </update>
 
 </mapper>

+ 23 - 12
src/main/resources/mappings/modules/user/VisitRemarkMapper.xml

@@ -17,12 +17,14 @@
     <select id="getServer" resultType="com.caimei.modules.user.entity.Server">
         SELECT DISTINCT cvr.serviceProviderId, s.linkMan as name
         FROM cm_visitor_remarks cvr
-        LEFT JOIN serviceprovider s ON s.serviceProviderID = cvr.serviceProviderId
+                 LEFT JOIN serviceprovider s ON s.serviceProviderID = cvr.serviceProviderId
     </select>
     <select id="findList" resultType="com.caimei.modules.user.entity.VisitRemarkVo">
-        SELECT cvr.id as remarksId,cvr.questionManId,cvr.serviceProviderId,cvr.remarks,cvr.addTime,cvr.questionMan,cvr.clubId,cvr.concactTime,c.name as clubName,s.linkMan as serviceName
+        SELECT cvr.id as
+        remarksId,cvr.questionManId,cvr.serviceProviderId,cvr.remarks,cvr.addTime,cvr.questionMan,cvr.clubId,cvr.concactTime,c.name
+        as clubName,s.linkMan as serviceName
         FROM cm_visitor_remarks cvr
-        LEFT JOIN serviceprovider s  ON s.serviceProviderID = cvr.serviceProviderId
+        LEFT JOIN serviceprovider s ON s.serviceProviderID = cvr.serviceProviderId
         LEFT JOIN club c ON c.clubId= cvr.clubId
         <where>
             <if test="serviceProviderId != null and serviceProviderId != ''">
@@ -42,14 +44,20 @@
         ORDER BY cvr.addTime DESC
     </select>
     <select id="findRemarksList" resultType="com.caimei.modules.user.entity.VisitRemarkVo">
-        select cvr.id as remarksId, remarks,s.linkMan as serviceName, cvr.addTime,cvr.questionMan,ifnull(cvr.consultType,'')as consult,
-        (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID = csr.leaderId) AS leaderName
+        select cvr.id                                                                        as remarksId,
+               remarks,
+               s.linkMan                                                                     as serviceName,
+               cvr.addTime,
+               cvr.questionMan,
+               ifnull(cvr.consultType, '')
+                   as consult,cvr.clubType,cvr.pinceSensitve,cvr.satisfied,cvr.followup,cvr.extra,
+               (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID = csr.leaderId) AS leaderName
         from cm_visitor_remarks cvr
-        left join serviceprovider s on cvr.serviceProviderId = s.serviceProviderID
-        LEFT JOIN cm_serviceteam_group csg ON cvr.serviceProviderId=csg.serviceId
-        LEFT JOIN cm_serviceteam_role csr ON csr.id=csg.teamId
+                 left join serviceprovider s on cvr.serviceProviderId = s.serviceProviderID
+                 LEFT JOIN cm_serviceteam_group csg ON cvr.serviceProviderId = csg.serviceId
+                 LEFT JOIN cm_serviceteam_role csr ON csr.id = csg.teamId
         where questionManId = #{questionManId}
-        and remarks is not null
+          and remarks is not null
         order by addTime desc
     </select>
     <select id="getRemarksImageList" resultType="java.lang.String">
@@ -67,7 +75,8 @@
     <select id="findRegistList" resultType="com.caimei.modules.user.entity.VisitRemarkVo">
         SELECT DISTINCT
         ccr.id AS remarksId, ccr.remarks,s.name AS spName, ccr.addTime,ccr.questionMan,
-        csr.leaderId AS leaderId,ifnull(ccr.consultType,'') as consult,
+        csr.leaderId AS leaderId,ifnull(ccr.consultType,'') as
+        consult,ccr.clubType,ccr.pinceSensitve,ccr.satisfied,ccr.followup,ccr.extra,
         (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.serviceProviderId) AS serviceName,
         (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID = csr.leaderId) AS leaderName
         FROM cm_visitor_remarks ccr
@@ -90,11 +99,13 @@
             <if test="endAddTime != '' and endAddTime != null">
                 and ccr.addTime <![CDATA[  <  ]]> #{endAddTime}
             </if>
-                and ccr.remarks IS NOT NULL
+            and ccr.remarks IS NOT NULL
         </where>
         ORDER BY ADDTIME DESC
     </select>
     <select id="findClassName" resultType="java.lang.String">
-        select className from cm_consulttype where id = #{string}
+        select className
+        from cm_consulttype
+        where id = #{string}
     </select>
 </mapper>

+ 2 - 1
src/main/webapp/WEB-INF/views/modules/consult/type/cmConsulttypeList.jsp

@@ -64,6 +64,7 @@
     <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
     <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
     <li class="active"><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
 </ul>
 <form:form id="searchForm" modelAttribute="cmConsulttype" action="${ctx}/consult/type/cmConsulttype/" method="post"
            class="breadcrumb form-search">
@@ -134,4 +135,4 @@
 </table>
 <div class="pagination">${page}</div>
 </body>
-</html>
+</html>

+ 69 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyRemarksList.jsp

@@ -67,17 +67,86 @@
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">咨询人:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">${clubRemarks.questionMan}</div>
+					<c:if test="${not empty clubRemarks.clubType}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;">
+							机构类型:
+						</div>
+						<div style="width: 300px;float: left;margin: 10px 0;">${clubRemarks.clubType}</div>
+					</c:if>
 				</div>
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">咨询类别:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">${clubRemarks.consultType}</div>
 				</div>
+				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+					<c:if test="${not empty clubRemarks.pinceSensitve}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							价格敏感度 :
+						</div>
+						<c:if test="${clubRemarks.pinceSensitve eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">敏感</div>
+						</c:if>
+						<c:if test="${clubRemarks.pinceSensitve eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">适中</div>
+						</c:if>
+						<c:if test="${clubRemarks.pinceSensitve eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">不敏感</div>
+						</c:if>
+						<c:if test="${clubRemarks.pinceSensitve eq 4}">
+							<div style="width: 300px;float: left;margin: 10px 0;">不明确</div>
+						</c:if>
+
+					</c:if>
+					<c:if test="${not empty clubRemarks.satisfied}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							意向程度:
+						</div>
+						<c:if test="${clubRemarks.satisfied eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向强烈</div>
+						</c:if>
+						<c:if test="${clubRemarks.satisfied eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向一般</div>
+						</c:if>
+						<c:if test="${clubRemarks.satisfied eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向平淡</div>
+						</c:if>
+						<c:if test="${clubRemarks.satisfied eq 4}">
+							<div style="width: 300px;float: left;margin: 10px 0;">随便看看</div>
+						</c:if>
+
+					</c:if>
+					<c:if test="${not empty clubRemarks.followup}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							跟进状态:
+						</div>
+						<c:if test="${clubRemarks.followup eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">跟进中</div>
+						</c:if>
+						<c:if test="${clubRemarks.followup eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">跟进完成</div>
+						</c:if>
+						<c:if test="${clubRemarks.followup eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">已放弃</div>
+						</c:if>
+
+					</c:if>
+				</div>
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">关键词记录:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">
 						${clubRemarks.remarks}
 					</div>
 				</div>
+				<c:if test="${not empty clubRemarks.extra}">
+					<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							额外说明:
+						</div>
+						<div style="width: 800px;float: left;margin: 10px 0;">
+								${clubRemarks.extra}
+						</div>
+					</div>
+				</c:if>
 				<div class="td-text" style="width: 100%;float: left;">
 					<c:if test="${not empty clubRemarks.imageList}">
 						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">图片:</div>

+ 81 - 4
src/main/webapp/WEB-INF/views/modules/userNew/cmRegistRemarksList.jsp

@@ -66,7 +66,7 @@
     <li class="active"><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
     <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
     <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
-<%--    <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>--%>
+    <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
 </ul>
 <br/>
 <form:form id="searchForm" modelAttribute="cmClubRemarks" action="${ctx}/new/user/agency/regist" method="post"
@@ -76,7 +76,7 @@
     <div class="flex-wrap">
         <div>
             <label>关键词:</label>
-            <form:input path="remarks" class="input-medium" maxlength="50"/>
+            <form:input path="remarks"  htmlEscape="false" class="input-medium" maxlength="10"/>
         </div>
         <div class="item">
             <label>咨询类别:</label>
@@ -108,10 +108,12 @@
         </div>
         <div class="item">
             <label class="control-label">添加日期:</label>
-            <form:input path="startAddTime" type="text" maxlength="20" class="input-mini Wdate" value="${cmClubRemarks.startAddTime}" cssStyle="width: 130px"
+            <form:input path="startAddTime" type="text" maxlength="20" class="input-mini Wdate"
+                        value="${cmClubRemarks.startAddTime}" cssStyle="width: 130px"
                         onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
             -
-            <form:input path="endAddTime" type="text" maxlength="20" class="input-mini Wdate" value="${cmClubRemarks.endAddTime}" cssStyle="width: 130px"
+            <form:input path="endAddTime" type="text" maxlength="20" class="input-mini Wdate"
+                        value="${cmClubRemarks.endAddTime}" cssStyle="width: 130px"
                         onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
         </div>
         <div class="item">
@@ -126,6 +128,12 @@
             <c:forEach items="${page.list}" var="clubRemarks" varStatus="remark">
                 <div class="td clear" style="dashed:#0066CC;">
                     <div style="font-weight: bold;width: 100%;float: left;">
+<%--                        <c:if test="${not empty clubRemarks.oldName}">--%>
+<%--                            <span style="float: left;">${clubRemarks.oldName}</span>--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${empty clubRemarks.oldName}">--%>
+<%--                            <span style="float: left;">${clubRemarks.spName}</span>--%>
+<%--                        </c:if>--%>
                         <span style="float: left;">${clubRemarks.spName}</span>
                         <span style="float: left;margin-left:20px;"><fmt:formatDate value="${clubRemarks.addTime}"
                                                                                     pattern="yyyy-MM-dd HH:mm"/></span>
@@ -140,6 +148,12 @@
                             机构名称:
                         </div>
                         <div style="width: 300px;float: left;margin: 10px 0;">${clubRemarks.clubName}</div>
+                        <c:if test="${not empty clubRemarks.clubType}">
+                        <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            机构类型:
+                        </div>
+                        <div style="width: 300px;float: left;margin: 10px 0;">${clubRemarks.clubType}</div>
+                        </c:if>
                     </div>
                     <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
                         <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
@@ -147,6 +161,59 @@
                         </div>
                         <div style="width: 300px;float: left;margin: 10px 0;">${clubRemarks.consultType}</div>
                     </div>
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <c:if test="${not empty clubRemarks.pinceSensitve}">
+                        <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            价格敏感度 :
+                        </div>
+                            <c:if test="${clubRemarks.pinceSensitve eq 1}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">敏感</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.pinceSensitve eq 2}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">适中</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.pinceSensitve eq 3}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">不敏感</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.pinceSensitve eq 4}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">不明确</div>
+                            </c:if>
+
+                        </c:if>
+                        <c:if test="${not empty clubRemarks.satisfied}">
+                        <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            意向程度:
+                        </div>
+                            <c:if test="${clubRemarks.satisfied eq 1}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">意向强烈</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.satisfied eq 2}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">意向一般</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.satisfied eq 3}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">意向平淡</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.satisfied eq 4}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">随便看看</div>
+                            </c:if>
+
+                        </c:if>
+                        <c:if test="${not empty clubRemarks.followup}">
+                        <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            跟进状态:
+                        </div>
+                            <c:if test="${clubRemarks.followup eq 1}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">跟进中</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.followup eq 2}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">跟进完成</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.followup eq 3}">
+                                <div style="width: 300px;float: left;margin: 10px 0;">已放弃</div>
+                            </c:if>
+
+                        </c:if>
+                    </div>
                     <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
                         <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
                             关键词记录:
@@ -155,6 +222,16 @@
                                 ${clubRemarks.remarks}
                         </div>
                     </div>
+                    <c:if test="${not empty clubRemarks.extra}">
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            额外说明:
+                        </div>
+                        <div style="width: 800px;float: left;margin: 10px 0;">
+                                ${clubRemarks.extra}
+                        </div>
+                    </div>
+                    </c:if>
                     <div class="td-text" style="width: 100%;float: left;">
                         <c:if test="${not empty clubRemarks.imageList}">
                             <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">

+ 203 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksForm.jsp

@@ -0,0 +1,203 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="input" uri="/struts-tags" %>
+<html>
+<head>
+    <title>关键词库编辑</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        .red {
+            color: red;
+            display: none;
+        }
+
+        .blue {
+            color: rgb(0, 100, 180);
+        }
+
+        #inputForm {
+            max-width: 1200px;
+            width: 100%;
+        }
+
+        #inputForm table {
+            width: 100%;
+            line-height: 18px;
+            margin-bottom: 50px;
+        }
+
+        #inputForm th, #inputForm td {
+            font-weight: normal;
+            text-align: left;
+            padding: 8px 5px;
+            border-bottom: 1px solid rgb(238, 238, 238);
+        }
+
+        #inputForm th {
+            width: 15%;
+            text-align: right;
+            white-space: nowrap;
+            font-weight: bold;
+        }
+
+        #inputForm td input[type="text"] {
+            width: 320px;
+            height: 16px;
+            line-height: 16px;
+        }
+
+        #inputForm td input.short {
+            width: 110px;
+        }
+
+        #inputForm td b.line {
+            margin: 0 15px 0 20px;
+            font-weight: normal
+        }
+
+        #allAreaInput {
+            padding: 10px 0 0 100px;
+        }
+
+        #inputForm .item {
+            line-height: 28px;
+        }
+
+        #ladderPriceBox {
+            border-top: 1px solid rgb(238, 238, 238);
+            margin-top: 8px;
+            padding-top: 8px;
+        }
+
+        #ladderPriceBox > div {
+            margin-bottom: 5px;
+        }
+
+        .priceIcon:before {
+            content: '\2729';
+            color: #aaa;
+            font-size: 18px;
+            font-style: normal;
+        }
+
+        .priceIcon.full:before {
+            content: '\272E';
+            color: #ffbd14;
+        }
+
+        #slider {
+            width: 335px;
+        }
+
+        .skword input {
+            margin: 2px 0;
+        }
+
+        .skword p {
+            margin: 2px 0;
+        }
+
+        .params input {
+            margin: 2px 0;
+        }
+
+        .tags input {
+            margin: 2px 0;
+        }
+
+        #tagsList {
+            margin: 2px 0;
+            display: none;
+            width: 600px;
+        }
+
+        .tags-li {
+            margin: 10px;
+            display: inline-block;
+            padding: 5px 10px;
+            line-height: 16px;
+            text-align: center;
+            position: relative;
+            font-size: 12px;
+            border: 1px solid #EBEBEB;
+            border-radius: 4px;
+        }
+
+        .tags-li i {
+            font-style: normal;
+            line-height: 20px;
+            display: block;
+            position: absolute;
+            width: 16px;
+            height: 16px;
+            text-align: center;
+            background: rgba(0, 0, 0, 0.2);
+            border-radius: 50%;
+            top: -8px;
+            right: -7px;
+            cursor: pointer;
+        }
+
+        .tags-li .tags-s {
+            background: #FFF;
+            width: auto !important;
+            outline: none;
+            border: none;
+        }
+        label
+        {
+            display: inline-block;
+            width: 60px;
+            text-align: justify;
+            text-align-last: justify;
+            margin-right: 270px;
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/cmrenaksForm">添加关键词库</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="list" onsubmit="return um()" action="${ctx}/new/user/agency/addcmrenaksForm" method="post" class="form-horizontal">
+    <table  align = "center" border="0" cellspacing="0" cellpadding="20" width="100%">
+        <tr>
+            <th><span style="color: red">*</span>  关键词:</th>
+            <td colspan="3">
+                <input type="hidden" name="remarksId" id="remarksId" value="${remaksId}" >
+<%--                <input:form path="remarks" name="remarks" value=" ${empty list.remarks ? '' : list.remarks}" class="short input-small required" maxlength="50"/>--%>
+                <input style="width: 150px" id="remarks" placeholder="最多输入10个字符" name="remarks" class="short input-small" type="text" value="${remaks}" maxlength="10"/>&nbsp; &emsp; <span class="red" id="bt">*必填</span>
+            </td>
+        </tr>
+        <tr>
+            <td colspan="5" style="text-align:center;">
+                <shiro:hasPermission name="product:product:edit">
+                    <input id="btnSave" class="btn btn-primary" onsubmit="return um()" type="submit" value="保 存"/>
+                </shiro:hasPermission>
+                <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+            </td>
+        </tr>
+
+    </table>
+</form:form>
+<sys:message content="${message}"/>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+<script type="text/javascript">
+    function um() {
+        // debugger
+        var remarks = document.getElementById("remarks").value.length;
+        var bt = document.getElementById("bt");
+        console.log('2222222222222', remarks);
+        if (remarks <= 0) {
+            bt.style.display = "inline-block";
+            return false;
+        }
+    }
+</script>
+</body>
+</html>

+ 91 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksList.jsp

@@ -0,0 +1,91 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<html>
+<head>
+    <title>关键词库</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center;
+        }
+
+        .table td {
+            text-align: center;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+
+        });
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="cmRemaks" action="${ctx}/new/user/agency/cmrenaksList" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>关键词:</label>
+        <form:input path="remarks" name="remarks" htmlEscape="false" class="input-medium" maxlength="10"/>
+        <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询">
+        <a id="dfa" href="${ctx}/new/user/agency/cmrenaksForm" class="btn btn-primary"> 添加关键词</a>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>ID</th>
+        <th>关键词</th>
+        <th>添加时间</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="cmop">
+        <tr>
+            <td>
+                    ${empty cmop.remarksId ? "------" : cmop.remarksId}
+            </td>
+            <td>
+                    ${empty cmop.remarks ? "________" : cmop.remarks}
+            </td>
+            <td>
+            <fmt:formatDate value="${cmop.addtime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+        </td>
+            <td>
+                <a href="${ctx}/new/user/agency/cmrenaksForm?remarksId=${cmop.remarksId}">编辑</a>
+                <a href="javascript:void(0);" onclick="offliney(${cmop.remarksId})">删除</a>
+            </td>
+
+        </tr>
+    </c:forEach>
+
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+<script type="text/javascript">
+    function offliney(userId) {
+        $.jBox.confirm("确定删除该关键词吗?","提示",function(v,h,f){
+            if(v === 1){
+                window.location.href="${ctx}/new/user/agency/deleteRamarks?remarksId="+userId;
+            }
+        } ,{ buttons: {  '确定': 1,'取消':2}});
+    }
+</script>
+</body>
+</html>

+ 76 - 3
src/main/webapp/WEB-INF/views/modules/userNew/cmUnRegistRemarksList.jsp

@@ -47,6 +47,7 @@
 		<li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
 		<li class="active"><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
 		<li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+		<li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
 	</ul><br/>
 <form:form id="searchForm" modelAttribute="visit" action="${ctx}/new/user/visit/unregist" method="post" class="breadcrumb form-search">
 	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
@@ -100,6 +101,12 @@
 		<c:forEach items="${page.list}" var="visitRemarks" varStatus="remark">
 			<div class="td clear">
 				<div style="font-weight: bold;width: 100%;float: left;">
+<%--					<c:if test="${not empty visitRemarks.oldName}">--%>
+<%--						<span style="float: left;">${visitRemarks.oldName}</span>--%>
+<%--					</c:if>--%>
+<%--					<c:if test="${empty visitRemarks.oldName}">--%>
+<%--						<span style="float: left;">${visitRemarks.serviceName}</span>--%>
+<%--					</c:if>--%>
                     <span style="float: left;">${visitRemarks.serviceName}</span>
 					<span style="float: left;margin-left:10px;"><fmt:formatDate value="${visitRemarks.addTime}" pattern="yyyy-MM-dd HH:mm"/></span>
                     <span style="float: left;margin-left:120px;">管理员:${visitRemarks.leaderName}</span>
@@ -107,17 +114,86 @@
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">咨询人:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">${visitRemarks.questionMan}</div>
+					<c:if test="${not empty visitRemarks.clubType}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;">
+							机构类型:
+						</div>
+						<div style="width: 300px;float: left;margin: 10px 0;">${visitRemarks.clubType}</div>
+					</c:if>
 				</div>
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">咨询类别:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">${visitRemarks.consultType}</div>
 				</div>
+				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+					<c:if test="${not empty visitRemarks.pinceSensitve}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							价格敏感度 :
+						</div>
+						<c:if test="${visitRemarks.pinceSensitve eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">敏感</div>
+						</c:if>
+						<c:if test="${visitRemarks.pinceSensitve eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">适中</div>
+						</c:if>
+						<c:if test="${visitRemarks.pinceSensitve eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">不敏感</div>
+						</c:if>
+						<c:if test="${visitRemarks.pinceSensitve eq 4}">
+							<div style="width: 300px;float: left;margin: 10px 0;">不明确</div>
+						</c:if>
+
+					</c:if>
+					<c:if test="${not empty visitRemarks.satisfied}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							意向程度:
+						</div>
+						<c:if test="${visitRemarks.satisfied eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向强烈</div>
+						</c:if>
+						<c:if test="${visitRemarks.satisfied eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向一般</div>
+						</c:if>
+						<c:if test="${visitRemarks.satisfied eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向平淡</div>
+						</c:if>
+						<c:if test="${visitRemarks.satisfied eq 4}">
+							<div style="width: 300px;float: left;margin: 10px 0;">随便看看</div>
+						</c:if>
+
+					</c:if>
+					<c:if test="${not empty visitRemarks.followup}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							跟进状态:
+						</div>
+						<c:if test="${visitRemarks.followup eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">跟进中</div>
+						</c:if>
+						<c:if test="${visitRemarks.followup eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">跟进完成</div>
+						</c:if>
+						<c:if test="${visitRemarks.followup eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">已放弃</div>
+						</c:if>
+
+					</c:if>
+				</div>
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">关键词记录:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">
 						${visitRemarks.remarks}
 					</div>
 				</div>
+				<c:if test="${not empty visitRemarks.extra}">
+					<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							额外说明:
+						</div>
+						<div style="width: 800px;float: left;margin: 10px 0;">
+								${visitRemarks.extra}
+						</div>
+					</div>
+				</c:if>
 				<div class="td-text" style="width: 100%;float: left;">
 					<c:if test="${not empty visitRemarks.imageList}">
 						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">图片:</div>
@@ -147,9 +223,6 @@
 	</div>
 	<div class="pagination">${page}</div>
 	</c:if>
-	<c:if test="${empty page.list}">
-		<font size="3" style="text-align: center;display: block;line-height: 80px;" color="#0066CC">暂无任何记录..</font>
-	</c:if>
 </form:form>
 </body>
 </html>

+ 73 - 1
src/main/webapp/WEB-INF/views/modules/userNew/cmVisitRemarksList.jsp

@@ -58,7 +58,14 @@
 	<div style="overflow-x: hidden;word-break:break-all">
 		<c:forEach items="${page.list}" var="visitRemarks" varStatus="remark">
 			<div class="td clear">
-				<div style="font-weight: bold;width: 100%;float: left;"><span style="float: left;">${visitRemarks.serviceName}</span>
+				<div style="font-weight: bold;width: 100%;float: left;"
+<%--				<c:if test="${not empty visitRemarks.oldName}">--%>
+<%--					<span style="float: left;">${visitRemarks.oldName}</span>--%>
+<%--				</c:if>--%>
+<%--				<c:if test="${empty visitRemarks.oldName}">--%>
+<%--					<span style="float: left;">${visitRemarks.serviceName}</span>--%>
+<%--				</c:if>--%>
+				<span style="float: left;">${visitRemarks.serviceName}</span>
 					<span style="float: left;margin-left:10px;"><fmt:formatDate value="${visitRemarks.addTime}" pattern="yyyy-MM-dd HH:mm"/></span></div>
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">咨询人:</div>
@@ -68,7 +75,72 @@
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">咨询类别:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">${visitRemarks.consultType}</div>
+
+				</div>
+
+				<c:if test="${not empty visitRemarks.clubType}">
+				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+						机构类型:
+					</div>
+					<div style="width: 300px;float: left;margin: 10px 0;">${visitRemarks.clubType}</div>
+				</div>
+				</c:if>
+
+				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+					<c:if test="${not empty visitRemarks.pinceSensitve}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							价格敏感度 :
+						</div>
+						<c:if test="${visitRemarks.pinceSensitve eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">敏感</div>
+						</c:if>
+						<c:if test="${visitRemarks.pinceSensitve eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">适中</div>
+						</c:if>
+						<c:if test="${visitRemarks.pinceSensitve eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">不敏感</div>
+						</c:if>
+						<c:if test="${visitRemarks.pinceSensitve eq 4}">
+							<div style="width: 300px;float: left;margin: 10px 0;">不明确</div>
+						</c:if>
+
+					</c:if>
+					<c:if test="${not empty visitRemarks.satisfied}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							意向程度:
+						</div>
+						<c:if test="${visitRemarks.satisfied eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向强烈</div>
+						</c:if>
+						<c:if test="${visitRemarks.satisfied eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向一般</div>
+						</c:if>
+						<c:if test="${visitRemarks.satisfied eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">意向平淡</div>
+						</c:if>
+						<c:if test="${visitRemarks.satisfied eq 4}">
+							<div style="width: 300px;float: left;margin: 10px 0;">随便看看</div>
+						</c:if>
+
+					</c:if>
+					<c:if test="${not empty visitRemarks.followup}">
+						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+							跟进状态:
+						</div>
+						<c:if test="${visitRemarks.followup eq 1}">
+							<div style="width: 300px;float: left;margin: 10px 0;">跟进中</div>
+						</c:if>
+						<c:if test="${visitRemarks.followup eq 2}">
+							<div style="width: 300px;float: left;margin: 10px 0;">跟进完成</div>
+						</c:if>
+						<c:if test="${visitRemarks.followup eq 3}">
+							<div style="width: 300px;float: left;margin: 10px 0;">已放弃</div>
+						</c:if>
+
+					</c:if>
 				</div>
+
 				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
 					<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">关键词记录:</div>
 					<div style="width: 800px;float: left;margin: 10px 0;">