Ver código fonte

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

zhijiezhao 2 anos atrás
pai
commit
f8c997771b
32 arquivos alterados com 2493 adições e 524 exclusões
  1. 5 1
      src/main/java/com/caimei/modules/bulkpurchase/dao/CmClubDao.java
  2. 7 5
      src/main/java/com/caimei/modules/bulkpurchase/service/CmClubService.java
  3. 6 5
      src/main/java/com/caimei/modules/consult/web/type/CmConsulttypeController.java
  4. 3 3
      src/main/java/com/caimei/modules/coupon/redis/RedisLearn.java
  5. 33 0
      src/main/java/com/caimei/modules/coupon/web/CmCouponClubTask.java
  6. 1 1
      src/main/java/com/caimei/modules/newhome/web/NewPageFloorController.java
  7. 51 27
      src/main/java/com/caimei/modules/sys/utils/SMSUtils.java
  8. 6 227
      src/main/java/com/caimei/modules/sys/web/NotificationController.java
  9. 22 0
      src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java
  10. 111 0
      src/main/java/com/caimei/modules/user/entity/CmClubRemarks.java
  11. 194 0
      src/main/java/com/caimei/modules/user/entity/CmReport.java
  12. 9 0
      src/main/java/com/caimei/modules/user/entity/NewCmClub.java
  13. 92 0
      src/main/java/com/caimei/modules/user/entity/VisitRemarkVo.java
  14. 18 0
      src/main/java/com/caimei/modules/user/service/NewCmClubService.java
  15. 6 5
      src/main/java/com/caimei/modules/user/web/NewCmShopController.java
  16. 136 1
      src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java
  17. 4 0
      src/main/java/com/caimei/modules/user/web/newUser/SpController.java
  18. 2 0
      src/main/java/com/caimei/modules/user/web/newUser/VisitRemarkController.java
  19. 10 1
      src/main/resources/mappings/modules/bulkpurchase/CmClubMapper.xml
  20. 4 2
      src/main/resources/mappings/modules/order/OrderMapper.xml
  21. 156 19
      src/main/resources/mappings/modules/user/NewCmClubMapper.xml
  22. 1 1
      src/main/resources/mappings/modules/user/NewCmShopMapper.xml
  23. 8 2
      src/main/resources/mappings/modules/user/VisitRemarkMapper.xml
  24. 15 4
      src/main/webapp/WEB-INF/views/modules/consult/type/cmConsulttypeList.jsp
  25. 9 2
      src/main/webapp/WEB-INF/views/modules/user/maintenanceList.jsp
  26. 494 0
      src/main/webapp/WEB-INF/views/modules/userNew/ReportList.jsp
  27. 9 0
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp
  28. 103 36
      src/main/webapp/WEB-INF/views/modules/userNew/cmRegistRemarksList.jsp
  29. 553 0
      src/main/webapp/WEB-INF/views/modules/userNew/cmRegistReportList.jsp
  30. 15 4
      src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksList.jsp
  31. 245 178
      src/main/webapp/WEB-INF/views/modules/userNew/cmUnRegistRemarksList.jsp
  32. 165 0
      src/main/webapp/WEB-INF/views/modules/userNew/recordLinkageForm.jsp

+ 5 - 1
src/main/java/com/caimei/modules/bulkpurchase/dao/CmClubDao.java

@@ -3,6 +3,8 @@ package com.caimei.modules.bulkpurchase.dao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.bulkpurchase.entity.CmClub;
+import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
 
 /**
@@ -14,4 +16,6 @@ import java.util.List;
 public interface CmClubDao extends CrudDao<CmClub> {
 
    List<CmClub> findClubById(Long clubId);
-}
+
+   void updateServiceProvider(@Param("clubId")Integer clubId,@Param("oldSpId")Integer oldSpId,@Param("newSpId")Integer newSpId);
+}

+ 7 - 5
src/main/java/com/caimei/modules/bulkpurchase/service/CmClubService.java

@@ -25,20 +25,22 @@ public class CmClubService extends CrudService<CmClubDao, CmClub> {
 	public CmClub get(String id) {
 		return super.get(id);
 	}
-	
+
 	public List<CmClub> findList(CmClub cmClub) {
 		return super.findList(cmClub);
 	}
-	
+
 	public Page<CmClub> findPage(Page<CmClub> page, CmClub cmClub) {
 		return super.findPage(page, cmClub);
 	}
-	
+
 	@Transactional(readOnly = false)
 	public void save(CmClub cmClub) {
 		super.save(cmClub);
 	}
-	
+
+
+
 	@Transactional(readOnly = false)
 	public void delete(CmClub cmClub) {
 		super.delete(cmClub);
@@ -48,4 +50,4 @@ public class CmClubService extends CrudService<CmClubDao, CmClub> {
 		List<CmClub> cmClub=cmClubDao.findClubById(clubId);
 		return cmClub.get(0);
     }
-}
+}

+ 6 - 5
src/main/java/com/caimei/modules/consult/web/type/CmConsulttypeController.java

@@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.caimei.vo.JsonModel;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
@@ -32,7 +33,7 @@ public class CmConsulttypeController extends BaseController {
 
 	@Autowired
 	private CmConsulttypeService cmConsulttypeService;
-	
+
 	@ModelAttribute
 	public CmConsulttype get(@RequestParam(required=false) String id) {
 		CmConsulttype entity = null;
@@ -59,11 +60,11 @@ public class CmConsulttypeController extends BaseController {
 		cmConsulttypeService.updateSortIndex(cmConsulttypeIdSortNumber);
 		return jsonModel.success("批量更新排序成功");
 	}
-	
 
+	@RequiresPermissions("user:agency:cmConsulttype")
 	@RequestMapping(value = {"list", ""})
 	public String list(CmConsulttype cmConsulttype, HttpServletRequest request, HttpServletResponse response, Model model) {
-		Page<CmConsulttype> page = cmConsulttypeService.findPage(new Page<CmConsulttype>(request, response), cmConsulttype); 
+		Page<CmConsulttype> page = cmConsulttypeService.findPage(new Page<CmConsulttype>(request, response), cmConsulttype);
 		model.addAttribute("page", page);
 		return "modules/consult/type/cmConsulttypeList";
 	}
@@ -92,7 +93,7 @@ public class CmConsulttypeController extends BaseController {
 		addMessage(redirectAttributes, "保存咨询类别成功");
 		return "redirect:"+Global.getAdminPath()+"/consult/type/cmConsulttype/?repage";
 	}
-	
+
 
 	@RequestMapping(value = "delete")
 	public String delete(CmConsulttype cmConsulttype, RedirectAttributes redirectAttributes) {
@@ -108,4 +109,4 @@ public class CmConsulttypeController extends BaseController {
 		return "redirect:"+Global.getAdminPath()+"/consult/type/cmConsulttype/?repage";
 	}
 
-}
+}

+ 3 - 3
src/main/java/com/caimei/modules/coupon/redis/RedisLearn.java

@@ -31,10 +31,10 @@ public class RedisLearn {
             Jedis jedis=null;
             String constraint="";
 
-                jedis=new Jedis("172.31.165.27", 6379);
-                jedis.auth("6#xsI%b4o@5c3RoE");
+//                jedis=new Jedis("172.31.165.27", 6379);
+//                jedis.auth("6#xsI%b4o@5c3RoE");
 
-//                jedis=new Jedis("192.168.2.100", 6379);
+                jedis=new Jedis("192.168.2.100", 6379);
 
 //                jedis=new Jedis("172.31.165.23", 6379);
 

+ 33 - 0
src/main/java/com/caimei/modules/coupon/web/CmCouponClubTask.java

@@ -0,0 +1,33 @@
+package com.caimei.modules.coupon.web;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/11/12
+ */
+@Configuration
+@EnableAsync
+public class CmCouponClubTask {
+    @Bean(name="new_coupn")
+    public Executor taskExecutor(){
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(10);
+        executor.setMaxPoolSize(20);
+        executor.setQueueCapacity(200);
+        executor.setKeepAliveSeconds(60);
+        executor.setThreadNamePrefix("asyncTask-");
+        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+        executor.setWaitForTasksToCompleteOnShutdown(true);
+        executor.setAwaitTerminationSeconds(60);
+        return executor;
+    }
+}

+ 1 - 1
src/main/java/com/caimei/modules/newhome/web/NewPageFloorController.java

@@ -233,7 +233,7 @@ public class NewPageFloorController extends BaseController {
             String[] newPageLists = sortList.split(",");
             for (String list : newPageLists) {
                 String[] split = list.split("-");
-                if (split.length == 1 || split.length < 1) {
+                if (split.length < 1) {
                     String id = split[0];
                     String sortIndex = null;
                     newPageFloorService.savesortIndex(sortIndex, id);

+ 51 - 27
src/main/java/com/caimei/modules/sys/utils/SMSUtils.java

@@ -6,21 +6,34 @@ import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.web.client.RestTemplate;
 
+import java.util.ArrayList;
+import java.util.List;
+
 public class SMSUtils {
 
-	/** key */
+	/**
+	 * key
+	 */
 	private static final String ACCOUNT = "account";
 	private static final String PASSWORD = "password";
-	/** 通知短信 账户 */
+	/**
+	 * 通知短信 账户
+	 */
 	private static final String ACCOUNT_NOTICE = "N2532063";
 	private static final String PASSWORD_NOTICE = "jzVvYmuP4D7f1b";
-	/** 验证码短信 账户 */
+	/**
+	 * 验证码短信 账户
+	 */
 	private static final String ACCOUNT_YZM = "YZM6372171";
 	private static final String PASSWORD_YZM = "1L8ZaIEW7fa3ca";
-	/** 营销短信 账户 */
+	/**
+	 * 营销短信 账户
+	 */
 	private static final String ACCOUNT_ADS = "M1666161";
 	private static final String PASSWORD_ADS = "TO3xSGvEUk6ddc";
-	/** 请求地址 */
+	/**
+	 * 请求地址
+	 */
 	private static final String SMS_URL = "http://smssh1.253.com/msg/send/json";
 
 
@@ -29,7 +42,7 @@ public class SMSUtils {
 //	private static String account = "0755cmxx";
 //	private static String password = "CaimeiSMS999";
 
-	public static boolean sendSms(Integer type,String mobile, String content){
+	public static boolean sendSms(Integer type, String mobile, String content) {
 
 //		String res = SmsClientSend.sendSms(url, userid, account, password, mobile, content);
 //		return res.indexOf("Success") != -1;
@@ -50,27 +63,38 @@ public class SMSUtils {
 //		}
 
 		// 获取core服务器地址
-		String coreServer = Global.getConfig("caimei.core");
-		RestTemplate restTemplate = new RestTemplate();
-		String uri = coreServer + "/tools/sms/send";
-		// 发起Post请求
-		MultiValueMap<String, String> paramMap = new LinkedMultiValueMap<>();
-		paramMap.add("type", type.toString());
-		paramMap.add("mobile", mobile);
-		paramMap.add("content", content);
-		String result = restTemplate.postForObject(uri, paramMap, String.class);
-		System.out.println(result);
-		JSONObject json = (JSONObject) JSONObject.parse(result);
-		if (null != json && json.getInteger("code") == 0) {
-			return true;
-		} else {
-			return false;
+		List<String> list = new ArrayList<>();
+		list.add("15917362709");
+		list.add("15814011616");
+		list.add("13100721916");
+		list.add("15113936829");
+		list.add("15827317748");
+		list.add("18476937515");
+		list.add("18175515644");
+		if (list.contains(mobile)) {
+			String coreServer = Global.getConfig("caimei.core");
+			RestTemplate restTemplate = new RestTemplate();
+			String uri = coreServer + "/tools/sms/send";
+			// 发起Post请求
+			MultiValueMap<String, String> paramMap = new LinkedMultiValueMap<>();
+			paramMap.add("type", type.toString());
+			paramMap.add("mobile", mobile);
+			paramMap.add("content", content);
+			String result = restTemplate.postForObject(uri, paramMap, String.class);
+
+			System.out.println(result);
+			JSONObject json = (JSONObject) JSONObject.parse(result);
+			if (null != json && json.getInteger("code") == 0) {
+				return true;
+			} else {
+				return false;
+			}
 		}
+		return false;
 	}
-
-	public static void main(String[] args) {
-//		String e="abc";
-//		System.out.println(sendSms(3,"1817515644", "【采美365】 尊敬的采美供应商用户,您在采美上架的商品“" + e + "”资质证书将于3个月后失效,请及时登录采美网站上传新证书。"));
-//		 System.out.println(sendSms("18175515644", "您短信验证码是:7895"));
+//		public static void main (String[]args){
+////		String e="abc";
+////		System.out.println(sendSms(3,"1817515644", "【采美365】 尊敬的采美供应商用户,您在采美上架的商品“" + e + "”资质证书将于3个月后失效,请及时登录采美网站上传新证书。"));
+////		 System.out.println(sendSms("18175515644", "您短信验证码是:7895"));
+//		}
 	}
-}

+ 6 - 227
src/main/java/com/caimei/modules/sys/web/NotificationController.java

@@ -64,227 +64,6 @@ public class NotificationController extends BaseController {
     @RequestMapping(value = {"list", ""})
     public String list( Notification notifi,HttpServletRequest request, HttpServletResponse response, Model model) {
 
-
-//        //械字号资质证书3个月后过期
-//        Integer count=0;
-//        String name="";
-//        String productID="";
-//        String shopID="";
-//        Date date=new Date();
-//        String curDateStr = (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(date);
-//        //资质证书
-//       List<Product>pro=notificationDao.productTypeCount(3);
-//        List<Product>pro1=notificationDao.productTypeCount(1);
-//        List<Product>pro2=notificationDao.productTypeCount1(7);
-//        List<Product>pro3=notificationDao.productTypeCount1(1);
-//        //上架费
-//        List<Product>product=notificationDao.productTypeCount2(3);
-//        List<Product>product1=notificationDao.productTypeCount2(1);
-//        List<Product>product2=notificationDao.productTypeCount3(7);
-//        List<Product>product3=notificationDao.productTypeCount3(1);
-////
-//        Jedis jedis=null;
-//        String constraint="";
-//        if(domain.contains("-b")){
-//             jedis=new Jedis("172.31.165.27", 6379);
-//             jedis.auth("6#xsI%b4o@5c3RoE");
-//        }else if(domain.contains("localhost")){
-//             jedis=new Jedis("192.168.2.100", 6379);
-//        }else {
-//            jedis=new Jedis("172.31.165.23", 6379);
-//        }
-//
-//        if(!"1".equals(jedis.rpop("constraint"))){
-//            jedis.lpush("constraint","0");
-//
-//        }
-//        constraint=jedis.rpop("constraint");
-//        System.out.println(jedis.rpop("constraint"));
-//      if("0".equals(constraint)){
-//       for (int i=0;i<pro.size();i++){
-//           MessageCenter messageCenter = new MessageCenter();
-//           messageCenter.setShopId(pro.get(i).getShopID());
-//           messageCenter.setClubId(null);
-//           messageCenter.setUserType(2);
-//           messageCenter.setMessageType(2);
-//           messageCenter.setShopMessType(5);
-//           messageCenter.setContent("该商品的资质证书将于3个月后失效,请及时登录采美网站上传新证书。");
-//           messageCenter.setTime(curDateStr);
-//           messageCenterDao.addMessageCenter(messageCenter);
-//
-//           if(i!=0){
-//               name+=",";
-//               productID+=",";
-//           }
-//          name +="("+pro.get(i).getProductID().toString()+")"+pro.get(i).getName();
-//           productID+=pro.get(i).getProductID().toString();
-//    }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下械字号商品的资质证书将于3个月后失效,请及时提醒供应商更换证书。");
-//            notification.setShopContent(name);
-//            notification.setPorductID(productID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            productID="";
-//        }
-//        //械字号资质证书1个月后过期
-//        for (int i=0;i<pro1.size();i++){
-//
-//            MessageCenter messageCenter = new MessageCenter();
-//            messageCenter.setShopId(pro1.get(i).getShopID());
-//            messageCenter.setClubId(null);
-//            messageCenter.setUserType(2);
-//            messageCenter.setMessageType(2);
-//            messageCenter.setShopMessType(5);
-//            messageCenter.setContent("该商品的资质证书将于1个月后失效,请及时登录采美网站上传新证书。");
-//            messageCenter.setTime(curDateStr);
-//            messageCenterDao.addMessageCenter(messageCenter);
-//            if(i!=0){
-//                name+=",";
-//                productID+=",";
-//            }
-//            name +="("+pro1.get(i).getProductID().toString()+")"+pro.get(i).getName();
-//            productID+=pro1.get(i).getProductID().toString();
-//        }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下械字号商品的资质证书将于1个月后失效,请及时提醒供应商更换证书。");
-//            notification.setShopContent(name);
-//            notification.setPorductID(productID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            productID="";
-//        }
-////械字号资质证书7日后过期
-//        for (int i=0;i<pro2.size();i++){
-//
-//            MessageCenter messageCenter = new MessageCenter();
-//            messageCenter.setShopId(pro2.get(i).getShopID());
-//            messageCenter.setClubId(null);
-//            messageCenter.setUserType(2);
-//            messageCenter.setMessageType(2);
-//            messageCenter.setShopMessType(5);
-//            messageCenter.setContent("该商品的资质证书将于7天后失效,请及时登录采美网站上传新证书。");
-//            messageCenter.setTime(curDateStr);
-//            messageCenterDao.addMessageCenter(messageCenter);
-//            if(i!=0){
-//                name+=",";
-//                productID+=",";
-//            }
-//            name +="("+pro2.get(i).getProductID().toString()+")"+pro.get(i).getName();
-//            productID+=pro2.get(i).getProductID().toString();
-//        }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下械字号商品的资质证书将于7天后失效,请及时提醒供应商更换证书。");
-//            notification.setShopContent(name);
-//            notification.setPorductID(productID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            productID="";
-//        }
-////械字号资质证书今日后过期
-//        for (int i=0;i<pro3.size();i++){
-//            MessageCenter messageCenter = new MessageCenter();
-//            messageCenter.setShopId(pro3.get(i).getShopID());
-//            messageCenter.setClubId(null);
-//            messageCenter.setUserType(2);
-//            messageCenter.setMessageType(2);
-//            messageCenter.setShopMessType(5);
-//            messageCenter.setContent("该商品的资质证书将于今天后失效,请及时登录采美网站上传新证书。");
-//            messageCenter.setTime(curDateStr);
-//            messageCenterDao.addMessageCenter(messageCenter);
-//            if(i!=0){
-//                name+=",";
-//                productID+=",";
-//            }
-//            name +="("+pro3.get(i).getProductID().toString()+")"+pro.get(i).getName();
-//            productID+=pro3.get(i).getProductID().toString();
-//        }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下械字号商品的资质证书将于今天后失效,请及时提醒供应商更换证书。");
-//            notification.setShopContent(name);
-//            notification.setPorductID(productID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            productID="";
-//        }
-//        //上架费
-//        for (int i=0;i<product.size();i++){
-//            if(i!=0){
-//                name+=",";
-//                shopID+=",";
-//            }
-//            name +=product.get(i).getShopName();
-//            shopID+=product.get(i).getShopID();
-//        }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下供应商的上架费将于3个月后到期,请及时提醒供应商续费。");
-//            notification.setShopContent(name);
-//            notification.setShopID(shopID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            shopID="";
-//        }
-//        //上架费1个月后过期
-//        for (int i=0;i<product1.size();i++){
-//            if(i!=0){
-//                name+=",";
-//                shopID+=",";
-//            }
-//            name +=product1.get(i).getShopName();
-//            shopID+=product1.get(i).getShopID();
-//        }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下供应商的上架费将于1个月后到期,请及时提醒供应商续费。");
-//            notification.setShopContent(name);
-//            notification.setShopID(shopID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            shopID="";
-//        }
-////上架费7日后过期
-//        for (int i=0;i<product2.size();i++){
-//            if(i!=0){
-//                name+=",";
-//                shopID+=",";
-//            }
-//            name +=product2.get(i).getShopName();
-//            shopID+=product2.get(i).getShopID();
-//        }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下供应商的上架费将于7天后到期,请及时提醒供应商续费。");
-//            notification.setShopContent(name);
-//            notification.setShopID(shopID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            shopID="";
-//        }
-////上架费今日后过期
-//        for (int i=0;i<product3.size();i++){
-//            if(i!=0){
-//                name+=",";
-//                shopID+=",";
-//            }
-//            name +=product3.get(i).getShopName();
-//            shopID+=product3.get(i).getShopID();
-//        }
-//        if(!"".equals(name)){
-//            Notification notification=new Notification();
-//            notification.setTheme("以下供应商的上架费将于今天后到期,请及时提醒供应商续费。");
-//            notification.setShopContent(name);
-//            notification.setShopID(shopID);
-//            notificationDao.addNotification(notification);
-//            name="";
-//            shopID="";
-//        }
-//      }
-//        jedis.lpush("constraint","1");
       List<String> content=new ArrayList<>();
         Page<Notification> page = notificationService.notificationPagen(new Page<Notification>(request, response), notifi);
 
@@ -505,8 +284,8 @@ if(count<=0){
         return "redirect:"+Global.getAdminPath()+"/sys/Notification/list";
     }
     @Scheduled(cron = "0 0 11 * * ?")
-//@Scheduled(cron = "0 0/3 * * * ?")
-    public void time(){
+//@Scheduled(cron = "0 0/1 * * * ?")
+    public void nottime(){
         logger.info("》》》》》》》》》》》开始检测商品资质证书和上架费是否过期");
 
         //械字号资质证书3个月后过期
@@ -663,7 +442,7 @@ if(count<=0){
                     name+=",";
                     shopID+=",";
                 }
-                name +=product.get(i).getShopName();
+                name +=product.get(i).getName();
                 shopID+=product.get(i).getShopID();
             }
             if(!"".equals(name)){
@@ -681,7 +460,7 @@ if(count<=0){
                     name+=",";
                     shopID+=",";
                 }
-                name +=product1.get(i).getShopName();
+                name +=product1.get(i).getName();
                 shopID+=product1.get(i).getShopID();
             }
             if(!"".equals(name)){
@@ -699,7 +478,7 @@ if(count<=0){
                     name+=",";
                     shopID+=",";
                 }
-                name +=product2.get(i).getShopName();
+                name +=product2.get(i).getName();
                 shopID+=product2.get(i).getShopID();
             }
             if(!"".equals(name)){
@@ -717,7 +496,7 @@ if(count<=0){
                     name+=",";
                     shopID+=",";
                 }
-                name +=product3.get(i).getShopName();
+                name +=product3.get(i).getName();
                 shopID+=product3.get(i).getShopID();
             }
             if(!"".equals(name)){

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

@@ -59,4 +59,26 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
 
     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);
+
+    List<CmReport> ReportList(CmReport cmReport);
+
+    List<VisitRemarkVo> findRegistLists(CmClubRemarks cmClubRemarks);
+
+    Integer visitorRemarksConut(Integer reportID);
+
+    Integer clubRemarksConut(Integer reportID);
+
+    void updateAuditRemarks(@Param("reportID")Integer reportID,@Param("auditName")String auditName,@Param("auditText")String auditText,@Param("status")Integer status);
+
+    void updateClubRemarks(Integer remarksId);
+
+    void updateVisitorRemarks(Integer remarksId);
+
+    void deleteClubRemarks(Integer reportID);
+
+    void addRecordLinkage(@Param("describe")String describe,@Param("link")String link,@Param("clubId")Integer clubId);
+
+    String recordLinkage(Integer clubId);
+
+    String recordDescribe(Integer clubId);
 }

+ 111 - 0
src/main/java/com/caimei/modules/user/entity/CmClubRemarks.java

@@ -121,6 +121,37 @@ public class CmClubRemarks extends DataEntity<CmClubRemarks> {
      */
     private String oldName;
 
+    private Integer newDeal;//新分配机构状态 0.全部 1.是 2否,
+
+    private String productName; //咨询商品名称
+
+    private String mainImage;//咨询商品主图
+
+    private String shopName;//供应商名称
+
+    private String productMainImage;//关联报备商品主图
+
+    private String proName;//关联报备商品名称
+
+    private String reportText;//关联事由
+
+    private String auditName;
+
+    private Integer reportStatus;//状态 1.已审核 2.待审核 3.审核未通过
+
+    private String auditTime;//审核时间
+
+    private Integer reportID;
+
+
+    public Integer getReportID() {
+        return reportID;
+    }
+
+    public void setReportID(Integer reportID) {
+        this.reportID = reportID;
+    }
+
     public String getOldName() {
         return oldName;
     }
@@ -314,4 +345,84 @@ public class CmClubRemarks extends DataEntity<CmClubRemarks> {
     public void setQuestionMan(String questionMan) {
         this.questionMan = questionMan;
     }
+
+    public Integer getNewDeal() {
+        return newDeal;
+    }
+
+    public void setNewDeal(Integer newDeal) {
+        this.newDeal = newDeal;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getMainImage() {
+        return mainImage;
+    }
+
+    public void setMainImage(String mainImage) {
+        this.mainImage = mainImage;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getProductMainImage() {
+        return productMainImage;
+    }
+
+    public void setProductMainImage(String productMainImage) {
+        this.productMainImage = productMainImage;
+    }
+
+    public String getProName() {
+        return proName;
+    }
+
+    public void setProName(String proName) {
+        this.proName = proName;
+    }
+
+    public String getReportText() {
+        return reportText;
+    }
+
+    public void setReportText(String reportText) {
+        this.reportText = reportText;
+    }
+
+    public Integer getReportStatus() {
+        return reportStatus;
+    }
+
+    public void setReportStatus(Integer reportStatus) {
+        this.reportStatus = reportStatus;
+    }
+
+    public String getAuditTime() {
+        return auditTime;
+    }
+
+    public void setAuditTime(String auditTime) {
+        this.auditTime = auditTime;
+    }
+
+    public String getAuditName() {
+        return auditName;
+    }
+
+    public void setAuditName(String auditName) {
+        this.auditName = auditName;
+    }
 }

+ 194 - 0
src/main/java/com/caimei/modules/user/entity/CmReport.java

@@ -0,0 +1,194 @@
+package com.caimei.modules.user.entity;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2022/8/10
+ */
+public class CmReport extends DataEntity<CmReport> {
+
+    private Integer reportId;
+
+    private Integer remarksID; //咨询记录ID
+
+    private Integer productID; //关联商品
+
+    private Integer clubID;  //报备机构ID
+
+    private Integer visitorID; //未注册机构咨询ID
+
+    private String reportName; //报备人
+
+    private String reportText;  //报备事由
+
+    private String addTime; //创建时间
+
+    private Integer status; //状态 1.已审核 2.待审核 3.审核未通过
+
+    private String auditName; //审核人
+
+    private String auditTime; //审核时间
+
+    private String productName; //咨询商品名称
+
+    private String mainImage;//咨询商品主图
+
+    private String clubName;//机构名称
+
+    private String startAddTime;
+
+
+    private String endAddTime;
+
+    private Integer newDeal;//新分配机构状态 0.否,1.是
+
+    private String auditText;
+
+
+    public Integer getRemarksID() {
+        return remarksID;
+    }
+
+    public void setRemarksID(Integer remarksID) {
+        this.remarksID = remarksID;
+    }
+
+    public Integer getProductID() {
+        return productID;
+    }
+
+    public void setProductID(Integer productID) {
+        this.productID = productID;
+    }
+
+    public Integer getClubID() {
+        return clubID;
+    }
+
+    public void setClubID(Integer clubID) {
+        this.clubID = clubID;
+    }
+
+    public String getReportName() {
+        return reportName;
+    }
+
+    public void setReportName(String reportName) {
+        this.reportName = reportName;
+    }
+
+    public String getReportText() {
+        return reportText;
+    }
+
+    public void setReportText(String reportText) {
+        this.reportText = reportText;
+    }
+
+    public String getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(String addTime) {
+        this.addTime = addTime;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getAuditName() {
+        return auditName;
+    }
+
+    public void setAuditName(String auditName) {
+        this.auditName = auditName;
+    }
+
+    public String getAuditTime() {
+        return auditTime;
+    }
+
+    public void setAuditTime(String auditTime) {
+        this.auditTime = auditTime;
+    }
+
+    public Integer getVisitorID() {
+        return visitorID;
+    }
+
+    public void setVisitorID(Integer visitorID) {
+        this.visitorID = visitorID;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getMainImage() {
+        return mainImage;
+    }
+
+    public void setMainImage(String mainImage) {
+        this.mainImage = mainImage;
+    }
+
+    public String getClubName() {
+        return clubName;
+    }
+
+    public void setClubName(String clubName) {
+        this.clubName = clubName;
+    }
+
+    public Integer getReportId() {
+        return reportId;
+    }
+
+    public void setReportId(Integer reportId) {
+        this.reportId = reportId;
+    }
+
+    public String getStartAddTime() {
+        return startAddTime;
+    }
+
+    public void setStartAddTime(String startAddTime) {
+        this.startAddTime = startAddTime;
+    }
+
+    public String getEndAddTime() {
+        return endAddTime;
+    }
+
+    public void setEndAddTime(String endAddTime) {
+        this.endAddTime = endAddTime;
+    }
+
+    public Integer getNewDeal() {
+        return newDeal;
+    }
+
+    public void setNewDeal(Integer newDeal) {
+        this.newDeal = newDeal;
+    }
+
+    public String getAuditText() {
+        return auditText;
+    }
+
+    public void setAuditText(String auditText) {
+        this.auditText = auditText;
+    }
+}

+ 9 - 0
src/main/java/com/caimei/modules/user/entity/NewCmClub.java

@@ -89,6 +89,7 @@ public class NewCmClub extends DataEntity<NewCmClub> {
     private String endTime;        //注册时间结束  查询条件
     private String userIdentity;  //用户身份
     private Integer svipUserFlag;   //超级会员用户标识,1是,2不是
+    private Integer newDeal;//新分配机构状态 0.否,1.是
     public String getCheckMan() {
         return checkMan;
     }
@@ -1009,4 +1010,12 @@ public class NewCmClub extends DataEntity<NewCmClub> {
     public void setLinkManIdentity(Integer linkManIdentity) {
         this.linkManIdentity = linkManIdentity;
     }
+
+    public Integer getNewDeal() {
+        return newDeal;
+    }
+
+    public void setNewDeal(Integer newDeal) {
+        this.newDeal = newDeal;
+    }
 }

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

@@ -125,6 +125,26 @@ public class VisitRemarkVo extends DataEntity<VisitRemarkVo> {
      */
     private String oldName;
 
+
+    private String productName; //咨询商品名称
+
+    private String mainImage;//咨询商品主图
+
+    private String shopName;//供应商名称
+
+    private String productMainImage;//关联报备商品主图
+
+    private String proName;//关联报备商品名称
+
+    private String reportText;//关联事由
+
+    private String auditName;
+
+    private Integer reportStatus;//状态 1.已审核 2.待审核 3.审核未通过
+
+    private String auditTime;//审核时间
+
+
     public String getOldName() {
         return oldName;
     }
@@ -350,4 +370,76 @@ public class VisitRemarkVo extends DataEntity<VisitRemarkVo> {
     public void setFileList(List<RemarksFileVo> fileList) {
         this.fileList = fileList;
     }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getMainImage() {
+        return mainImage;
+    }
+
+    public void setMainImage(String mainImage) {
+        this.mainImage = mainImage;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getProductMainImage() {
+        return productMainImage;
+    }
+
+    public void setProductMainImage(String productMainImage) {
+        this.productMainImage = productMainImage;
+    }
+
+    public String getProName() {
+        return proName;
+    }
+
+    public void setProName(String proName) {
+        this.proName = proName;
+    }
+
+    public String getReportText() {
+        return reportText;
+    }
+
+    public void setReportText(String reportText) {
+        this.reportText = reportText;
+    }
+
+    public String getAuditName() {
+        return auditName;
+    }
+
+    public void setAuditName(String auditName) {
+        this.auditName = auditName;
+    }
+
+    public Integer getReportStatus() {
+        return reportStatus;
+    }
+
+    public void setReportStatus(Integer reportStatus) {
+        this.reportStatus = reportStatus;
+    }
+
+    public String getAuditTime() {
+        return auditTime;
+    }
+
+    public void setAuditTime(String auditTime) {
+        this.auditTime = auditTime;
+    }
 }

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

@@ -5,6 +5,7 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
+import com.caimei.modules.bulkpurchase.dao.CmClubDao;
 import com.caimei.modules.consult.entity.type.CmConsulttype;
 import com.caimei.modules.oss.service.CmOssArchiveService;
 import com.caimei.modules.oss.utils.OSSUtils;
@@ -36,6 +37,8 @@ public class NewCmClubService extends CrudService<NewCmClubDao, NewCmClub> {
 
     @Autowired
     private NewCmClubDao newCmClubDao;
+    @Autowired
+    private CmClubDao cmClubDao;
 
     @Autowired
     private CmOssArchiveService cmOssArchiveService;
@@ -195,4 +198,19 @@ public class NewCmClubService extends CrudService<NewCmClubDao, NewCmClub> {
 
         newCmClubDao.oldnames(clubID,oldSpID,newSpID);
     }
+
+    @Transactional(readOnly = false)
+    public void updateServiceProvider(Integer clubId , Integer oldSpID,Integer newSpID){
+
+        cmClubDao.updateServiceProvider(clubId,oldSpID,newSpID);
+    }
+
+
+    public Page<CmReport> ReportList(Page<CmReport> cmReports ,CmReport cmReport){
+       cmReport.setPage(cmReports);
+       List<CmReport>list= newCmClubDao.ReportList(cmReport);
+       cmReports.setList(list);
+       return cmReports;
+    }
+
 }

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

@@ -270,7 +270,7 @@ public class NewCmShopController extends BaseController {
             System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+"1:"+date+"2:"+dateStrings+"3:"+dateString);
         }
         Page<CmDiscernReceipt>discernReceip = newCmShopService.maintenanceList(new Page<CmDiscernReceipt>(request, response, 20),cmDiscernReceipt);
-        model.addAttribute("CmDiscernReceipt", cmDiscernReceipt);
+            model.addAttribute("CmDiscernReceipt", cmDiscernReceipt);
         model.addAttribute("discernReceipt", discernReceip);
         return "modules/user/maintenanceList";
     }
@@ -288,6 +288,7 @@ public class NewCmShopController extends BaseController {
         newCmShopService.addthelast(cmDiscernReceipt);
         cmDiscernReceipt.setReceiptID(newCmShopService.therectip().toString());
         newCmShopService.cmreceipt(cmDiscernReceipt);
+
         //获取操作员
         SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
         System.out.println("操作员" + principal.getName());
@@ -400,7 +401,7 @@ public class NewCmShopController extends BaseController {
                 sysLog.setContact(newCmShops.getLinkMan());
                 sysLog.setInstitutionName(newCmShops.getName());
                 sysLog.setOperationtype("审核");
-                sysLog.setActioncontent("审核失败");
+                    sysLog.setActioncontent("审核失败");
                 if (!"".equals(sysLog.getActioncontent())) {
                     if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
                         int i = cmOperationalLogService.insert(sysLog);
@@ -906,7 +907,7 @@ public class NewCmShopController extends BaseController {
             }
         }
 
-        if (!newCmShop.getBusinessScope().equals(newCmShops.getBusinessScope())) {
+         if (!newCmShop.getBusinessScope().equals(newCmShops.getBusinessScope())) {
             list.add("修改了医疗类型");
         }
 
@@ -923,7 +924,7 @@ public class NewCmShopController extends BaseController {
                 list.add("新增了微信公众号");
             }
         }
-        if (!newCmShop.getWxOfficialAccount().equals(newCmShops.getWxOfficialAccount())) {
+            if (!newCmShop.getWxOfficialAccount().equals(newCmShops.getWxOfficialAccount())) {
             list.add("修改了微信公众号");
         }
 
@@ -940,7 +941,7 @@ public class NewCmShopController extends BaseController {
                 list.add("新增了营业执照编号");
             }
         }
-        if (!newCmShop.getSocialCreditCode().equals(newCmShops.getSocialCreditCode())) {
+      if (!newCmShop.getSocialCreditCode().equals(newCmShops.getSocialCreditCode())) {
             list.add("修改了营业执照编号");
         }
 

+ 136 - 1
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -12,6 +12,8 @@ import com.caimei.modules.sys.utils.SMSUtils;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.modules.user.aop.OperationLogAnnotation;
 import com.caimei.modules.user.dao.MessageCenterDao;
+import com.caimei.modules.user.dao.NewCmClubDao;
+import com.caimei.modules.user.dao.VisitRemarkDao;
 import com.caimei.modules.user.entity.*;
 import com.caimei.modules.user.service.*;
 import com.caimei.utils.AppKeys;
@@ -28,8 +30,10 @@ import com.thinkgem.jeesite.common.web.BaseController;
 import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.map.HashedMap;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -40,11 +44,14 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.List;
 
 /**
  * 用户模块重构--机构管理Controller
@@ -89,6 +96,15 @@ public class AgencyController extends BaseController {
     private NewShopOrderDao newShopOrderDao;
     @Autowired
     private WeChatService weChatService;
+    @Autowired
+    private NewCmClubDao newCmClubDao;
+@Autowired
+private VisitRemarkDao visitRemarkDao;
+
+    @Value("${wwwServer}")
+    private String domain;
+
+
     @ModelAttribute
     public NewCmClub get(@RequestParam(required = false) String id) {
         NewCmClub entity = null;
@@ -1144,6 +1160,7 @@ public class AgencyController extends BaseController {
      * @param model
      * @return
      */
+    @RequiresPermissions("user:agency:regist")
     @RequestMapping("regist")
     public String registList(CmClubRemarks cmClubRemarks, HttpServletRequest request, HttpServletResponse response, Model model) {
         if (org.apache.commons.lang3.StringUtils.isNotBlank(cmClubRemarks.getStartAddTime())) {
@@ -1164,6 +1181,63 @@ public class AgencyController extends BaseController {
         return "modules/userNew/cmRegistRemarksList";
     }
 
+
+
+
+
+    @RequestMapping("cmRegistReportList")
+    public String cmRegistReportList(CmClubRemarks cmClubRemarks, HttpServletRequest request, HttpServletResponse response, Model model) {
+        List<VisitRemarkVo> remarksLists = newCmClubDao.findRegistLists(cmClubRemarks);
+        List<CmClubRemarks> remarksList = newCmClubDao.findRegistList(cmClubRemarks);
+        cmClubRemarks.setConsults(newCmClubService.findConsults());
+        cmClubRemarks.setTeams(newCmClubService.findTeams());
+        model.addAttribute("cmClubRemarks", cmClubRemarks);
+        model.addAttribute("remarksList", remarksList);
+        model.addAttribute("remarksLists", remarksLists);
+        return "modules/userNew/cmRegistReportList";
+    }
+
+    @RequestMapping("recordLinkage")
+    public String RecordLinkage(Integer clubId,HttpServletRequest request, HttpServletResponse response, Model model) {
+       String link= newCmClubDao.recordLinkage(clubId);
+        String describe= newCmClubDao.recordDescribe(clubId);
+       String linkage="";
+        if(domain.contains("-b")){
+            linkage="http://zzjtest.gz.aeert.com/clubinfo.html?clubId="+clubId;
+        }else if(domain.contains("www")){
+            linkage="https://www.caimei365.com/clubinfo.html?clubId="+clubId;
+        }else {
+            linkage="http://localhost:8081/clubinfo.html?clubId="+clubId;
+        }
+        model.addAttribute("link",link);
+        model.addAttribute("linkage",linkage);
+        model.addAttribute("describe",describe);
+        model.addAttribute("clubId", clubId);
+        return "modules/userNew/recordLinkageForm";
+    }
+
+    @RequestMapping("recordLinkageSave")
+    public String RecordLinkageSave(String describe,String link,Integer clubId,HttpServletRequest request, HttpServletResponse response, Model model,RedirectAttributes redirectAttributes) {
+        model.addAttribute("clubId", clubId);
+
+        if(domain.contains("-b")){
+            link="http://zzjtest.gz.aeert.com/clubinfo.html?clubId="+clubId;
+        }else if(domain.contains("www")){
+            link="https://www.caimei365.com/clubinfo.html?clubId="+clubId;
+        }else {
+            link="http://localhost:8081/clubinfo.html?clubId="+clubId;
+        }
+//        StringSelection stsel = new StringSelection(link);
+        newCmClubDao.addRecordLinkage(describe,link,clubId);
+        logger.info(">>>>>>>>>>>生成记录链接");
+        addMessage(redirectAttributes, "链接已生成并自动复制,可直接粘贴");
+//        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stsel, stsel);
+        return "redirect:" + Global.getAdminPath() + "/new/user/agency/";
+    }
+
+
+
+
     /**
      * 资料备注列表
      */
@@ -1177,7 +1251,7 @@ public class AgencyController extends BaseController {
     public List<ServiceProviderModel> group(Integer leaderId) {
         return newCmClubService.findGroup(leaderId);
     }
-
+    @RequiresPermissions("user:agency:cmrenaksList")
     @RequestMapping("cmrenaksList")
     public String renaks(CmRemaks cmRemaks,HttpServletRequest request, HttpServletResponse response, Model model) {
         Page<CmRemaks> page = cmRemaksService.findPage(new Page<CmRemaks>(request, response,20), cmRemaks);
@@ -1214,4 +1288,65 @@ public class AgencyController extends BaseController {
         return "redirect:" + Global.getAdminPath() + "/new/user/agency/cmrenaksList";
     }
 
+    @RequiresPermissions("user:agency:reportList")
+    @RequestMapping("ReportList")
+    public String ReportList(CmReport cmReport,HttpServletRequest request, HttpServletResponse response, Model model) {
+
+        Page<CmReport> page = newCmClubService.ReportList(new Page<CmReport>(request, response,20), cmReport);
+        model.addAttribute("page",page);
+        model.addAttribute("cmReport", cmReport);
+        return "modules/userNew/ReportList";
+    }
+    @ResponseBody
+    @RequestMapping("ReportCount")
+    public Map<String, Object> ReportCount(Integer reportId,String auditName,String auditText,Integer status,Model model) {
+        Map<String, Object> map = new HashedMap();
+       Integer clubCount= newCmClubDao.clubRemarksConut(reportId);
+        Integer visitorCount=newCmClubDao.visitorRemarksConut(reportId);
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        auditName=principal.getName();
+         if((clubCount+=visitorCount)>0){
+             map.put("success", false);
+             newCmClubDao.updateAuditRemarks(reportId,auditName,auditText,status);
+             System.out.println(">>>>>>>>"+(clubCount+=visitorCount));
+         }else {
+             System.out.println(">>>>>>>>"+(clubCount+=visitorCount));
+             map.put("success", true);
+         }
+        return map;
+    }
+
+    @ResponseBody
+    @RequestMapping("ClubRemarks")
+    public Map<String, Object> audit(Integer remarksId,Integer type,Model model) {
+        Map<String, Object> map = new HashedMap();
+        if(type==1){
+            newCmClubDao.updateClubRemarks(remarksId);
+            map.put("success", true);
+        }else {
+            newCmClubDao.updateVisitorRemarks(remarksId);
+            map.put("success", true);
+        }
+        return map;
+    }
+
+    @ResponseBody
+    @RequestMapping("DeleteRepor")
+    public Map<String, Object> DeleteRepor(Integer reportId,Model model) {
+        Map<String, Object> map = new HashedMap();
+        Integer clubCount= newCmClubDao.clubRemarksConut(reportId);
+        Integer visitorCount=newCmClubDao.visitorRemarksConut(reportId);
+        if((clubCount+=visitorCount)>0){
+            map.put("success", false);
+            System.out.println(">>>>>>>>"+(clubCount+=visitorCount));
+        }else {
+            newCmClubDao.deleteClubRemarks(reportId);
+            System.out.println(">>>>>>>>"+(clubCount+=visitorCount));
+            map.put("success", true);
+        }
+        return map;
+    }
+
+
+
 }

+ 4 - 0
src/main/java/com/caimei/modules/user/web/newUser/SpController.java

@@ -133,11 +133,15 @@ public class SpController extends BaseController {
                         newCmClubService.oldname(oldserviceProviderId,clubId,oldSpID,newspId);
                      }else {
                         newCmClubService.oldnames(clubId,oldSpID,newspId);
+                        newCmClubService.updateServiceProvider(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表

+ 2 - 0
src/main/java/com/caimei/modules/user/web/newUser/VisitRemarkController.java

@@ -10,6 +10,7 @@ import com.caimei.modules.user.service.VisitRemarkService;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -108,6 +109,7 @@ public class VisitRemarkController extends BaseController {
     /**
      * 资料备注列表
      */
+    @RequiresPermissions("user:agency:unregist")
     @RequestMapping("unregist")
     public String unregist(VisitRemarkVo visit, HttpServletRequest request, HttpServletResponse response, Model model) {
         if (org.apache.commons.lang.StringUtils.isNotBlank(visit.getStartAddTime())) {

+ 10 - 1
src/main/resources/mappings/modules/bulkpurchase/CmClubMapper.xml

@@ -206,7 +206,8 @@
 			cityID = #{cityID},
 			inviterName = #{inviterName},
 			inviterBindID = #{inviterBindID},
-			scanTime = #{scanTime}
+			scanTime = #{scanTime},
+		    newDeal=1
 		WHERE clubid = #{id}
 	</update>
 
@@ -221,4 +222,12 @@
 		ON b.cityID=c.cityID JOIN province d ON c.`provinceID` =d.`provinceID`
 		JOIN club a ON a.townID =b.townID WHERE  a.clubID=#{clubId}
 	</select>
+
+	<update id="updateServiceProvider">
+		UPDATE `cm_club_report`
+		SET serviceProviderId=#{newSpId}
+		WHERE clubId = #{clubId}
+		  AND serviceProviderId = #{oldSpId}
+	</update>
+
 </mapper>

+ 4 - 2
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -116,7 +116,9 @@
         co.sendOutStatus AS sendOutStatus,
         co.receiptStatus AS receiptStatus,
         co.productCount AS productCount,
-        (SELECT IFNULL(sum(cop.shouldPayFee),0) FROM cm_order_product cop WHERE cop.orderId=co.orderID) AS
+        (SELECT IFNULL(sum(cop.shouldPayFee),0)
+        FROM cm_order_product cop
+        WHERE cop.orderId=co.orderID) AS
         "shouldPayProduct",
         co.status AS status,
         co.splitFlag AS splitFlag,
@@ -261,7 +263,7 @@
                     AND co.rebateFlag = '1'
                 </if>
                 <if test="rebateOrder == 0">
-                    AND co.rebateFlag = '0'
+                    AND  co.rebateFlag = '0'
                 </if>
             </if>
             <if test="serviceProviderId != null and serviceProviderId != 0">

+ 156 - 19
src/main/resources/mappings/modules/user/NewCmClubMapper.xml

@@ -42,7 +42,8 @@
 		a.firstClubType AS "firstClubType",
 		a.secondClubType AS "secondClubType",
 		a.department AS "department",
-		a.medicalPracticeLicenseImg AS "medicalPracticeLicenseImg"
+		a.medicalPracticeLicenseImg AS "medicalPracticeLicenseImg",
+        a.newDeal as "newDeal"
     </sql>
 
     <sql id="otherColumns">
@@ -143,6 +144,9 @@
             <if test="userIdentity != null and userIdentity != '' and userIdentity == '8'.toString()">
                 AND csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime
             </if>
+            <if test="newDeal != null">
+                AND a.newDeal =#{newDeal}
+            </if>
             AND (u.userOrganizeID IN(0,1) or u.clubStatus != 92)
         </where>
         <choose>
@@ -399,11 +403,16 @@
     </select>
     <select id="findRemarksList" resultType="com.caimei.modules.user.entity.CmClubRemarks">
         select DISTINCT ccr.id                                                                        as remarksId,
-                        remarks,
+                        ccr.remarks,
                         s.linkMan                                                                     as spName,
                         ccr.addTime,
                         ccr.questionMan,
-                        ccr.consultType as consult,ccr.clubType,ccr.pinceSensitve,ccr.satisfied,ccr.followup,ccr.extra,
+                        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,16 +458,24 @@
     <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,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
+        csr.leaderId AS leaderId,IFNULL(ccr.consultType,'') AS consult, c.Name AS
+        clubName,ccr.clubType,ccr.pinceSensitve,ccr.satisfied,ccr.followup,ccr.extra,c.newDeal,
+        (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID= csr.leaderId) AS leaderName,
+        (SELECT mainImage FROM product p WHERE p.productID= ccre.productID) AS productMainImage,
+        (SELECT NAME FROM product p WHERE p.productID= ccre.productID) AS proName,
+        # (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID= ccr.serviceProviderID) AS oldName
+        ccre.reportText AS reportText,ccre.status AS reportStatus,ccre.auditName AS auditName,ccre.auditTime AS
+        auditTime,p.mainImage
+        AS mainImage,p.name AS productName,sh.name AS shopName
         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 serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
         LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
         LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
+        LEFT JOIN cm_club_report ccre ON  ccre.Id= ccr.reportID
+        LEFT JOIN product p ON p.productID = ccr.productID
+        LEFT JOIN shop sh ON sh.shopID = p.shopID
         <where>
             <if test="remarks != null and remarks !=''">
                 AND ccr.remarks LIKE concat('%',#{remarks},'%')
@@ -478,6 +495,12 @@
             <if test="endAddTime != null and endAddTime != ''">
                 and ccr.addTime <![CDATA[  <  ]]> #{endAddTime}
             </if>
+            <if test="newDeal !=null">
+                and c.newDeal=#{newDeal}
+            </if>
+            <if test="reportID !=null">
+                and ccr.reportID=#{reportID}
+            </if>
         </where>
         ORDER BY ADDTIME DESC
         <choose>
@@ -538,24 +561,138 @@
         WHERE clubId = #{clubID}
     </select>
 
-<!--    <insert id="oldname">-->
-<!--        INSERT INTO `cm_old_remarks`(serviceProviderId, `serviceProviderName`)-->
-<!--        VALUES (#{serviceProviderId}, #{serviceProviderName})-->
-<!--    </insert>-->
+    <!--    <insert id="oldname">-->
+    <!--        INSERT INTO `cm_old_remarks`(serviceProviderId, `serviceProviderName`)-->
+    <!--        VALUES (#{serviceProviderId}, #{serviceProviderName})-->
+    <!--    </insert>-->
 
     <update id="oldname">
-    UPDATE `cm_club_remarks`
-    SET oldserviceProviderId = #{oldserviceProviderId},
-        serviceProviderId=#{newSpID}
-    WHERE clubId = #{clubID}
-      AND serviceProviderId=#{oldSpID}
-</update>
+        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}
+          AND serviceProviderId = #{oldSpID}
     </update>
 
+    <select id="ReportList" resultType="com.caimei.modules.user.entity.CmReport">
+        SELECT ccr.Id as reportId, p.mainImage AS mainImage,p.`name` AS productName,c.`name` AS clubName,ccr.reportName AS reportName,
+        ccr.reportText AS reportText,ccr.addTime AS ADDTIME,ccr.status AS STATUS,ccr.auditName AS auditName,ccr.auditTime AS auditTime,c.newDeal,ccr.auditText
+        FROM cm_club_report ccr
+        LEFT JOIN product p ON p.productID = ccr.productID
+        LEFT JOIN club c ON c.clubID = ccr.clubID
+        <where>
+        <if test="reportId!=null and reportId!=''">
+            AND  ccr.id=#{reportId}
+        </if>
+            <if test="productName!=null and productName!=''">
+                AND p.name LIKE concat('%',#{productName},'%')
+            </if>
+            <if test="clubName!=null and clubName!=''">
+                AND c.name LIKE concat('%',#{clubName},'%')
+            </if>
+            <if test="newDeal!=null">
+                AND c.newDeal =#{newDeal}
+            </if>
+            <if test="startAddTime != null and startAddTime != ''">
+                and ccr.addTime <![CDATA[  >  ]]> #{startAddTime}
+            </if>
+            <if test="endAddTime != null and endAddTime != ''">
+                and ccr.addTime <![CDATA[  <  ]]> #{endAddTime}
+            </if>
+        </where>
+        ORDER BY ccr.`addTime` DESC
+    </select>
+
+    <select id="findRegistLists" 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,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,
+        (SELECT mainImage FROM product p WHERE p.productID= ccre.productID) AS productMainImage,
+        (SELECT NAME FROM product p WHERE p.productID= ccre.productID) AS proName,
+        ccre.reportText AS reportText,ccre.status AS reportStatus,ccre.auditName,ccre.auditTime AS auditTime,p.mainImage AS mainImage,p.name AS productName,sh.name AS shopName
+        FROM cm_visitor_remarks ccr
+        LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
+        LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
+        LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
+        LEFT JOIN cm_club_report ccre ON  ccre.Id= ccr.reportID
+        LEFT JOIN product p ON p.productID = ccr.productID
+        LEFT JOIN shop sh ON sh.shopID = p.shopID
+        LEFT JOIN club c ON c.clubID = ccr.clubID
+        <where>
+            <if test="remarks != null and remarks !=''">
+                AND ccr.remarks LIKE concat('%',#{remarks},'%')
+            </if>
+            <if test="leaderId != null">
+                and csr.leaderId = #{leaderId}
+            </if>
+            <if test="serviceProviderId != null">
+                and csg.serviceId = #{serviceProviderId}
+            </if>
+            <if test="startAddTime != '' and startAddTime != null">
+                and ccr.addTime <![CDATA[  >  ]]> #{startAddTime}
+            </if>
+            <if test="endAddTime != '' and endAddTime != null">
+                and ccr.addTime <![CDATA[  <  ]]> #{endAddTime}
+            </if>
+            <if test="reportID !=null">
+                and ccr.reportID=#{reportID}
+            </if>
+            <if test="newDeal !=null">
+                and c.newDeal=#{newDeal}
+            </if>
+            and ccr.remarks IS NOT NULL
+        </where>
+        ORDER BY ADDTIME DESC
+    </select>
+
+    <select id="visitorRemarksConut" resultType="integer">
+        SELECT COUNT(*) FROM cm_visitor_remarks WHERE reportID=#{reportID}
+    </select>
+
+    <select id="clubRemarksConut" resultType="integer">
+        SELECT COUNT(*) FROM cm_club_remarks WHERE reportID=#{reportID}
+    </select>
+
+<update id="updateAuditRemarks">
+    UPDATE cm_club_report SET status=#{status},auditName=#{auditName},auditText=#{auditText},auditTime=now() WHERE id=#{reportID}
+</update>
+
+    <update id="updateClubRemarks">
+        UPDATE cm_club_remarks SET reportID=null WHERE id=#{remarksId}
+    </update>
+
+    <update id="updateVisitorRemarks">
+        UPDATE cm_visitor_remarks SET reportID=null WHERE id=#{remarksId}
+    </update>
+
+    <delete id="deleteClubRemarks">
+        DELETE FROM cm_club_report WHERE id=#{reportID}
+    </delete>
+
+    <insert id="addRecordLinkage">
+        INSERT INTO `record_link`(`describe`,`link`,clubId)
+        VALUES (#{describe},#{link},#{clubId})
+    </insert>
+
+<select id="recordLinkage" resultType="string">
+    SELECT link from record_link where clubId=#{clubId}
+    ORDER BY id DESC
+    LIMIT 1
+</select>
+    <select id="recordDescribe" resultType="string">
+        SELECT `describe` from record_link where clubId=#{clubId}
+        ORDER BY id DESC
+        LIMIT 1
+    </select>
+
 </mapper>

+ 1 - 1
src/main/resources/mappings/modules/user/NewCmShopMapper.xml

@@ -499,7 +499,7 @@
 
     <select id="cmrectiptlist" resultType="com.caimei.modules.order.entity.CmDiscernReceipt">
         SELECT r.receiptID as receiptID,r.dateStrings  as expirationDate,
-               r.validityDate as validityDate,c.receStatct as receStatct
+               r.validityDate as validityDate
         FROM cm_receipt r
                  LEFT JOIN cm_discern_receipt c ON c.id = r.receiptID
                  LEFT JOIN shop s ON s.shopID = c.shopID

+ 8 - 2
src/main/resources/mappings/modules/user/VisitRemarkMapper.xml

@@ -75,14 +75,20 @@
     <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
+        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
+        (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID = csr.leaderId) AS leaderName,
+        (SELECT mainImage FROM product p WHERE p.productID= ccre.productID) AS productMainImage,
+        (SELECT NAME FROM product p WHERE p.productID= ccre.productID) AS proName,
+        ccre.reportText AS reportText,ccre.status AS reportStatus,ccre.auditName,ccre.auditTime AS auditTime,p.mainImage AS mainImage,p.name AS productName,sh.name AS shopName
         FROM cm_visitor_remarks ccr
         LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
         LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
         LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
+        LEFT JOIN cm_club_report ccre ON  ccre.Id= ccr.reportID
+        LEFT JOIN product p ON p.productID = ccr.productID
+        LEFT JOIN shop sh ON sh.shopID = p.shopID
         <where>
             <if test="remarks != null and remarks !=''">
                 AND ccr.remarks LIKE concat('%',#{remarks},'%')

+ 15 - 4
src/main/webapp/WEB-INF/views/modules/consult/type/cmConsulttypeList.jsp

@@ -61,10 +61,21 @@
 </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 class="active"><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
-    <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+    <shiro:hasPermission name="user:agency:regist">
+        <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:unregist">
+        <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:reportList">
+        <li><a href="${ctx}/new/user/agency/ReportList">报备列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmConsulttype">
+        <li class="active"><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmrenaksList">
+        <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+    </shiro:hasPermission>
 </ul>
 <form:form id="searchForm" modelAttribute="cmConsulttype" action="${ctx}/consult/type/cmConsulttype/" method="post"
            class="breadcrumb form-search">

+ 9 - 2
src/main/webapp/WEB-INF/views/modules/user/maintenanceList.jsp

@@ -187,7 +187,14 @@
 						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
 
 			&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+<<<<<<< HEAD
+			&nbsp;&nbsp;<input class="btn btn-primary" onclick="offocea(${CmDiscernReceipt.receiptID},${CmDiscernReceipt.shopID},'${CmDiscernReceipt.shopName}','${CmDiscernReceipt.linkMan}')" type="button" value="免除上架费"/>
+			</div>
+<%--		shopId, receStatct, receiptDate--%>
+		<strong>供应商:${CmDiscernReceipt.shopName}</strong>
+=======
 			&nbsp;&nbsp;<input class="btn btn-primary" onclick="offocea('${CmDiscernReceipt.receiptID}','${CmDiscernReceipt.shopID}','${CmDiscernReceipt.shopName}','${CmDiscernReceipt.linkMan}')" type="button" value="免除上架费"/>
+>>>>>>> origin/developer
 		</div>
 			<%--		shopId, receStatct, receiptDate--%>
 		<strong>供应商:${CmDiscernReceipt.shopName}</strong>
@@ -244,11 +251,11 @@
 </table>
 <div class="pagination">${discernReceipt}</div>
 <script>
-	function offocea(receiptID,shopID,shopName,linkMan) {
+	function offocea(shopID,shopName,linkMan) {
 		$.jBox.confirm("确定为该供应商免除上架费吗?","提示",function(v,h,f){
 
 			if(v === 1){
-				window.location.href="${ctx}/user/newCmShop/Removethelastfee?receiptID="+receiptID+"&shopID="+shopID+"&shopName="+shopName+"&linkMan="+linkMan;
+				window.location.href="${ctx}/user/newCmShop/Removethelastfee?shopID="+shopID+"&shopName="+shopName+"&linkMan="+linkMan;
 			}
 		} ,{ buttons: {  '确定': 1,'取消':2}});
 	}

+ 494 - 0
src/main/webapp/WEB-INF/views/modules/userNew/ReportList.jsp

@@ -0,0 +1,494 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>机构列表</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .reg-row .new-tag.active {
+            border: 1px solid #de5801
+        }
+
+        .reg-row {
+            margin-bottom: 20px
+        }
+
+        .reg-row .reg-label {
+            display: inline-block;
+            width: 120px;
+            text-align: right;
+            font-size: 13px
+        }
+
+        .the-oradio {
+            display: inline-block;
+            vertical-align: top
+        }
+
+        .the-oradio div {
+            width: 85px;
+            display: inline-block;
+            font-size: 12px;
+            color: #666
+        }
+
+        .the-oradio div input[type="radio"] {
+            width: 17px;
+            height: 17px;
+            margin-right: 5px;
+            vertical-align: text-top
+        }
+
+        .med-option {
+            display: block;
+            margin: 10px 0 0 125px
+        }
+
+        .reg-row .business-license {
+            position: relative;
+            display: inline-block;
+            width: 166px;
+            height: 123px;
+            border-radius: 6px;
+            margin: 18px 0 0 125px
+        }
+
+        #medicalPracticeLicenseImgPreview {
+            display: inline-block
+        }
+
+        .qualification {
+            margin-top: 20px
+        }
+
+        .reg-row .tags-area {
+            display: inline-block;
+            width: 420px
+        }
+
+        .reg-row .new-tag {
+            display: inline-block;
+            width: 70px;
+            border: 1px solid #e5e5e5;
+            border-radius: 6px;
+            padding: 5px;
+            margin-right: 14px;
+            margin-bottom: 14px;
+            text-align: center;
+            font-size: 10px;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            cursor: pointer
+        }
+
+        .reg-row .tags-operate {
+            margin-left: 125px
+        }
+
+        .reg-row .reg-input {
+            width: 336px;
+            height: 32px;
+            padding: 0 8px;
+            margin-right: 20px;
+            border: 1px solid #dcdcdc;
+            border-radius: 6px
+        }
+
+        .reg-row .tags-operate .tag-input {
+            width: 159px;
+            margin-right: 13px;
+            display: none;
+            vertical-align: top
+        }
+
+        .reg-row .tags-operate .tag-add {
+            line-height: 20px;
+            vertical-align: middle;
+            margin-bottom: 0;
+            vertical-align: top
+        }
+
+        .reg-row .tags-area {
+            vertical-align: top
+        }
+
+        .tag-add {
+            display: none
+        }
+
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+
+        .modal {
+            width: 700px;
+            margin-left: -350px
+        }
+
+        #myModal {
+            display: none
+        }
+
+        .modal-body {
+            max-height: 300px !important
+        }
+
+        .modal.fade.in {
+            top: 0 !important
+        }
+
+        #btnSubmit {
+            margin-left: 20px
+        }
+
+        .flex-wrap .item {
+            margin-right: 20px
+        }
+
+        #auditBox {
+            padding: 20px;
+            line-height: 30px
+        }
+
+        #auditBox .bd-row {
+            display: flex;
+            margin-bottom: 15px
+        }
+
+        #auditBox .bd-row > span {
+            display: inline-block;
+            width: 60px
+        }
+
+        #auditBox .auditCheckBox {
+            width: 250px
+        }
+
+        #auditBox .auditCheckBox label {
+            margin: 0 5px 5px 0
+        }
+
+        #auditBox .auditCheckBox input {
+            display: none
+        }
+
+        #auditBox .auditCheckBox input + span {
+            display: inline-block;
+            line-height: 24px;
+            padding: 0 12px;
+            border: 1px solid #666;
+            border-radius: 5px
+        }
+
+        #auditBox .auditCheckBox input:checked + span {
+            background-color: #E6633A
+        }
+
+        #alertModal {
+            width: 300px;
+            height: 200px;
+            border: 1px solid #ebebeb;
+            border-radius: 10px;
+            position: fixed;
+            top: 0;
+            bottom: 0;
+            left: 0;
+            right: 0;
+            margin: auto;
+            background: #FFFFFF;
+            display: none
+        }
+
+        #alertModal .title {
+            height: 50px;
+            line-height: 50px;
+            font-size: 14px;
+            font-weight: bold;
+            text-align: center;
+            position: relative;
+            border-bottom: 1px solid #EBEBEB
+        }
+
+        #alertModal .close {
+            width: 50px;
+            height: 50px;
+            display: block;
+            position: absolute;
+            right: 0;
+            top: 0;
+            line-height: 50px;
+            color: #000;
+            font-weight: bold;
+            text-align: center;
+            font-style: normal;
+            font-size: 18px
+        }
+
+        #alertModal .alert-content {
+            width: 260px;
+            height: 60px;
+            padding: 20px
+        }
+
+        #alertModal .alertModal-btn {
+            width: 260px;
+            height: 49px;
+            padding: 0 20px;
+            border-top: 1px solid #EBEBEB
+        }
+
+        #alertModal .alertModal-btn button {
+            float: right;
+            margin: 5px
+        }
+
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+<shiro:hasPermission name="user:agency:regist">
+    <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+</shiro:hasPermission>
+<shiro:hasPermission name="user:agency:unregist">
+    <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+</shiro:hasPermission>
+<shiro:hasPermission name="user:agency:reportList">
+    <li class="active"><a href="${ctx}/new/user/agency/ReportList">报备列表</a></li>
+</shiro:hasPermission>
+<shiro:hasPermission name="user:agency:cmConsulttype">
+    <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+</shiro:hasPermission>
+<shiro:hasPermission name="user:agency:cmrenaksList">
+    <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+</shiro:hasPermission>
+</ul>
+<form:form id="searchForm" modelAttribute="cmReport" action="${ctx}/new/user/agency/ReportList" 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="flex-wrap">
+        <div class="item">
+            <label>ID:</label>
+            <form:input path="reportId" htmlEscape="false" maxlength="50" class="input-medium"/>
+        </div>
+        <div class="item">
+            <label>商品名称:</label>
+            <form:input path="productName" htmlEscape="false" maxlength="50" class="input-medium"/>
+        </div>
+        <div class="item">
+            <label>机构名称:</label>
+            <form:input path="clubName" htmlEscape="false" maxlength="50" class="input-medium"/>
+        </div>
+
+        <div class="item">
+            <label>提交时间:</label>
+            <form:input path="startAddTime" type="text" maxlength="20" class="input-mini Wdate" value="${startTime}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            -
+            <form:input path="endAddTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        </div>
+        <div class="item">
+            <label>新分配机构:</label>
+            <form:select path="newDeal" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1">是</form:option>
+                <form:option value="2">否</form:option>
+            </form:select>
+        </div>
+        <div class="item">
+            <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        </div>
+    </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>
+        <th>报备人</th>
+        <th>报备事由</th>
+        <th>创建时间</th>
+        <th>审核状态</th>
+        <th>审核人</th>
+        <th>审核时间</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="list">
+        <tr>
+            <td>
+                    ${list.reportId}
+            </td>
+            <td>
+                <c:if test="${not empty list.mainImage}">
+                    <img src="${list.mainImage}"
+                         width="50"
+                         height="50">
+                </c:if>
+                <c:if test="${empty list.mainImage}">
+                    -----
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${not empty list.productName}">
+                    ${list.productName}
+                </c:if>
+                <c:if test="${empty list.productName}">
+                    -----
+                </c:if>
+            </td>
+
+            <td>
+                <c:if test="${not empty list.clubName}">
+                    ${list.clubName}<c:if test="${list.newDeal eq 1}"><span style="color: red">(新分配)</span></c:if>
+                </c:if>
+                <c:if test="${empty list.clubName}">
+                    -----
+                </c:if>
+
+            </td>
+            <td>
+                    ${list.reportName}
+            </td>
+            <td>
+                    ${list.reportText}
+            </td>
+            <td>
+                    ${list.addTime}
+            </td>
+            <td>
+                <c:if test="${empty list.auditText}">
+                <c:if test="${list.status eq 1}"><span style="color: red">待审核</span></c:if>
+                <c:if test="${list.status eq 2}"><span style="color: #00aa00">已审核 </span></c:if>
+                <c:if test="${list.status eq 3}">审核未通过</c:if>
+                </c:if>
+                <c:if test="${not empty list.auditText}">
+                    <c:if test="${list.status eq 1}"><a href="javascript:void(0)" onclick="audit('${list.auditText}')" style="color: red;text-decoration: underline;">待审核</a></c:if>
+                    <c:if test="${list.status eq 2}"><a href="javascript:void(0)" onclick="audit('${list.auditText}')" style="color: #00aa00;text-decoration: underline;">已审核</a></c:if>
+                    <c:if test="${list.status eq 3}"><a href="javascript:void(0)" onclick="audit('${list.auditText}')" style="text-decoration: underline; color: #0d0d0d">审核未通过</a></c:if>
+                </c:if>
+
+            </td>
+            <td>${list.auditName} </td>
+            <td>${list.auditTime}</td>
+            <td>
+                <c:if test="${list.status eq 1}"> <a href="javascript:void(0)" onclick="auditShop(${list.reportId})">审核</a></c:if>
+                <a href="${ctx}/new/user/agency/cmRegistReportList?reportID=${list.reportId}">查看</a>
+                <a href="javascript:void(0)" onclick="deleteReport(${list.reportId})">删除</a>
+            </td>
+        </tr>
+    </c:forEach>
+
+    </tbody>
+
+</table>
+<div class="pagination">${page}</div>
+
+<script type="text/javascript">
+    function page(n,s){
+        $("#pageNo").val(n);
+        $("#pageSize").val(s);
+        $("#searchForm").submit();
+        return false;
+    }
+
+    function auditShop(reportId) {
+        var htmls = "<div id='auditBox'>"
+            + "   <div class='bd-row'>"
+            + "  该报备未关联任何咨询记录,无需审核。"
+            + "   </div>";
+
+        var html = "<div id='auditBox'>"
+            + "   <div class='bd-row'>"
+            + "       <span><font color='red'>*</font>审核:</span>"
+            + "       <select name='auditStatus' id='auditStatus'>"
+            + "           <option value='2'>审核通过</option>"
+            + "           <option value='3'>审核未通过</option>"
+            + "       <select/>"
+            + "   </div>"
+            + "   <div id='auditNopass'>"
+            + "       <div class='bd-row'>"
+            + "           <span></span>"
+            + "           <div class='auditNote'>"
+            + "               <textarea name='auditNote' maxlength='200' placeholder='不超过200个字'></textarea>"
+            + "           </div>"
+            + "       </div>"
+            + "   </div>"
+            + "</div>";
+        $.jBox.confirm(html, "审核", function (v, h, f) {
+            if(v===1){
+            if (f.auditNote.length > 200) {
+                $.jBox.tip("内容过长", 'error', {focusId: "auditNote"});
+                return false;
+            }
+            console.log(reportId)
+            $.post("${ctx}/new/user/agency/ReportCount", {
+                'reportId': reportId,
+                'auditText': f.auditNote,
+                'status': f.auditStatus
+            }, function (data) {
+                console.log(data.success)
+                console.log(true == data.success)
+                if (true == data.success) {
+                    $.jBox.prompt("该报备未关联任何咨询记录,无需审核。", "提示") ;
+
+                }else {
+                    location.reload()
+                }
+            }, "JSON");//这里返回的类型有:json,html,xml,text
+            }
+        },{ buttons: {  '确定': 1,'取消':2}});
+            }
+
+    function audit(auditText){
+        console.log(111)
+        var html = "<div  id='auditBox'>"
+            + "   <div style='white-space:normal; word-break:break-all;overflow:hidden;' class='bd-row'>"
+            +   auditText
+            + "   </div>";
+
+        var d=auditText
+        $.jBox.prompt(html,"备注");
+    }
+
+function deleteReport(reportId){
+    $.jBox.confirm("确定删除该报备吗?", "提示", function (v, h, f) {
+        <%--window.location.href="${ctx}/new/user/agency/DeleteRepor?reportId="+reportId;--%>
+        if(v==1){
+        $.post("${ctx}/new/user/agency/DeleteRepor", {
+            'reportId': reportId
+        }, function (data) {
+            console.log(data.success)
+            console.log(true == data.success)
+            if (true == data.success) {
+                location.reload()
+            }
+            if(false == data.success) {
+                $.jBox.prompt("请将该报备关联的全部咨询记录取消关联后再删除","提示");
+            }
+        }, "JSON");//这里返回的类型有:json,html,xml,text
+             }
+    },{ buttons: {  '确定': 1,'取消':2}});
+}
+
+
+    // $(document).on("change", "#auditStatus", function () {
+    //     if ($("#auditStatus").val() == 2) {
+    //         $("#auditNopass").show();
+    //     } else {
+    //         $("#auditNopass").hide();
+    //     }
+    // });
+</script>
+</body>
+</html>

+ 9 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyList.jsp

@@ -99,6 +99,14 @@
             <form:input path="searchEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
                         onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
         </div>
+        <div class="item">
+            <label>新分配机构:</label>
+            <form:select path="newDeal" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1">是</form:option>
+                <form:option value="2">否</form:option>
+            </form:select>
+        </div>
         <div class="item">
             <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         </div>
@@ -265,6 +273,7 @@
                 <shiro:hasPermission name="club:cmAgency:remarks">
                     <a href="${ctx}/new/user/agency/remarks?clubId=${newCmClubList.clubID}">咨询记录</a>
                 </shiro:hasPermission>
+                <a href="${ctx}/new/user/agency/recordLinkage?clubId=${newCmClubList.clubID}">生成行为记录链接</a>
             </td>
         </tr>
     </c:forEach>

+ 103 - 36
src/main/webapp/WEB-INF/views/modules/userNew/cmRegistRemarksList.jsp

@@ -60,13 +60,33 @@
             return false;
         }
     </script>
+    <style>
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+    </style>
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <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>
+    <shiro:hasPermission name="user:agency:regist">
+        <li class="active"><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:unregist">
+        <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:reportList">
+        <li class=""><a href="${ctx}/new/user/agency/ReportList">报备列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmConsulttype">
+        <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmrenaksList">
+        <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+    </shiro:hasPermission>
 </ul>
 <br/>
 <form:form id="searchForm" modelAttribute="cmClubRemarks" action="${ctx}/new/user/agency/regist" method="post"
@@ -76,7 +96,7 @@
     <div class="flex-wrap">
         <div>
             <label>关键词:</label>
-            <form:input path="remarks"  htmlEscape="false" class="input-medium" maxlength="10"/>
+            <form:input path="remarks" htmlEscape="false" class="input-medium" maxlength="10"/>
         </div>
         <div class="item">
             <label>咨询类别:</label>
@@ -116,6 +136,14 @@
                         value="${cmClubRemarks.endAddTime}" cssStyle="width: 130px"
                         onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
         </div>
+        <div class="item">
+            <label>新分配机构:</label>
+            <form:select path="newDeal" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1">是</form:option>
+                <form:option value="2">否</form:option>
+            </form:select>
+        </div>
         <div class="item">
             &nbsp;&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         </div>
@@ -128,12 +156,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>--%>
+                            <%--                        <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>
@@ -147,25 +175,64 @@
                         <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
                             机构名称:
                         </div>
-                        <div style="width: 150px;float: left;margin: 10px 0;">${clubRemarks.clubName}</div>
+                        <div style="width: 150px;float: left;margin: 10px 0;">${clubRemarks.clubName}<c:if test="${clubRemarks.newDeal eq 1}"><span style="color: red">(新分配)</span></c:if></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: 150px;float: left;margin: 10px 0;position: relative;">${clubRemarks.clubType}</div>
+                            <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                                机构类型:
+                            </div>
+                            <div style=" width: 150px;float: left;margin: 10px 0;position: relative;">${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 style="width: 80px;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.consultType}</div>
+                        <c:if test="${not empty clubRemarks.productName}">
+                            <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;"><img src="${clubRemarks.mainImage}"
+                                width="50"
+                                height="50"> ${clubRemarks.productName}
+                            </div>
+                            <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                                供应商名称:${clubRemarks.shopName}
+
+                            </div>
+<%--                            <span style="width: 300px;float: left;margin: 10px 0;">${clubRemarks.shopName}</span>--%>
+                        </c:if>
                     </div>
+                    <c:if test="${not empty clubRemarks.proName}">
+                    <table id="contentTable" class="table table-striped table-bordered table-condensed">
+                    <thead>
+                    <tr>
+                        <th>商品图片</th>
+                        <th>商品名称</th>
+                        <th>报备事由</th>
+                        <th>审核状态</th>
+                        <th>审核人</th>
+                        <th>审核时间</th>
+                    </tr>
+                    <td><img src="${clubRemarks.productMainImage}"
+                             width="50"
+                             height="50"></td>
+                    <td>${clubRemarks.proName}</td>
+                    <td>${clubRemarks.reportText}</td>
+                    <td><c:if test="${clubRemarks.reportStatus eq 1}">待审核</c:if>
+                        <c:if test="${clubRemarks.reportStatus eq 2}">已审核</c:if>
+                        <c:if test="${clubRemarks.reportStatus eq 3}">审核未通过</c:if>
+                    </td>
+                    <td>${clubRemarks.auditName}</td>
+                    <td>${clubRemarks.auditTime}</td>
+                    </thead>
+                    </table>
+                    </c:if>
                     <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>
+                            <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: 150px;float: left;margin: 10px 0;">敏感</div>
                             </c:if>
@@ -181,9 +248,9 @@
 
                         </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>
+                            <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: 150px;float: left;margin: 10px 0;">意向强烈</div>
                             </c:if>
@@ -199,9 +266,9 @@
 
                         </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>
+                            <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: 150px;float: left;margin: 10px 0;">跟进中</div>
                             </c:if>
@@ -223,14 +290,14 @@
                         </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 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>
-                    </div>
                     </c:if>
                     <div class="td-text" style="width: 100%;float: left;">
                         <c:if test="${not empty clubRemarks.imageList}">
@@ -268,9 +335,9 @@
         </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>
+<%--    <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>

+ 553 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmRegistReportList.jsp

@@ -0,0 +1,553 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>详情</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            //$("#name").focus();cmOrderRemarksFormNew.jsp
+            $("#inputForm").validate({
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+
+        function getmember() {
+            var leaderId = $("#leaderId").val();
+            if (leaderId > 0) {
+                $.get("${ctx}/new/user/agency/group", {'leaderId': leaderId}, function (data) {
+                    console.log(data);
+                    var opts = "<option value='" + data[0].serviceProviderID + "'>" + data[0].name + "</option>";
+                    if (data.length > 1) {
+                        for (let i = 1; i < data.length; i++) {
+                            opts += "<option value='" + data[i].serviceProviderID + "' >" + data[i].name + "</option>";
+                        }
+                    }
+                    $("#findgroup").html('').append(opts);
+                });
+            } else {
+                $("#findgroup").html('');
+            }
+        }
+
+        function previewFile(url) {
+            var index = url.lastIndexOf(".");
+            var suffix = url.substring(index);
+            if (suffix.startsWith(".png") || suffix.startsWith(".jpg") || suffix.startsWith(".pdf")) {
+                window.open(url, '_blank');
+            } else {
+                var previewUrl = "https://view.officeapps.live.com/op/view.aspx?src=" + encodeURIComponent(url);
+                window.open(previewUrl, '_blank');
+            }
+        }
+
+        function audit(remarksId){
+            $.jBox.confirm("确定取消该咨询记录与此报备的关联吗?","提示",function(v,h,f){
+
+                if(v === 1){
+                    <%--window.location.href="${ctx}/new/user/agency/ClubRemarks?remarksId="+remarksId+"&type=1";--%>
+                    $.post("${ctx}/new/user/agency/ClubRemarks", {
+                        'remarksId': remarksId,
+                        'type': 1
+                    }, function (data) {
+                        console.log(data.success)
+                        console.log(true == data.success)
+                        if (true == data.success) {
+                            location.reload()
+                        }
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+            } ,{ buttons: {  '确定': 1,'取消':2}})
+        }
+
+        function audits(remarksId){
+            $.jBox.confirm("确定取消该咨询记录与此报备的关联吗?","提示",function(v,h,f){
+
+                if(v === 1){
+                    $.post("${ctx}/new/user/agency/ClubRemarks", {
+                        'remarksId': remarksId,
+                        'type': 2
+                    }, function (data) {
+                        console.log(data.success)
+                        console.log(true == data.success)
+                        if (true == data.success) {
+                            location.reload()
+                        }
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+            } ,{ buttons: {  '确定': 1,'取消':2}});
+        }
+
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+    </script>
+    <style>
+        .table th {
+            text-align: center
+        }
+
+        .table td {
+            text-align: center
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+
+    <li><a href="${ctx}/new/user/agency/ReportList">报备列表</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/cmRegistReportList?reportID=${cmClubRemarks.reportID}">详情</a></li>
+
+</ul>
+<br/>
+<form:form id="searchForm" modelAttribute="cmClubRemarks" action="${ctx}/new/user/agency/cmRegistReportList?reportID=${cmClubRemarks.reportID}" 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="flex-wrap">
+        <div>
+            <label>关键词:</label>
+            <form:input path="remarks" htmlEscape="false" class="input-medium" maxlength="10"/>
+        </div>
+        <div class="item">
+            <label>咨询类别:</label>
+            <form:select path="consult" class="input-medium">
+                <form:option value="" label="全部"/>
+                <c:forEach items="${cmClubRemarks.consults}" var="consults">
+                    <form:option value="${consults.id}">${consults.className}</form:option>
+                </c:forEach>
+            </form:select>
+        </div>
+        <div class="item">
+            <label>机构名称:</label>
+            <form:input path="clubName" class="input-medium" maxlength="50"/>
+        </div>
+        <div class="item">
+            <label>小组:</label>
+            <form:select path="leaderId" class="input-medium" onchange="getmember()">
+                <form:option value="" label="全部"/>
+                <c:forEach items="${cmClubRemarks.teams}" var="team">
+                    <form:option value="${team.leaderId}">${team.leaderName}</form:option>
+                </c:forEach>
+            </form:select>
+        </div>
+        <div class="item">
+            <label>组员:</label>
+            <form:select path="serviceProviderId" class="input-medium" id="findgroup">
+                <form:option value="" label="全部"/>
+            </form:select>
+        </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"
+                        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"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        </div>
+        <div class="item">
+            <label>新分配机构:</label>
+            <form:select path="newDeal" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1">是</form:option>
+                <form:option value="2">否</form:option>
+            </form:select>
+        </div>
+        <div class="item">
+            &nbsp;&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        </div>
+    </div>
+    <sys:message content="${message}"/>
+    <c:if test="${not empty remarksList}">
+        <div style="overflow-x: hidden;word-break:break-all">
+            <c:forEach items="${remarksList}" 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>
+                        <span style="float: left;margin-left:120px;">管理员:${clubRemarks.leaderName}</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>
+                        <div style="width: 150px;float: left;margin: 10px 0;">${clubRemarks.questionMan}</div>
+                        <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            机构名称:
+                        </div>
+                        <div style="width: 150px;float: left;margin: 10px 0;">${clubRemarks.clubName}<c:if test="${clubRemarks.newDeal eq 1}"><span style="color: red">(新分配)</span></c:if></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: 150px;float: left;margin: 10px 0;position: relative;">${clubRemarks.clubType}</div>
+                        </c:if>
+                    </div>
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <div style="width: 80px;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.consultType}</div>
+                        <c:if test="${not empty clubRemarks.productName}">
+                            <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;"><img src="${clubRemarks.mainImage}"
+                                width="50"
+                                height="50"> ${clubRemarks.productName}
+                            </div>
+                            <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.shopName}</div>
+                        </c:if>
+                    </div>
+                    <c:if test="${not empty clubRemarks.proName}">
+                    <table id="contentTable" class="table table-striped table-bordered table-condensed">
+                    <thead>
+                    <tr>
+                        <th>商品图片</th>
+                        <th>商品名称</th>
+                        <th>报备事由</th>
+                        <th>审核状态</th>
+                        <th>审核人</th>
+                        <th>审核时间</th>
+                        <th>操作</th>
+                    </tr>
+                    <td><img src="${clubRemarks.productMainImage}"
+                             width="50"
+                             height="50"></td>
+                    <td>${clubRemarks.proName}</td>
+                    <td>${clubRemarks.reportText}</td>
+                    <td><c:if test="${clubRemarks.reportStatus eq 1}">待审核</c:if>
+                        <c:if test="${clubRemarks.reportStatus eq 2}">已审核</c:if>
+                        <c:if test="${clubRemarks.reportStatus eq 3}">审核未通过</c:if>
+                    </td>
+                    <td>${clubRemarks.auditName}</td>
+                    <td>${clubRemarks.auditTime}</td>
+                    <td><a href="javascript:void(0)" onclick="audit(${clubRemarks.remarksId})">取消关联</a></td>
+                    </thead>
+                    </table>
+                    </c:if>
+                    <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: 150px;float: left;margin: 10px 0;">敏感</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.pinceSensitve eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">适中</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.pinceSensitve eq 3}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">不敏感</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.pinceSensitve eq 4}">
+                                <div style="width: 150px;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: 150px;float: left;margin: 10px 0;">意向强烈</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.satisfied eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">意向一般</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.satisfied eq 3}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">意向平淡</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.satisfied eq 4}">
+                                <div style="width: 150px;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: 150px;float: left;margin: 10px 0;">跟进中</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.followup eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">跟进完成</div>
+                            </c:if>
+                            <c:if test="${clubRemarks.followup eq 3}">
+                                <div style="width: 150px;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>
+                            <div style="width: 1000px;float: left;">
+                                <c:forEach items="${clubRemarks.imageList}" var="imageUrl" varStatus="remarkImage">
+                                    <a href="${imageUrl}" target="_blank">
+                                        <img class="enlarge-pic" style="height: 150px;width: 150px;margin-top: 10px"
+                                             src="${imageUrl}">&nbsp;
+                                    </a>
+                                </c:forEach>
+                            </div>
+                        </c:if>
+                    </div>
+                    <div class="td-text"
+                         style="width: 100%;float: left;margin-top: 20px;border-bottom:1px dashed #999999;padding: 10px 0;">
+                        <c:if test="${not empty clubRemarks.fileList}">
+                            <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                                文件:
+                            </div>
+                            <div style="width: 1000px;float: left;margin: 10px 0;">
+                                <c:forEach items="${clubRemarks.fileList}" var="item" varStatus="remarkFile">
+                                    <p>${item.fileName}&nbsp;&nbsp;&nbsp;&nbsp;
+                                        <a onclick="previewFile('${item.fileUrl}')" target="_blank">预览</a>&nbsp;&nbsp;&nbsp;&nbsp;
+                                        <a href="${ctx}/new/user/agency/remarks/download?fileName=${item.fileName}&ossName=${item.ossName}">下载</a>
+                                    </p>
+                                </c:forEach>
+                            </div>
+                        </c:if>
+                    </div>
+                </div>
+            </c:forEach>
+        </div>
+        <div class="pagination">${page}</div>
+    </c:if>
+
+<%--  未注册机构信息  --%>
+    <c:if test="${not empty remarksLists}">
+        <div style="overflow-x: hidden;word-break:break-all">
+            <c:forEach items="${remarksLists}" 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>
+                    </div>
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <div style="width: 80px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            咨询人:
+                        </div>
+                        <div style="width: 150px;float: left;margin: 10px 0;">${visitRemarks.questionMan}</div>
+                        <c:if test="${not empty visitRemarks.clubType}">
+                            <div style="width: 350px;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: 80px;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.consultType}</div>
+                        <c:if test="${not empty visitRemarks.productName}">
+                            <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;"><img src="${visitRemarks.mainImage}"
+                                                                                       width="50"
+                                                                                       height="50"> ${visitRemarks.productName}
+                            </div>
+                            <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.shopName}</div>
+                        </c:if>
+                    </div>
+                    <c:if test="${not empty visitRemarks.proName}">
+                        <table id="contentTable" class="table table-striped table-bordered table-condensed">
+                            <thead>
+                            <tr>
+                                <th>商品图片</th>
+                                <th>商品名称</th>
+                                <th>报备事由</th>
+                                <th>审核状态</th>
+                                <th>审核人</th>
+                                <th>审核时间</th>
+                                <th>操作</th>
+                            </tr>
+                            <td><img src="${visitRemarks.productMainImage}"
+                                     width="50"
+                                     height="50"></td>
+                            <td>${visitRemarks.proName}</td>
+                            <td>${visitRemarks.reportText}</td>
+                            <td><c:if test="${visitRemarks.reportStatus eq 1}">待审核</c:if>
+                                <c:if test="${visitRemarks.reportStatus eq 2}">已审核</c:if>
+                                <c:if test="${visitRemarks.reportStatus eq 3}">审核未通过</c:if>
+                            </td>
+                            <td>${visitRemarks.auditName}</td>
+                            <td>${visitRemarks.auditTime}</td>
+                            <td><a href="javascript:void(0)" onclick="audits(${visitRemarks.remarksId})">取消关联</a></td>
+                            </thead>
+                        </table>
+                    </c:if>
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <c:if test="${not empty visitRemarks.pinceSensitve}">
+                            <div style="width: 80px;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: 150px;float: left;margin: 10px 0;">敏感</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.pinceSensitve eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">适中</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.pinceSensitve eq 3}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">不敏感</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.pinceSensitve eq 4}">
+                                <div style="width: 150px;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: 150px;float: left;margin: 10px 0;">意向强烈</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.satisfied eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">意向一般</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.satisfied eq 3}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">意向平淡</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.satisfied eq 4}">
+                                <div style="width: 150px;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: 150px;float: left;margin: 10px 0;">跟进中</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.followup eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">跟进完成</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.followup eq 3}">
+                                <div style="width: 150px;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: 80px;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: 80px;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>
+                            <div style="width: 1000px;float: left;">
+                                <c:forEach items="${visitRemarks.imageList}" var="imageUrl" varStatus="remarkImage">
+                                    <a href="${imageUrl}" target="_blank">
+                                        <img class="enlarge-pic" style="height: 150px;width: 150px;margin-top: 10px"
+                                             src="${imageUrl}">&nbsp;
+                                    </a>
+                                </c:forEach>
+                            </div>
+                        </c:if>
+                    </div>
+                    <div class="td-text"
+                         style="width: 100%;float: left;margin-top: 20px;border-bottom:1px dashed #999999;padding: 10px 0;">
+                        <c:if test="${not empty visitRemarks.fileList}">
+                            <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                                文件:
+                            </div>
+                            <div style="width: 1000px;float: left;margin: 10px 0;">
+                                <c:forEach items="${visitRemarks.fileList}" var="item" varStatus="remarkFile">
+                                    <p>${item.fileName}&nbsp;&nbsp;&nbsp;&nbsp;
+                                        <a onclick="previewFile('${item.fileUrl}')" target="_blank">预览</a>&nbsp;&nbsp;&nbsp;&nbsp;
+                                        <a href="${ctx}/new/user/agency/remarks/download?fileName=${item.fileName}&ossName=${item.ossName}">下载</a>
+                                    </p>
+                                </c:forEach>
+                            </div>
+                        </c:if>
+                    </div>
+                </div>
+            </c:forEach>
+        </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>

+ 15 - 4
src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksList.jsp

@@ -29,10 +29,21 @@
 </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>
+    <shiro:hasPermission name="user:agency:regist">
+        <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:unregist">
+        <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:reportList">
+        <li><a href="${ctx}/new/user/agency/ReportList">报备列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmConsulttype">
+        <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmrenaksList">
+        <li class="active"><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+    </shiro:hasPermission>
 </ul>
 <form:form id="searchForm" modelAttribute="cmRemaks" action="${ctx}/new/user/agency/cmrenaksList" method="post"
            class="breadcrumb form-search">

+ 245 - 178
src/main/webapp/WEB-INF/views/modules/userNew/cmUnRegistRemarksList.jsp

@@ -1,57 +1,70 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
 <html>
 <head>
-	<title>未注册用户咨询记录</title>
-	<meta name="decorator" content="default"/>
-	<script type="text/javascript">
-		$(document).ready(function() {
-			//$("#name").focus();cmOrderRemarksFormNew.jsp
-			$("#inputForm").validate({
-				submitHandler: function(form){
-					loading('正在提交,请稍等...');
-					form.submit();
-				},
-				errorContainer: "#messageBox",
-				errorPlacement: function(error, element) {
-					$("#messageBox").text("输入有误,请先更正。");
-					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-						error.appendTo(element.parent().parent());
-					} else {
-						error.insertAfter(element);
-					}
-				}
-			});
-		});
+    <title>未注册用户咨询记录</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            //$("#name").focus();cmOrderRemarksFormNew.jsp
+            $("#inputForm").validate({
+                submitHandler: function (form) {
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function (error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
 
-		function previewFile(url) {
-			var index = url.lastIndexOf(".");
-			var suffix = url.substring(index);
-			if (suffix.startsWith(".png") || suffix.startsWith(".jpg") || suffix.startsWith(".pdf")) {
-				window.open(url, '_blank');
-			} else {
-				var previewUrl = "https://view.officeapps.live.com/op/view.aspx?src="+encodeURIComponent(url);
-				window.open(previewUrl, '_blank');
-			}
-		}
+        function previewFile(url) {
+            var index = url.lastIndexOf(".");
+            var suffix = url.substring(index);
+            if (suffix.startsWith(".png") || suffix.startsWith(".jpg") || suffix.startsWith(".pdf")) {
+                window.open(url, '_blank');
+            } else {
+                var previewUrl = "https://view.officeapps.live.com/op/view.aspx?src=" + encodeURIComponent(url);
+                window.open(previewUrl, '_blank');
+            }
+        }
 
-		function page(n,s){
-			$("#pageNo").val(n);
-			$("#pageSize").val(s);
-			$("#searchForm").submit();
-		}
-	</script>
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+        }
+    </script>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-		<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}"/>
-	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+<ul class="nav nav-tabs">
+    <shiro:hasPermission name="user:agency:regist">
+        <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:unregist">
+        <li class="active"><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:reportList">
+        <li><a href="${ctx}/new/user/agency/ReportList">报备列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmConsulttype">
+        <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="user:agency:cmrenaksList">
+        <li><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+    </shiro:hasPermission>
+</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}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="flex-wrap">
         <div>
             <label>关键词:</label>
@@ -83,146 +96,200 @@
         </div>
         <div class="item">
             <label class="control-label">添加日期:</label>
-			<form:input path="startAddTime" type="text" maxlength="20" class="input-mini Wdate" value="${visit.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="${visit.endAddTime}" cssStyle="width: 130px"
-						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            <form:input path="startAddTime" type="text" maxlength="20" class="input-mini Wdate"
+                        value="${visit.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="${visit.endAddTime}" cssStyle="width: 130px"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
         </div>
         <div class="item">
-			&nbsp;&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+            &nbsp;&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         </div>
     </div>
 </form:form>
 <form:form id="inputForm" modelAttribute="visit" action="${ctx}" method="post" class="form-horizontal">
-	<sys:message content="${message}"/>
-	<c:if test="${not empty page.list}">
-	<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;">
-<%--					<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>
-                </div>
-				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
-					<div style="width: 80px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">咨询人:</div>
-					<div style="width: 150px;float: left;margin: 10px 0;">${visitRemarks.questionMan}</div>
-					<c:if test="${not empty visitRemarks.clubType}">
-						<div style="width: 350px;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: 80px;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: 80px;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: 150px;float: left;margin: 10px 0;">敏感</div>
-						</c:if>
-						<c:if test="${visitRemarks.pinceSensitve eq 2}">
-							<div style="width: 150px;float: left;margin: 10px 0;">适中</div>
-						</c:if>
-						<c:if test="${visitRemarks.pinceSensitve eq 3}">
-							<div style="width: 150px;float: left;margin: 10px 0;">不敏感</div>
-						</c:if>
-						<c:if test="${visitRemarks.pinceSensitve eq 4}">
-							<div style="width: 150px;float: left;margin: 10px 0;">不明确</div>
-						</c:if>
+    <sys:message content="${message}"/>
+    <c:if test="${not empty page.list}">
+        <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;">
+                            <%--					<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>
+                    </div>
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <div style="width: 80px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                            咨询人:
+                        </div>
+                        <div style="width: 150px;float: left;margin: 10px 0;">${visitRemarks.questionMan}</div>
+                        <c:if test="${not empty visitRemarks.clubType}">
+                            <div style="width: 350px;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: 80px;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.consultType}</div>
+                        <c:if test="${not empty visitRemarks.productName}">
+                            <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;"><img src="${visitRemarks.mainImage}"
+                               width="50"
+                               height="50"> ${visitRemarks.productName}
+                            </div>
+                            <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.shopName}</div>
+                        </c:if>
+                    </div>
+                    <c:if test="${not empty visitRemarks.proName}">
+                        <table id="contentTable" class="table table-striped table-bordered table-condensed">
+                            <thead>
+                            <tr>
+                                <th>商品图片</th>
+                                <th>商品名称</th>
+                                <th>报备事由</th>
+                                <th>审核状态</th>
+                                <th>审核人</th>
+                                <th>审核时间</th>
+                            </tr>
+                            <td><img src="${visitRemarks.productMainImage}"
+                                     width="50"
+                                     height="50"></td>
+                            <td>${visitRemarks.proName}</td>
+                            <td>${visitRemarks.reportText}</td>
+                            <td><c:if test="${visitRemarks.reportStatus eq 1}">待审核</c:if>
+                                <c:if test="${visitRemarks.reportStatus eq 2}">已审核</c:if>
+                                <c:if test="${visitRemarks.reportStatus eq 3}">审核未通过</c:if>
+                            </td>
+                            <td>${visitRemarks.auditName}</td>
+                            <td>${visitRemarks.auditTime}</td>
+                            </thead>
+                        </table>
+                    </c:if>
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <c:if test="${not empty visitRemarks.pinceSensitve}">
+                            <div style="width: 80px;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: 150px;float: left;margin: 10px 0;">敏感</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.pinceSensitve eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">适中</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.pinceSensitve eq 3}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">不敏感</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.pinceSensitve eq 4}">
+                                <div style="width: 150px;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: 150px;float: left;margin: 10px 0;">意向强烈</div>
-						</c:if>
-						<c:if test="${visitRemarks.satisfied eq 2}">
-							<div style="width: 150px;float: left;margin: 10px 0;">意向一般</div>
-						</c:if>
-						<c:if test="${visitRemarks.satisfied eq 3}">
-							<div style="width: 150px;float: left;margin: 10px 0;">意向平淡</div>
-						</c:if>
-						<c:if test="${visitRemarks.satisfied eq 4}">
-							<div style="width: 150px;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: 150px;float: left;margin: 10px 0;">意向强烈</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.satisfied eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">意向一般</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.satisfied eq 3}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">意向平淡</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.satisfied eq 4}">
+                                <div style="width: 150px;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: 150px;float: left;margin: 10px 0;">跟进中</div>
-						</c:if>
-						<c:if test="${visitRemarks.followup eq 2}">
-							<div style="width: 150px;float: left;margin: 10px 0;">跟进完成</div>
-						</c:if>
-						<c:if test="${visitRemarks.followup eq 3}">
-							<div style="width: 150px;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: 150px;float: left;margin: 10px 0;">跟进中</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.followup eq 2}">
+                                <div style="width: 150px;float: left;margin: 10px 0;">跟进完成</div>
+                            </c:if>
+                            <c:if test="${visitRemarks.followup eq 3}">
+                                <div style="width: 150px;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: 80px;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: 80px;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>
-						<div style="width: 1000px;float: left;">
-							<c:forEach items="${visitRemarks.imageList}" var="imageUrl" varStatus="remarkImage">
-								<a href="${imageUrl}" target="_blank">
-									<img class="enlarge-pic" style="height: 150px;width: 150px;margin-top: 10px" src="${imageUrl}">&nbsp;
-								</a>
-							</c:forEach>
-						</div>
-					</c:if>
-				</div>
-				<div class="td-text" style="width: 100%;float: left;margin-top: 20px;border-bottom:1px dashed #999999;padding: 10px 0;">
-					<c:if test="${not empty visitRemarks.fileList}">
-						<div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">文件:</div>
-						<div style="width: 1000px;float: left;margin: 10px 0;">
-							<c:forEach items="${visitRemarks.fileList}" var="item" varStatus="remarkFile">
-								<p>${item.fileName}&nbsp;&nbsp;&nbsp;&nbsp;
-									<a onclick="previewFile('${item.fileUrl}')" target="_blank">预览</a>&nbsp;&nbsp;&nbsp;&nbsp;
-									<a href="${ctx}/new/user/agency/remarks/download?fileName=${item.fileName}&ossName=${item.ossName}">下载</a></p>
-							</c:forEach>
-						</div>
-					</c:if>
-				</div>
-			</div>
-		</c:forEach>
-	</div>
-	<div class="pagination">${page}</div>
-	</c:if>
+                        </c:if>
+                    </div>
+                    <div class="td-text" style="width: 100%;float: left;margin-top: 20px;">
+                        <div style="width: 80px;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: 80px;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>
+                            <div style="width: 1000px;float: left;">
+                                <c:forEach items="${visitRemarks.imageList}" var="imageUrl" varStatus="remarkImage">
+                                    <a href="${imageUrl}" target="_blank">
+                                        <img class="enlarge-pic" style="height: 150px;width: 150px;margin-top: 10px"
+                                             src="${imageUrl}">&nbsp;
+                                    </a>
+                                </c:forEach>
+                            </div>
+                        </c:if>
+                    </div>
+                    <div class="td-text"
+                         style="width: 100%;float: left;margin-top: 20px;border-bottom:1px dashed #999999;padding: 10px 0;">
+                        <c:if test="${not empty visitRemarks.fileList}">
+                            <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
+                                文件:
+                            </div>
+                            <div style="width: 1000px;float: left;margin: 10px 0;">
+                                <c:forEach items="${visitRemarks.fileList}" var="item" varStatus="remarkFile">
+                                    <p>${item.fileName}&nbsp;&nbsp;&nbsp;&nbsp;
+                                        <a onclick="previewFile('${item.fileUrl}')" target="_blank">预览</a>&nbsp;&nbsp;&nbsp;&nbsp;
+                                        <a href="${ctx}/new/user/agency/remarks/download?fileName=${item.fileName}&ossName=${item.ossName}">下载</a>
+                                    </p>
+                                </c:forEach>
+                            </div>
+                        </c:if>
+                    </div>
+                </div>
+            </c:forEach>
+        </div>
+        <div class="pagination">${page}</div>
+    </c:if>
 </form:form>
 </body>
 </html>

+ 165 - 0
src/main/webapp/WEB-INF/views/modules/userNew/recordLinkageForm.jsp

@@ -0,0 +1,165 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>订单备注</title>
+	<meta name="decorator" content="default"/>
+	<style>
+        .form-horizontal .controls {
+            margin-left: 0;
+        }
+
+        .dateInput input {
+            width: 150px;
+        }
+
+        .clause span {
+            margin-left: 30px;
+        }
+
+        #productTable th {
+            text-align: center;
+            white-space: nowrap;
+        }
+
+        #productTable td {
+            text-align: center;
+            white-space: nowrap;
+        }
+        .controls{
+            font-size: 0;
+        }
+        .controls .conList{
+            display: inline-block;
+            margin-right: 15px;
+        }
+        .conList .btn:nth-of-type(1){
+            margin-left: 25px;
+        }
+        .upload-content {
+            margin-top: -70px;
+            display: inline-block;
+        }
+        .upload-content .conList .btn:nth-of-type(1) {
+            width: 90px;
+            height: 100px;
+            border: 2px solid #eee;
+            background: #fff;
+            position: relative;
+        }
+        .upload-content .conList .btn:nth-of-type(1)>div {
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #666;
+        }
+        .upload-content .conList .btn:nth-of-type(1) span {
+            font-size: 35px;
+        }
+        .upload-content .conList .btn:nth-of-type(1) h5 {
+            color: #666;
+        }
+        .cancel-upload {
+            background: transparent;
+            border: none;
+            box-shadow: none;
+            position: relative;
+            top: -38px;
+            left: -25px;
+            cursor: pointer;
+            z-index: 100;
+        }
+         .upload-content .conList ol li {
+            width: 114px;
+            min-height: 80px;
+            text-align: center;
+            background: #fff;
+            position: relative;
+            top: 120px;
+            margin-left: 2px;
+        }
+        .hide-pic {
+            display: none !important;
+        }
+        #file-list-display p .del {
+            color: #2fa4e7;
+            font-size: 12px;
+            cursor: pointer;
+            margin-left: 20px;
+        }
+    </style>
+	<script type="text/javascript">
+		// $(document).ready(function() {
+		// 	$("#inputForm").validate({
+		// 		submitHandler: function(form){
+        //             var remarks = $("#describe").val();
+        //             if(remarks != undefined && remarks.trim() != ""){
+		//
+        //                 loading('正在提交,请稍等...');
+        //                 form.submit();
+        //             }else {
+        //                 alertx("请填写备注!");
+        //             }
+		// 		},
+		// 		errorContainer: "#messageBox",
+		// 		errorPlacement: function(error, element) {
+		// 			$("#messageBox").text("输入有误,请先更正。");
+		// 			if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+		// 				error.appendTo(element.parent().parent());
+		// 			} else {
+		// 				error.insertAfter(element);
+		// 			}
+		// 		}
+		// 	});
+		// });
+	</script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+	<li><a href="${ctx}/new/user/agency/">机构列表</a></li>
+	<li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+	<li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
+	<li class="active"><a href="${ctx}/new/user/agency/recordLinkage?clubId=${clubId}">生成行为记录链接</a></li>
+</ul><br/>
+<br/>
+<form:form id="inputForm" onsubmit="return copylink('${linkage}')" action="${ctx}/new/user/agency/recordLinkageSave" method="post" class="form-horizontal">
+
+		<sys:message content="${message}"/>
+	<input type="hidden" id='clubId' name='clubId' value="${clubId}">
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>描述:</label>
+            <textarea id='describe'  <c:if test="${not empty describe}">placeholder="${describe}"</c:if> <c:if test="${empty describe}">placeholder="请输入该用户的行为信息,例如查看了什么商品或者文章,以及任何需要销售人员注意的信息"</c:if> name='describe' rows='5' cols='12' style="width: 700px" maxlength="200"></textarea>
+		</div>
+	<div class="control-label">链接:</div><span id='link' name='link'>${link}</span>
+		<div class="form-actions">
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+			<input id="btnSubmit" class="btn btn-primary"  type="submit" value="确定并生成链接"/>
+		</div>
+	</form:form>
+
+	<script>
+
+	function copylink(link){
+		console.log('link====>',link);
+		debugger
+		var oInput = document.createElement("textarea");
+		oInput.value = link;
+		document.body.appendChild(oInput);
+		oInput.select(); // 选择对象
+		document.execCommand("Copy"); // 执行浏览器复制命令
+		document.body.removeChild(oInput);
+
+
+	    var remarks = $("#describe").val();
+	    if(remarks != undefined && remarks.trim() != ""){
+	    	loading('正在提交,请稍等...');
+	    }else {
+	    	alertx("请填写备注!");
+	    	return false;
+	}
+	}
+
+</script>
+</body>
+</html>