Browse Source

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

zhengjinyi 2 years ago
parent
commit
b30d7128f2
36 changed files with 691 additions and 526 deletions
  1. 3 0
      src/main/java/com/caimei/modules/bulkpurchase/web/CmRefundsProductController.java
  2. 7 1
      src/main/java/com/caimei/modules/order/dao/NewOrderDao.java
  3. 9 0
      src/main/java/com/caimei/modules/order/entity/CmReturnedPurchase.java
  4. 9 0
      src/main/java/com/caimei/modules/order/entity/NewOrder.java
  5. 9 1
      src/main/java/com/caimei/modules/order/entity/NewShopOrder.java
  6. 41 5
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  7. 4 0
      src/main/java/com/caimei/modules/order/service/NewShopOrderService.java
  8. 2 2
      src/main/java/com/caimei/modules/order/service/SplitAccountService.java
  9. 43 5
      src/main/java/com/caimei/modules/order/web/CmPayShopController.java
  10. 7 4
      src/main/java/com/caimei/modules/order/web/CmShopOrderController.java
  11. 2 2
      src/main/java/com/caimei/modules/order/web/SplitAccountController.java
  12. 3 0
      src/main/java/com/caimei/modules/user/dao/CmBehaviorRecordDao.java
  13. 37 0
      src/main/java/com/caimei/modules/user/entity/CmBehaviorRecord.java
  14. 22 22
      src/main/java/com/caimei/modules/user/service/CmBehaviorRecordService.java
  15. 1 14
      src/main/java/com/caimei/modules/user/web/CmUserBehaviorRecordController.java
  16. 1 0
      src/main/resources/config/dev/caimei.properties
  17. 147 103
      src/main/resources/mappings/modules/order/OrderMapper.xml
  18. 4 2
      src/main/resources/mappings/modules/order/ShopOrderMapper.xml
  19. 41 45
      src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml
  20. 2 2
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp
  21. 2 2
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductList.jsp
  22. 106 53
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/settlementRecord.jsp
  23. 2 2
      src/main/webapp/WEB-INF/views/modules/info/infoForm.jsp
  24. 2 2
      src/main/webapp/WEB-INF/views/modules/info/infoList.jsp
  25. 4 1
      src/main/webapp/WEB-INF/views/modules/order/checkPaymentOrder.jsp
  26. 1 1
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp
  27. 22 5
      src/main/webapp/WEB-INF/views/modules/order/cmSettlementList.jsp
  28. 57 36
      src/main/webapp/WEB-INF/views/modules/order/cmSplitAccountList.jsp
  29. 7 7
      src/main/webapp/WEB-INF/views/modules/user/behaviorNewOrder.jsp
  30. 18 115
      src/main/webapp/WEB-INF/views/modules/user/behaviorRecordAgency.jsp
  31. 7 19
      src/main/webapp/WEB-INF/views/modules/user/behaviorRecordDetailsList.jsp
  32. 27 30
      src/main/webapp/WEB-INF/views/modules/user/behaviorRecordList.jsp
  33. 27 30
      src/main/webapp/WEB-INF/views/modules/user/behaviorRecordRossList.jsp
  34. 7 7
      src/main/webapp/WEB-INF/views/modules/user/behaviorRemarks.jsp
  35. 7 7
      src/main/webapp/WEB-INF/views/modules/user/behaviorReport.jsp
  36. 1 1
      src/main/webapp/WEB-INF/views/modules/userNew/recordLinkageForm.jsp

+ 3 - 0
src/main/java/com/caimei/modules/bulkpurchase/web/CmRefundsProductController.java

@@ -791,12 +791,15 @@ public class CmRefundsProductController extends BaseController {
                 }
             }
             List<SettleRecord> settleRecord = newOrderService.findSettleRecord(cmReturnedPurchase.getOrderID());
+            List<SplitAccountPo> splitRecord = newOrderService.findSplitRecord(cmReturnedPurchase.getOrderID());
             model.addAttribute("settleRecord", settleRecord);
             model.addAttribute("order", newOrder);
             model.addAttribute("receipt", listRelation);
             model.addAttribute("refundFee", refundFee);
             model.addAttribute("from", from);
             model.addAttribute("orderID", cmReturnedPurchase.getOrderID().toString());
+            model.addAttribute("pageType", cmReturnedPurchase.getPageType());
+            model.addAttribute("splitRecord", splitRecord);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 7 - 1
src/main/java/com/caimei/modules/order/dao/NewOrderDao.java

@@ -197,7 +197,7 @@ public interface NewOrderDao extends CrudDao<NewOrder> {
      */
     void deleteCouponOrderRecord(Integer id);
 
-    List<OrderReceiptRelationPo> getUndividedPaidReceipt(String currentTime);
+    List<OrderReceiptRelationPo> getUndividedPaidReceipt(@Param("currentTime")String currentTime,@Param("shopOrderIds")String shopOrderIds);
 
     List<OrderReceiptRelationPo> getOnlineBalance(String currentTime);
 
@@ -262,4 +262,10 @@ public interface NewOrderDao extends CrudDao<NewOrder> {
     Double findSettleAmount(Integer orderID);
 
     Integer findShopOrderSize(Integer orderID);
+
+    Integer findSplitCount(Integer orderID);
+
+    List<SplitAccountPo> getSplitRecord(Integer orderID);
+
+    Integer getSplitTime(Integer shopOrderId);
 }

+ 9 - 0
src/main/java/com/caimei/modules/order/entity/CmReturnedPurchase.java

@@ -75,8 +75,17 @@ public class CmReturnedPurchase extends DataEntity<CmReturnedPurchase> {
     private String endTime;        //时间结束  查询条件 申请时间
     private Integer onlineShopOrderId; //子订单id
 
+    private Integer pageType;   //1跳转结算记录页面2跳转分账记录页面
     private String bankNameType;
 
+    public Integer getPageType() {
+        return pageType;
+    }
+
+    public void setPageType(Integer pageType) {
+        this.pageType = pageType;
+    }
+
     public Integer getOnlineShopOrderId() {
         return onlineShopOrderId;
     }

+ 9 - 0
src/main/java/com/caimei/modules/order/entity/NewOrder.java

@@ -111,6 +111,7 @@ public class NewOrder extends DataEntity<NewOrder> {
     private Integer serviceProviderId;  //协销Id
     private Integer settleStatus;    //结算状态   1未结算2部分结算3已结算
     private Double settleAmount;   // 已结算金额
+    private Integer splitCount;  //分账记录数
 
     private String productName;     //商品名称(根据商品名称筛选订单)
     private List<NewOrderProduct> orderProduct;// 订单内的商品集合
@@ -165,6 +166,14 @@ public class NewOrder extends DataEntity<NewOrder> {
     private Integer receiveCouponId;
     private CmHeheCouponOrderRecord heheCouponRecord;   //优惠券信息
 
+    public Integer getSplitCount() {
+        return splitCount;
+    }
+
+    public void setSplitCount(Integer splitCount) {
+        this.splitCount = splitCount;
+    }
+
     public String getRebateFee() {
         return rebateFee;
     }

+ 9 - 1
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -115,7 +115,7 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private List<NewOrderProduct> snOrderProducts;//需要使用sn码的订单产品列表
     private Boolean defaultStatus;  //控制填写的默认状态(运费订单,部分收款订单 默认不能操作,)
     private CmPromotion shopPromotion;  //子订单对应的店铺促销活动
-
+    private String onlinePayWays; //线上支付渠道,收银台确定支付渠道1微信2支付宝3个人网银4企业网银
     //--------------- 付款列表展示数据 ------------
     private String paying;// 是否处于给供应商状态中   0不是的,  1是的
     private String refunding;// 是否处于供应商退款状态中   0不是的,  1是的
@@ -157,6 +157,14 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
 
     private boolean payShopOtherFee = true; //是否可以付第三方申请
 
+    public String getOnlinePayWays() {
+        return onlinePayWays;
+    }
+
+    public void setOnlinePayWays(String onlinePayWays) {
+        this.onlinePayWays = onlinePayWays;
+    }
+
     public String getRebateFee() {
         return rebateFee;
     }

+ 41 - 5
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -693,11 +693,27 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                             }
                             //有优惠金额,最高手续费=支付金额*0.65%>10取0.65,不大于取10(合利宝最高0.65%)
                             double realPay = shopOrder.getRealPay();
-                            double charge = MathUtil.mul(realPay, 0.0065, 2).doubleValue() > 10 ? MathUtil.mul(realPay, 0.0065, 2).doubleValue() : 10;
+//                            double charge = MathUtil.mul(realPay, 0.0065, 2).doubleValue() > 10 ? MathUtil.mul(realPay, 0.0065, 2).doubleValue() : 10;
                             //佣金>最高手续费可以线上,否则线下
                             double bro = MathUtil.sub(realPay, shopOrder.getShouldPayShopAmount()).doubleValue();
-                            if (bro < charge) {
-                                onlinePay = false;
+                            if (bro < 0) {
+                                onlinePay=false;
+                            } else {
+                                double WXCharge = MathUtil.mul(realPay, 0.0065, 2).doubleValue();
+                                double AliCharge = MathUtil.mul(realPay, 0.0025, 2).doubleValue();
+                                double B2CCharge = MathUtil.mul(realPay, 0.002, 2).doubleValue();
+                                //佣金和手续费比较,佣金>手续费则可以走当前支付渠道
+                                //支持子订单佣金小于最小手续费时,也能进行线上支付,此时不限制支付方式(佣金大于最大手续费或小于最小手续费支持全渠道付款)
+                                String payWays = "";
+                                payWays += bro >= WXCharge ? "1" : "";
+                                payWays += bro >= AliCharge ? ",2" : "";
+                                payWays += bro >= B2CCharge ? ",3" : "";
+                                payWays += bro >= 10 ? ",4" : "";
+                                //小于所有的情况下线下补手续费,开放所有渠道
+                                if ("".equals(payWays)) {
+                                    payWays = "1,2,3,4";
+                                }
+                                shopOrder.setOnlinePayWays(payWays);
                             }
                         }
                     } else {
@@ -711,8 +727,24 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                             double bro = shopOrder.getBrokerage();
                             shopOrder.setRealPay(realPay);
                             shopOrder.setEachDiscount(0d);
-                            if (bro < charge) {
-                                onlinePay = false;
+                            if (bro < 0) {
+                                onlinePay=false;
+                            } else {
+                                double WXCharge = MathUtil.mul(realPay, 0.0065, 2).doubleValue();
+                                double AliCharge = MathUtil.mul(realPay, 0.0025, 2).doubleValue();
+                                double B2CCharge = MathUtil.mul(realPay, 0.002, 2).doubleValue();
+                                //佣金和手续费比较,佣金>手续费则可以走当前支付渠道
+                                //支持子订单佣金小于最小手续费时,也能进行线上支付,此时不限制支付方式(佣金大于最大手续费或小于最小手续费支持全渠道付款)
+                                String payWays = "";
+                                payWays += bro >= WXCharge ? "1" : "";
+                                payWays += bro >= AliCharge ? ",2" : "";
+                                payWays += bro >= B2CCharge ? ",3" : "";
+                                payWays += bro >= 10 ? ",4" : "";
+                                //小于所有的情况下线下补手续费,开放所有渠道
+                                if ("".equals(payWays)) {
+                                    payWays = "1,2,3,4";
+                                }
+                                shopOrder.setOnlinePayWays(payWays);
                             }
                         }
                     }
@@ -2716,4 +2748,8 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         newOrder.setRebateFlag("2");
         newOrderDao.update(newOrder);
     }
+
+    public List<SplitAccountPo> findSplitRecord(Integer orderID) {
+        return newOrderDao.getSplitRecord(orderID);
+    }
 }

+ 4 - 0
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -448,9 +448,13 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             orderIds = cmDiscernReceiptDao.findRebateOrderID(orderList.stream().map(NewOrder::getOrderID).collect(Collectors.toList()));
         }
         for (NewOrder order : orderList) {
+            //结算记录
             List<SettleRecord> settleRecord = newOrderDao.findSettleRecord(order.getOrderID());
             Integer num = null == settleRecord ? 0 : settleRecord.size();
             order.setSettleRecordNum(num);
+            //分账记录数
+            Integer splitCount=newOrderDao.findSplitCount(order.getOrderID());
+            order.setSplitCount(splitCount);
             if ("0".equals(order.getOnlinePayFlag())) {
                 order.setSettleAmount(newOrderDao.findSettleAmount(order.getOrderID()));
             }

+ 2 - 2
src/main/java/com/caimei/modules/order/service/SplitAccountService.java

@@ -40,14 +40,14 @@ public class SplitAccountService extends BaseService {
     private NewShopOrderDao newShopOrderDao;
 
     @Transactional(readOnly = false,rollbackFor = Exception.class)
-    public void SplitAccount() {
+    public void SplitAccount(String shopOrderIds) {
         logger.info("【手动分账开始】>>>>>>>>>>手动分账");
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(new Date());
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String currentTime = format.format(calendar.getTime());
         // 查询未分账已支付收款
-        List<OrderReceiptRelationPo> orderRelations = newOrderDao.getUndividedPaidReceipt(currentTime);
+        List<OrderReceiptRelationPo> orderRelations = newOrderDao.getUndividedPaidReceipt(currentTime,shopOrderIds);
         if (null != orderRelations && orderRelations.size() > 0) {
             for (OrderReceiptRelationPo orderRelation : orderRelations) {
                 logger.info("【分账】>>>>>>>>>>子订单id:" + orderRelation.getShopOrderId() + "进入分账");

+ 43 - 5
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -34,7 +34,9 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
+import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicReference;
@@ -76,6 +78,8 @@ public class CmPayShopController extends BaseController {
     private NewOrderDao newOrderDao;
     @Resource
     private CmOfflineCollectionService cmOfflineCollectionService;
+    @Resource
+    private SplitAccountService splitAccountService;
 
     @ModelAttribute
     public CmPayShop get(@RequestParam(required = false) String id) {
@@ -394,7 +398,7 @@ public class CmPayShopController extends BaseController {
         shopOrder.setPayStatus(soZeroCostFlag ? "3" : "1");
         shopOrder.setZeroCostFlag(soZeroCostFlag ? 1 : 0);
         //当子订单0成本时,若主订单中其他子订单(除了运费子订单)都为0成本,设主订单为已付款,否则设为部分付款
-         NewOrder newOrder = newOrderService.get(shopOrder.getOrderID().toString());
+        NewOrder newOrder = newOrderService.get(shopOrder.getOrderID().toString());
         if (soZeroCostFlag) {
 
             AtomicReference<Boolean> zeroCostFlag = new AtomicReference<>(true);
@@ -430,7 +434,6 @@ public class CmPayShopController extends BaseController {
         }
 
 
-
         shopOrder.setShopPostFee(freight); //运费
         shopOrder.setShopOtherFee(thirdPartyFee); //付第三方
         shopOrder.setCostType(costType);
@@ -611,6 +614,29 @@ public class CmPayShopController extends BaseController {
         return res;
     }
 
+    @RequestMapping("settleTime")
+    @ResponseBody
+    public Map<String, Object> settleTime(@RequestParam("shopOrderId") Integer shopOrderId) {
+        Map<String, Object> map = new HashMap<>();
+        Calendar instance = Calendar.getInstance();
+        int flag = 0;
+        int weekIdx = instance.get(Calendar.DAY_OF_WEEK) - 1;
+        String format = new SimpleDateFormat("HH:mm:ss").format(new Date());
+        Integer substring = Integer.valueOf(format.substring(0, 2));
+        //当前时间周五下午到周日都返回1不能结算,其他时间看够不够24小时
+        if ((5 == weekIdx && substring > 14) || 6 == weekIdx || 7 == weekIdx) {
+            flag = 1;
+        } else {
+            Integer val = newOrderDao.getSplitTime(shopOrderId);
+            if (val <= 0) {
+                flag = 1;
+            }
+        }
+        map.put("flag", flag);
+        map.put("msg", "添加成功");
+        return map;
+    }
+
     /**
      * 发起付款申请  去付款单页面
      *
@@ -647,6 +673,17 @@ public class CmPayShopController extends BaseController {
         return "modules/order/cmSettlementForm";
     }
 
+    @RequestMapping("splitEdit")
+    public String splitEdit(String[] shopOrderIDs, RedirectAttributes redirectAttributes, Model model) {
+        splitAccountService.SplitAccount(shopOrderIDs[0]);
+
+//        Page<NewShopOrder> page = newShopOrderService.findSplitList(new Page<NewShopOrder>(),new NewShopOrder());
+//        model.addAttribute("page", page);
+        addMessage(redirectAttributes, "分账成功!");
+        return "redirect:" + Global.getAdminPath() + "/shopOrder/splitList";
+//        return "modules/order/cmSplitAccountList";
+    }
+
     /**
      * 去编辑页面 信息回显
      */
@@ -784,14 +821,15 @@ public class CmPayShopController extends BaseController {
      * @return
      */
     @RequestMapping("settlement")
-    public String settlement(Double settleAmount, String shopOrderId,RedirectAttributes redirectAttributes) throws Exception {
+    public String settlement(Double settleAmount, String shopOrderId, RedirectAttributes redirectAttributes) throws Exception {
         Double shouldPayShopAmount = newOrderDao.findShouldPayShopAmount(shopOrderId);
         Double settleSum = newOrderDao.findSettleSum(shopOrderId);
-        if(settleSum>=shouldPayShopAmount){
+        if (settleSum >= shouldPayShopAmount) {
             addMessage(redirectAttributes, "此订单已结算完毕!");
             return "redirect:" + Global.getAdminPath() + "/shopOrder/settlement";
         }
-        if(settleSum>=shouldPayShopAmount){}
+        if (settleSum >= shouldPayShopAmount) {
+        }
         Integer SDJSS = (Integer) redisService.get("SDJSS");
         //验锁
         if (null != SDJSS && SDJSS > 0) {

+ 7 - 4
src/main/java/com/caimei/modules/order/web/CmShopOrderController.java

@@ -109,20 +109,23 @@ public class CmShopOrderController extends BaseController {
 
     @RequiresPermissions("order:cmPayShop:split")
     @RequestMapping("splitList")
-    public String SplitAccount(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model){
+    public String SplitAccount(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
         //1. 展示付款状态为待付款和部分付款状态的线上支付的子订单;
         //2. 子订单按下单时间降序排列
         //3. 手动分账页面需要只控制显示已收款的子订单
-        Page<NewShopOrder> page = newShopOrderService.findSplitList(new Page<>(request, response),newShopOrder);
+        if (null == newShopOrder) {
+            newShopOrder = new NewShopOrder();
+        }
+        Page<NewShopOrder> page = newShopOrderService.findSplitList(new Page<>(request, response), newShopOrder);
         model.addAttribute("page", page);
         return "modules/order/cmSplitAccountList";
     }
 
     @RequestMapping("settlement")
-    public String Settlement(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model){
+    public String Settlement(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
         //1. 展示已分帐的线上子订单
         //2. 子订单按下单时间降序排列
-        Page<NewShopOrder> page = newShopOrderService.findSettlementList(new Page<>(request, response),newShopOrder);
+        Page<NewShopOrder> page = newShopOrderService.findSettlementList(new Page<>(request, response), newShopOrder);
         model.addAttribute("page", page);
         return "modules/order/cmSettlementList";
     }

+ 2 - 2
src/main/java/com/caimei/modules/order/web/SplitAccountController.java

@@ -49,11 +49,11 @@ public class SplitAccountController extends BaseController {
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String currentTime = format.format(calendar.getTime());
         // 查询未分账已支付收款
-        List<OrderReceiptRelationPo> orderRelations = newOrderDao.getUndividedPaidReceipt(currentTime);
+        List<OrderReceiptRelationPo> orderRelations = newOrderDao.getUndividedPaidReceipt(currentTime,null);
         if (null != orderRelations && orderRelations.size() > 0) {
             //设锁
             redisService.set("XSFZMDS", 1, 120L);
-            splitAccountService.SplitAccount();
+            splitAccountService.SplitAccount(null);
             addMessage(redirectAttributes, "分账成功!");
         } else {
             addMessage(redirectAttributes, "暂无收款金额可进行分账!");

+ 3 - 0
src/main/java/com/caimei/modules/user/dao/CmBehaviorRecordDao.java

@@ -4,6 +4,7 @@ import com.caimei.modules.user.entity.CmBehaviorRecord;
 import com.caimei.modules.user.entity.CmPageType;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -51,4 +52,6 @@ public interface CmBehaviorRecordDao extends CrudDao<CmBehaviorRecord> {
 
 
     List<CmBehaviorRecord> behaviorAgency(CmBehaviorRecord cmBehaviorRecord);
+
+    List<CmBehaviorRecord> selRegion(@Param("IP") String IP, @Param("pageType") String pageType, @Param("accessTime") String accessTime);
 }

+ 37 - 0
src/main/java/com/caimei/modules/user/entity/CmBehaviorRecord.java

@@ -38,6 +38,11 @@ public class CmBehaviorRecord extends DataEntity<CmBehaviorRecord> {
     private String behaviorType;  //是否是roos页面行为 1:用户行为、2:roos行为统计
     private Integer count;
 
+    private String companyType; //公司类型
+    private String corporateName;   // 公司名称
+    private String contacts;    //联系人
+    private String phoneNumber; //手机号码
+
     private Integer numbers;    //访问页面总数
     private String userIdentity; //公司类型
 
@@ -222,6 +227,38 @@ public class CmBehaviorRecord extends DataEntity<CmBehaviorRecord> {
         this.count = count;
     }
 
+    public String getCompanyType() {
+        return companyType;
+    }
+
+    public void setCompanyType(String companyType) {
+        this.companyType = companyType;
+    }
+
+    public String getCorporateName() {
+        return corporateName;
+    }
+
+    public void setCorporateName(String corporateName) {
+        this.corporateName = corporateName;
+    }
+
+    public String getContacts() {
+        return contacts;
+    }
+
+    public void setContacts(String contacts) {
+        this.contacts = contacts;
+    }
+
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+
     public Integer getNumbers() {
         return numbers;
     }

+ 22 - 22
src/main/java/com/caimei/modules/user/service/CmBehaviorRecordService.java

@@ -38,25 +38,7 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
 
 
     public Page<CmBehaviorRecord> findPageList(Page<CmBehaviorRecord> page, CmBehaviorRecord cmBehaviorRecord) {
-        cmBehaviorRecord.setPage(page);
-        List<CmBehaviorRecord> list = behaviorList(cmBehaviorRecord);
-        int pageNo = page.getPageNo();
-        int pageSize = page.getPageSize();
-        int number = 0;
-        if (pageNo == 1) {
-            number = 0;
-        } else {
-            number = (pageNo - 1) * pageSize;
-        }
-        List<CmBehaviorRecord> behaviorList = new ArrayList<>();
-        for (int i = 0; i <= list.size()-1 ; i++) {
-            if (i >= number && i < number+pageSize) {
-                behaviorList.add(list.get(i));
-            }
-        }
-        page.setCount(list.size());
-        page.setList(behaviorList);
-        return page;
+        return super.findPage(page,cmBehaviorRecord);
     }
 
     public List<CmBehaviorRecord> behaviorList(CmBehaviorRecord cmBehaviorRecord) {
@@ -86,8 +68,13 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
                 list.addAll(listData);
             } else {
                 listData = cmBehaviorRecordDao.findListBefore(cmBehaviorRecord);
+                Double doubles = 0.0;
                 if (listData.size() != 0) {
                     CmBehaviorRecord behaviorRecord = listData.get(0);
+                    for (CmBehaviorRecord recordList: listData) {
+                        doubles += Double.parseDouble(recordList.getAccessDuration());
+                    }
+                    behaviorRecord.setAccessDuration(doubles.toString());
                     listDataMerge.add(behaviorRecord);
                     listData = listDataMerge;
                 }
@@ -105,7 +92,7 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
      */
     public Page<CmBehaviorRecord> recordPage(Page<CmBehaviorRecord> page, CmBehaviorRecord cmBehaviorRecord){
         cmBehaviorRecord.setPage(page);
-        Integer userID = cmBehaviorRecord.getUserID();
+        /*Integer userID = cmBehaviorRecord.getUserID();
         // 每天访问用户数
         CmBehaviorRecord cmRecord = new CmBehaviorRecord();
         cmRecord.setIP(cmBehaviorRecord.getIP());
@@ -123,10 +110,10 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
             if (!cmBehaviorRecord.getAccessDate().equals(format)) {
                 cmBehaviorRecord.setUserID(null);
             }
-        }
+        }*/
         // 用户行为详情
         List<CmBehaviorRecord> cmBehaviorRecordList = cmBehaviorRecordDao.recordList(cmBehaviorRecord);
-        cmBehaviorRecord.setUserID(userID);
+        //cmBehaviorRecord.setUserID(userID);
         for(CmBehaviorRecord record: cmBehaviorRecordList) {
             record.setProductImage(AppUtils.getImageURL("product", record.getProductImage(), 0, ""));
             String time = calculationTime(record.getAccessDuration());
@@ -138,6 +125,19 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
                 e.printStackTrace();
             }
             record.setPagePath(decode);
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+            String s = null;
+            try {
+                s = simpleDateFormat.format(simpleDateFormat.parse(record.getAccessTime()));
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+            List<CmBehaviorRecord> region = cmBehaviorRecordDao.selRegion(record.getIP(), record.getPageType(), s);
+            if (region.size() != 0) {
+                for (CmBehaviorRecord behaviorRecord : region) {
+                    record.setAccessSource(behaviorRecord.getAccessSource());
+                }
+            }
         }
         page.setList(cmBehaviorRecordList);
         return page;

+ 1 - 14
src/main/java/com/caimei/modules/user/web/CmUserBehaviorRecordController.java

@@ -58,19 +58,6 @@ public class CmUserBehaviorRecordController extends BaseController {
     public String List(CmBehaviorRecord cmBehaviorRecord, HttpServletRequest request, HttpServletResponse response, Model model)  throws IOException {
         Page<CmBehaviorRecord> page = cmBehaviorRecordService.findPageList(new Page<>(request, response,20), cmBehaviorRecord);
         for(CmBehaviorRecord record: page.getList()) {
-            // 是roos页面统计判断咨询人信息是否为空并赋值
-            if ("2".equals(cmBehaviorRecord.getBehaviorType())) {
-                CmBehaviorRecord consult = cmBehaviorRecordDao.selConsult(record);
-                if (consult != null) {
-                    if (StringUtils.isNotEmpty(consult.getConsultName())) {
-                        record.setConsultName(consult.getConsultName());
-                    }
-                    if (StringUtils.isNotEmpty(consult.getConsultMobile())) {
-                        record.setConsultMobile(consult.getConsultMobile());
-                    }
-                }
-
-            }
             // 计算访问时长
             String time = cmBehaviorRecordService.calculationTime(record.getAccessDuration());
             record.setAccessDuration(time);
@@ -115,7 +102,7 @@ public class CmUserBehaviorRecordController extends BaseController {
     public String behaviorRecordAgency(CmBehaviorRecord cmBehaviorRecord, HttpServletRequest request, HttpServletResponse response, Model model) {
         NewCmClub newCmClub = new NewCmClub();
         if (cmBehaviorRecord.getUserID() == 0) {
-            newCmClub.setClubID(1);
+            newCmClub.setClubID(0);
         } else {
             newCmClub.setClubID(cmBehaviorRecord.getClubID());
         }

+ 1 - 0
src/main/resources/config/dev/caimei.properties

@@ -16,6 +16,7 @@ jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding
 jdbc.username=developer
 jdbc.password=J5p3tgOVazNl4ydf
 
+
 #jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
 #jdbc.username=developer
 #jdbc.password=J5p3tgOVazNl4ydf

+ 147 - 103
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -270,7 +270,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">
@@ -315,25 +315,27 @@
     <select id="getShopOrders" parameterType="string" resultType="NewShopOrder">
         SELECT (SELECT IFNULL(sum(shouldPayFee), 0)
                 FROM cm_order_product
-                WHERE shopOrderID = cs.shopOrderID AND payStatus = 2)  AS
-                                                                          alreadyReceipt,
+                WHERE shopOrderID = cs.shopOrderID
+                  AND payStatus = 2)  AS
+                                         alreadyReceipt,
                (SELECT IFNULL(sum(shouldPayFee), 0)
                 FROM cm_order_product
-                WHERE shopOrderID = cs.shopOrderID AND payStatus != 2) AS unReceipt,
-               cs.shopOrderID                                          AS shopOrderID,
-               co.orderID                                              AS orderID,
-               cs.shopOrderNo                                          AS shopOrderNo,
-               co.orderNo                                              AS orderNo,
-               cs.shopOrderNo                                          AS shopOrderNo,
-               cs.itemCount                                            AS itemCount,
-               cs.needPayAmount                                        AS needPayAmount,
-               co.orderType                                            AS orderType,
-               s.name                                                  AS shopName,
-               bou.shouHuoRen                                          AS receiver,
-               u.name                                                  AS buyer,
-               co.orderSource                                          AS orderSource,
-               co.orderTotalFee                                        AS orderTotalFee,
-               co.orderTime                                            AS orderTime
+                WHERE shopOrderID = cs.shopOrderID
+                  AND payStatus != 2) AS unReceipt,
+               cs.shopOrderID         AS shopOrderID,
+               co.orderID             AS orderID,
+               cs.shopOrderNo         AS shopOrderNo,
+               co.orderNo             AS orderNo,
+               cs.shopOrderNo         AS shopOrderNo,
+               cs.itemCount           AS itemCount,
+               cs.needPayAmount       AS needPayAmount,
+               co.orderType           AS orderType,
+               s.name                 AS shopName,
+               bou.shouHuoRen         AS receiver,
+               u.name                 AS buyer,
+               co.orderSource         AS orderSource,
+               co.orderTotalFee       AS orderTotalFee,
+               co.orderTime           AS orderTime
         FROM cm_shop_order cs
                  LEFT JOIN cm_order co ON cs.orderNo = co.orderNo
                  LEFT JOIN shop s ON cs.shopID = s.shopID
@@ -632,7 +634,7 @@
 
     <update id="updateStatus" parameterType="NewOrder">
         UPDATE cm_order
-        SET status = #{status},
+        SET status    = #{status},
             closeTime = NOW()
         WHERE orderID = #{orderID}
     </update>
@@ -976,29 +978,35 @@
         WHERE orderID = #{orderId}
     </update>
     <update id="updateOnlinePayFlag">
-        update cm_order set onlinePayFlag = #{onlinePayFlag} where orderID = #{orderId}
+        update cm_order
+        set onlinePayFlag = #{onlinePayFlag}
+        where orderID = #{orderId}
     </update>
     <update id="updateShopOrderByPayStatus">
-        UPDATE cm_shop_order SET
-        payStatus = #{payStatus}, payedShopAmount = #{paidShop}
+        UPDATE cm_shop_order
+        SET payStatus       = #{payStatus},
+            payedShopAmount = #{paidShop}
         WHERE shopOrderID = #{shopOrderId}
     </update>
     <update id="updateOrderByPayStatus">
-        UPDATE cm_order SET
-            payStatus = #{payStatus}
+        UPDATE cm_order
+        SET payStatus = #{payStatus}
         WHERE orderID = #{orderId}
     </update>
     <update id="updateBySplitStatus">
-        UPDATE cm_receipt_order_relation SET splitStatus = 1 WHERE mbOrderId = #{mbOrderId}
+        UPDATE cm_receipt_order_relation
+        SET splitStatus = 1
+        WHERE mbOrderId = #{mbOrderId}
     </update>
     <update id="updateSettleStatus">
         update cm_split_account
         set settleStatus = 1
         where shopOrderId = #{shopOrderId}
-        and productType = #{productType}
+          and productType = #{productType}
     </update>
     <update id="updateShopOrderSettleStatus">
-        update cm_shop_order set settleStatus = #{settleStatus}
+        update cm_shop_order
+        set settleStatus = #{settleStatus}
         where shopOrderId = #{shopOrderId}
     </update>
     <delete id="deleteCouponOrderRecord">
@@ -1009,16 +1017,16 @@
 
     <select id="getUndividedPaidReceipt" resultType="com.caimei.modules.order.entity.OrderReceiptRelationPo">
         SELECT cror.id,
-               cror.relationType,
-               cror.receiptId,
-               cror.associateAmount,
-               cror.orderId,
-               cror.delFlag,
-               cror.mbOrderId,
-               cror.orderRequestNo,
-               cror.splitStatus,
-               cror.shopOrderId,
-               cdr.payType
+        cror.relationType,
+        cror.receiptId,
+        cror.associateAmount,
+        cror.orderId,
+        cror.delFlag,
+        cror.mbOrderId,
+        cror.orderRequestNo,
+        cror.splitStatus,
+        cror.shopOrderId,
+        cdr.payType
         FROM cm_receipt_order_relation cror
         LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
         LEFT JOIN cm_order co ON cror.orderID = co.orderID
@@ -1026,16 +1034,19 @@
         LEFT JOIN cm_order_product cop ON co.shopOrderIDs = cop.shopOrderID
         LEFT JOIN product p ON cop.productID = p.productID
         WHERE cror.relationType = 2
-          AND cso.receiptStatus=3
-          AND cror.delFlag = 0
-          AND cror.mbOrderId IS NOT NULL
-          AND cror.splitStatus = 0
-          AND cdr.payWay = 1
-          AND cdr.receiptDate <![CDATA[  <=  ]]> #{currentTime}
-          AND co.organizeID = 0
-          AND co.orderType != 2
-          AND co.refundType != 2
-          AND p.splitCode != 'E1807059160'
+        <if test="shopOrderIds !=null and shopOrderIds !=''">
+            and cror.shopOrderId=#{shopOrderIds}
+        </if>
+        AND cso.receiptStatus=3
+        AND cror.delFlag = 0
+        AND cror.mbOrderId IS NOT NULL
+        AND cror.splitStatus = 0
+        AND cdr.payWay = 1
+        AND cdr.receiptDate <![CDATA[  <=  ]]> #{currentTime}
+        AND co.organizeID = 0
+        AND co.orderType != 2
+        AND co.refundType != 2
+        AND p.splitCode != 'E1807059160'
     </select>
 
     <select id="getOnlineBalance" resultType="com.caimei.modules.order.entity.OrderReceiptRelationPo">
@@ -1235,9 +1246,10 @@
         LIMIT 1
     </select>
     <select id="findSupport" resultType="java.lang.Integer">
-        SELECT s.chargeSupport FROM shop s
-        LEFT JOIN cm_shop_order cso ON cso.shopId= s.shopId
-        WHERE cso.shopOrderId=#{shopOrderId}
+        SELECT s.chargeSupport
+        FROM shop s
+                 LEFT JOIN cm_shop_order cso ON cso.shopId = s.shopId
+        WHERE cso.shopOrderId = #{shopOrderId}
     </select>
     <select id="getOrderProductByShopOrderId" resultType="com.caimei.modules.order.entity.OrderProductVo">
         SELECT cop.orderProductID                                                 AS orderProductId,
@@ -1286,8 +1298,8 @@
                p.productCategory                                                  as productCategory,
                p.splitCode
         FROM cm_order_product cop
-        LEFT JOIN product p ON cop.productID = p.productID
-        left join cm_order co on co.orderID = cop.orderID
+                 LEFT JOIN product p ON cop.productID = p.productID
+                 left join cm_order co on co.orderID = cop.orderID
         WHERE cop.shopOrderID = #{shopOrderId}
           AND IF(co.userBeans = 0, 1 = 1, cop.shopid != 998)
         ORDER BY cop.discountPrice DESC
@@ -1325,105 +1337,137 @@
           AND orderID = #{orderId}
     </select>
     <select id="getSplitAccountList" resultType="com.caimei.modules.order.entity.SplitAccountPo">
-        SELECT
-            id,
-            orderId,
-            productId,
-            orderProductId,
-            shopId,
-            type,
-            subUserNo,
-            SUM(splitAccount) AS splitAccount,
-            mbOrderId,
-            orderRequestNo,
-            payStatus,
-            productType
+        SELECT id,
+               orderId,
+               productId,
+               orderProductId,
+               shopId,
+               type,
+               subUserNo,
+               SUM(splitAccount) AS splitAccount,
+               mbOrderId,
+               orderRequestNo,
+               payStatus,
+               productType
         FROM cm_split_account
-        WHERE type = 4 AND payStatus = 1 AND splitAccount > 0
+        WHERE type = 4
+          AND payStatus = 1
+          AND splitAccount > 0
           AND mbOrderId = #{mbOrderId}
         GROUP BY shopId
     </select>
     <select id="getPaidShopAmount" resultType="java.lang.Double">
         SELECT SUM(payAmount)
         FROM cm_pay_shop_record
-        WHERE STATUS = 1 AND delFlag = 0 AND shopOrderID = #{shopOrderId}
+        WHERE STATUS = 1
+          AND delFlag = 0
+          AND shopOrderID = #{shopOrderId}
     </select>
     <select id="findOnlinePay" resultType="java.lang.Integer">
-        SELECT COUNT(*) FROM
-        cm_receipt_order_relation cror
-        LEFT JOIN cm_discern_receipt cdr ON cdr.id = receiptID
-        LEFT JOIN cm_order co ON cror.orderId = co.orderId
-        WHERE cdr.payWay=1
+        SELECT COUNT(*)
+        FROM cm_receipt_order_relation cror
+                 LEFT JOIN cm_discern_receipt cdr ON cdr.id = receiptID
+                 LEFT JOIN cm_order co ON cror.orderId = co.orderId
+        WHERE cdr.payWay = 1
           AND co.orderType != 2
-          AND cror.orderID=#{orderID}
+          AND cror.orderID = #{orderID}
     </select>
     <select id="findSplitCode" resultType="java.lang.String">
-        select splitCode from cm_shop_order where shopOrderID = #{shopOrderId}
+        select splitCode
+        from cm_shop_order
+        where shopOrderID = #{shopOrderId}
     </select>
     <select id="findPayAmount" resultType="java.lang.Double">
-        SELECT SUM(splitAccount) FROM cm_split_account csa
-        LEFT JOIN cm_receipt_order_relation cror ON csa.shopOrderId=cror.shopOrderId
+        SELECT SUM(splitAccount)
+        FROM cm_split_account csa
+                 LEFT JOIN cm_receipt_order_relation cror ON csa.shopOrderId = cror.shopOrderId
         WHERE csa.shopOrderId = #{shopOrderId}
-          AND csa.type=5
+          AND csa.type = 5
           AND csa.settleStatus = 0
           AND csa.productType = 3
-          AND cror.splitStatus =1
-          AND cror.delflag=0
+          AND cror.splitStatus = 1
+          AND cror.delflag = 0
     </select>
     <select id="findShouldPayShopAmount" resultType="java.lang.Double">
-        select shouldPayShopAmount from cm_shop_order where shopOrderID = #{shopOrderId}
+        select shouldPayShopAmount
+        from cm_shop_order
+        where shopOrderID = #{shopOrderId}
     </select>
     <select id="findSettleSum" resultType="java.lang.Double">
-        SELECT IFNULL(SUM(settleAmount),0) FROM cm_settle_record
+        SELECT IFNULL(SUM(settleAmount), 0)
+        FROM cm_settle_record
         WHERE settleType = 1
           AND shopOrderId = 24665
     </select>
     <select id="findSettleRecord" resultType="com.caimei.modules.order.entity.SettleRecord">
-        select distinct
-        csr.settleAmount,csr.shopOrderId,csr.settleTime from cm_settle_record csr
-        left join cm_shop_order cso on csr.shopOrderId = cso.shopOrderID
-        where cso.orderID=#{orderID}
-        and settleType = 2
+        select distinct csr.settleAmount,
+                        csr.shopOrderId,
+                        csr.settleTime,
+                        csr.settleType
+        from cm_settle_record csr
+                 left join cm_shop_order cso on csr.shopOrderId = cso.shopOrderID
+        where cso.orderID = #{orderID}
     </select>
     <select id="findSettleAmount" resultType="java.lang.Double">
-        SELECT ifnull(SUM(settleAmount),0)
+        SELECT ifnull(SUM(settleAmount), 0)
         FROM cm_settle_record csr
-        LEFT JOIN cm_shop_order cso ON csr.shopOrderId = cso.shopOrderId
-        WHERE settleType=1
-          AND cso.orderId=#{orderID}
+                 LEFT JOIN cm_shop_order cso ON csr.shopOrderId = cso.shopOrderId
+        WHERE settleType = 1
+          AND cso.orderId = #{orderID}
     </select>
     <select id="findShopOrderSize" resultType="java.lang.Integer">
-        SELECT COUNT(*) FROM cm_shop_order WHERE orderId=#{orderID}
-                                             AND shopId!=998
+        SELECT COUNT(*)
+        FROM cm_shop_order
+        WHERE orderId = #{orderID}
+          AND shopId != 998
+    </select>
+    <select id="findSplitCount" resultType="java.lang.Integer">
+        SELECT COUNT(*)
+        FROM cm_split_account
+        WHERE orderid = #{orderID}
+    </select>
+    <select id="getSplitRecord" resultType="com.caimei.modules.order.entity.SplitAccountPo">
+        select orderId, shopOrderId, splitTime, productType, splitAccount
+        from cm_split_account
+        where orderId = #{orderId}
+    </select>
+    <select id="getSplitTime" resultType="java.lang.Integer">
+        SELECT COUNT(*) FROM cm_split_account WHERE shopOrderId=#{shopOrderId}
+        AND DATE_ADD(splitTime,INTERVAL 1 DAY) <![CDATA[  <  ]]> now()
     </select>
     <insert id="insertSplitAccount">
         INSERT INTO cm_split_account (orderId, productId, orderProductId, shopId, couponRecordId, vipRecordId,
                                       authVipRecordId, type, subUserNo, splitAccount,
-                                      mbOrderId, orderRequestNo, payStatus, productType, shopOrderId ,splitTime)
+                                      mbOrderId, orderRequestNo, payStatus, productType, shopOrderId, splitTime)
         VALUES (#{orderId}, #{productId}, #{orderProductId}, #{shopId}, #{couponRecordId}, #{vipRecordId},
                 #{authVipRecordId}, #{type}, #{subUserNo}, #{splitAccount},
-                #{mbOrderId}, #{orderRequestNo}, #{payStatus}, #{productType},#{shopOrderId}, NOW());
+                #{mbOrderId}, #{orderRequestNo}, #{payStatus}, #{productType}, #{shopOrderId}, NOW());
     </insert>
     <insert id="insertPayShop" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
         INSERT INTO cm_pay_shop (shopID, name, bankAccountName, bankAccount, bankName, type, totalAmount, balancePayFee,
-                                 transferPayFee, payType, wipePayment, wipeRemarks, wipeRemarkImages, wipeTime, applicant,
+                                 transferPayFee, payType, wipePayment, wipeRemarks, wipeRemarkImages, wipeTime,
+                                 applicant,
                                  applyTime, reviewer, reviewTime, payTime, status, reason, delFlag)
-        VALUES (#{shopId}, #{name}, #{bankAccountName}, #{bankAccount}, #{bankName}, #{type}, #{totalAmount}, #{balancePayFee},
-                #{transferPayFee}, #{payType}, #{wipePayment}, #{wipeRemarks}, #{wipeRemarkImages}, #{wipeTime}, #{applicant},
+        VALUES (#{shopId}, #{name}, #{bankAccountName}, #{bankAccount}, #{bankName}, #{type}, #{totalAmount},
+                #{balancePayFee},
+                #{transferPayFee}, #{payType}, #{wipePayment}, #{wipeRemarks}, #{wipeRemarkImages}, #{wipeTime},
+                #{applicant},
                 #{applyTime}, #{reviewer}, #{reviewTime}, #{payTime}, #{status}, #{reason}, #{delFlag})
     </insert>
-    <insert id="insertPayShopRecord" keyColumn="id" keyProperty="id"  useGeneratedKeys="true">
-        INSERT INTO cm_pay_shop_record (shopID, shopOrderID, shopOrderNo, payAmount, wipePayment, payType, payTime, payShopID, status, delFlag)
-        VALUES (#{shopId}, #{shopOrderId}, #{shopOrderNo}, #{payAmount}, #{wipePayment}, #{payType}, #{payTime}, #{payShopId}, #{status}, #{delFlag})
+    <insert id="insertPayShopRecord" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
+        INSERT INTO cm_pay_shop_record (shopID, shopOrderID, shopOrderNo, payAmount, wipePayment, payType, payTime,
+                                        payShopID, status, delFlag)
+        VALUES (#{shopId}, #{shopOrderId}, #{shopOrderNo}, #{payAmount}, #{wipePayment}, #{payType}, #{payTime},
+                #{payShopId}, #{status}, #{delFlag})
     </insert>
     <insert id="insertSettleRecord">
         INSERT INTO cm_settle_record(settleamount, settletype, shoporderid, splitcode, settletime)
-        VALUES (#{settleAmount},#{settleType},#{shopOrderId},#{splitCode},now())
+        VALUES (#{settleAmount}, #{settleType}, #{shopOrderId}, #{splitCode}, now())
     </insert>
 
     <update id="updateBrokerage">
-        UPDATE cm_shop_order SET
-            brokerage = #{brokerage}
+        UPDATE cm_shop_order
+        SET brokerage = #{brokerage}
         WHERE shopOrderID = #{shopOrderID}
     </update>
 

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

@@ -1147,7 +1147,8 @@
           AND cror.mbOrderId IS NOT NULL
           AND cror.splitStatus = 0
           AND a.receiptStatus=3
-          AND p.splitCode != 'E1807059160'
+          -- AND p.splitCode != 'E1807059160'
+          AND co.orderID NOT IN (SELECT orderID FROM cm_order_product cops LEFT JOIN product ps ON cops.productID = ps.productID WHERE ps.splitCode = 'E1807059160' AND cops.orderID = cop.orderID)
           AND co.orderID NOT IN (
             SELECT orderID
             FROM cm_order_product
@@ -1291,7 +1292,8 @@
           AND cror.delFlag = 0
           AND cror.mbOrderId IS NOT NULL
           AND cror.splitStatus = 1
-          AND p.splitCode != 'E1807059160'
+          -- AND p.splitCode != 'E1807059160'
+          AND co.orderID NOT IN (SELECT orderID FROM cm_order_product cops LEFT JOIN product ps ON cops.productID = ps.productID WHERE ps.splitCode = 'E1807059160' AND cops.orderID = cop.orderID)
         <if test="startTime != null and startTime != ''">
             AND (a.orderTime &gt; #{startTime} OR a.orderTime = #{startTime})
         </if>

+ 41 - 45
src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml

@@ -14,64 +14,57 @@
     </sql>
     <select id="findList" resultType="CmBehaviorRecord">
         SELECT
-          <include refid="behaviorRecord"/>
-          ,SUM(b.accessDuration) AS accessDuration,
-          u.userIdentity,
-          u.userName,
-          c.sname AS cSname,
-          c.name,
-          c.linkMan,
-          c.contractMobile,
-          s.name AS sname,
-          s.linkMan AS slinkMan,
-          s.contractMobile AS scontractMobile,
-          c.clubID as clubID,
-          s.shopID as shopID,
-          max(b.region) as region,
-          max(accessTime) AS lastAccessTime,
-          (SELECT CASE STATUS WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE linkMan END FROM serviceprovider WHERE serviceProviderID = c.spID) AS spName,
-          COUNT(b.IP) as numbers
-        FROM cm_behavior_record b
-        LEFT JOIN USER u ON b.userID = u.userID
-        LEFT JOIN club c ON b.userID = c.userID
-        LEFT JOIN shop s ON b.userID = s.userID
-        LEFT JOIN serviceprovider sp on c.spID = sp.serviceProviderID
+        IP,
+        userID,
+        clubID,
+        lastAccessTime,
+        companyType,
+        corporateName,
+        contacts,
+        phoneNumber,
+        spName,
+        number as numbers,
+        consultName,
+        consultMobile,
+        behaviorType,
+        productID,
+        accessTime,
+        accessDuration,
+        accessDate,
+        accessClient,
+        region
+        FROM cm_behavior_record_index
         <where>
-            b.IP != '106.55.202.118' AND b.accessDate = #{accessDate}
+            delFlag = 0
             <if test="behaviorType == 2">
-                AND b.behaviorType = #{behaviorType}
+                AND behaviorType = #{behaviorType}
             </if>
             <if test="IP != null and IP != ''">
-                AND b.IP = #{IP}
+                AND IP = #{IP}
             </if>
-            <if test="name != null and name != ''">
-                AND c.name = #{name} or s.name = #{name}
+            <if test="corporateName != null and corporateName != ''">
+                AND corporateName like concat('%',#{corporateName},'%')
             </if>
-            <if test="userIdentity != null and userIdentity != ''">
-                <if test="userIdentity == 2">
-                    AND u.userIdentity in (2, 4)
-                </if>
-                <if test="userIdentity == 3">
-                    AND u.userIdentity = 3
-                </if>
-                <if test="userIdentity == 1">
-                    AND  b.userID = 0
-                </if>
+            <if test="companyType != null and companyType != ''">
+                AND companyType = #{companyType}
             </if>
-            <if test="userName != null and userName != ''">
-                AND u.userName = #{userName}
+            <if test="accessClient != null and accessClient != ''">
+                AND accessClient =#{accessClient}
             </if>
-            <if test="contractMobile != null and contractMobile != ''">
-                AND (c.contractMobile = #{contractMobile} or s.contractMobile = #{contractMobile})
+            <if test="contacts != null and contacts != ''">
+                AND contacts = #{contacts}
+            </if>
+            <if test="phoneNumber != null and phoneNumber != ''">
+                AND phoneNumber = #{phoneNumber}
             </if>
             <if test="spName != null and spName != ''">
-                AND sp.name = #{spName}
+                AND spName = #{spName}
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                AND b.accessDate between #{startTime} and #{endTime}
+                AND accessDate between #{startTime} and #{endTime}
             </if>
         </where>
-        GROUP BY b.IP, b.accessDate,b.userID ORDER BY b.accessTime DESC
+        ORDER BY accessTime DESC
     </select>
 
     <select id="findListBefore" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
@@ -161,7 +154,7 @@
         LEFT JOIN product p ON b.productID = p.productID
         LEFT JOIN cm_page_type pt ON b.pageType = pt.id
         <where>
-             b.accessDate = #{accessDate}  AND b.IP != '106.55.202.118'
+             b.accessDate = #{accessDate}  AND b.IP != '106.55.202.118' AND b.delFlag = 0
             <if test="behaviorType == 2">
                 AND behaviorType = #{behaviorType}
             </if>
@@ -278,4 +271,7 @@
         GROUP BY b.pageLabel
         ORDER BY accessTime DESC
     </select>
+    <select id="selRegion" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
+        SELECT * FROM cm_behavior_record_ref WHERE IP = #{IP} AND pageType = #{pageType} AND accessTime like concat('%', #{accessTime} ,'%')
+    </select>
 </mapper>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp

@@ -1432,12 +1432,12 @@
 			<label class="control-label keyClass">状态:</label>
 			<div class="controls">
 				<form:radiobutton path="status" label="发布" value="1" checked="${empty cmBaikeProduct.status?'checked':''}"/>
-				<form:radiobutton path="status" label="保存草稿箱" value="0"/>
+				<form:radiobutton path="status" label="暂不发布" value="0"/>
 			</div>
 		</div>
 		<%--提交数据 --%>
 		<div class="form-actions">
-			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+			<input id="btnSubmit" class="btn btn-primary" type="submit" value="提 交"/>&nbsp;
 			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
 		</div>
 	</form:form>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductList.jsp

@@ -110,11 +110,11 @@
 					<c:if test="${cmBaikeProduct.status eq 1 }">
 						<font color="green">已发布</font>
 						<a href="javascript:void(0);" onclick="updateStatus(0,${cmBaikeProduct.id});" >
-							保存草稿箱
+							暂不发布
 						</a>
 					</c:if>
 					<c:if test="${cmBaikeProduct.status ne 1 }">
-						<font color="red">保存草稿箱</font>
+						<font color="red">暂不发布</font>
 						<a href="javascript:void(0)" onclick="updateStatus(1,${cmBaikeProduct.id});">
 							发布
 						</a>

+ 106 - 53
src/main/webapp/WEB-INF/views/modules/bulkpurchase/settlementRecord.jsp

@@ -51,21 +51,33 @@
             line-height: 30px;
             padding-left: 8px;
         }
-        .zeroCost .message{
-            display:none;
-            position:absolute;
-            background:#FFF;
-            white-space:nowrap;
-            border:1px solid black;
+
+        .zeroCost .message {
+            display: none;
+            position: absolute;
+            background: #FFF;
+            white-space: nowrap;
+            border: 1px solid black;
 
         }
-        .zeroCost:hover .message{
+
+        .zeroCost:hover .message {
             display: inline-block;
             color: black;
             padding: 5px;
             margin-left: 10px;
         }
-        .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
     </style>
     <script type="text/javascript">
         $(document).ready(function () {
@@ -109,7 +121,12 @@
     <c:if test="${from eq '3'}">
         <li><a href="${ctx}/shopOrder/checkPaymentOrder">订单财务信息</a></li>
     </c:if>
-    <li class="active"><a href="#">收退款记录</a></li>
+    <c:if test="${pageType==1}">
+        <li class="active"><a href="#">结算记录</a></li>
+    </c:if>
+    <c:if test="${pageType==2}">
+        <li class="active"><a href="#">分账记录</a></li>
+    </c:if>
 </ul>
 <br/>
 <table id="orderTable" class="table table-striped table-bordered table-condensed">
@@ -183,7 +200,8 @@
             </c:if>
 
             <c:if test="${order.zeroCostFlag eq 1}">
-                <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg" style="width: 15px;margin-bottom: 4px"></span>
+                <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg"
+                                                                   style="width: 15px;margin-bottom: 4px"></span>
                     <div class="message">
                         <span>商品成本为0,直接置为已付款,无需付款供应商</span>
                     </div>
@@ -191,35 +209,36 @@
             </c:if>
         </td>
         <c:if test="${order.onlinePayFlag == 0}">
+            <td>
+                结算状态:
+                <c:if test="${order.settleStatus == 1}">
+                    <font color="red">待结算</font>
+                </c:if>
+                <c:if test="${order.settleStatus == 2}">
+                    <font color="#ff8c00">部分结算</font>
+                </c:if>
+                <c:if test="${order.settleStatus == 3}">
+                    <font color="green">已结算</font>
+                </c:if>
+            </td>
+        </c:if>
         <td>
-            结算状态:
-            <c:if test="${order.settleStatus == 1}">
-                <font color="red">待结算</font>
+            <%--            退款(退货)状态:${fns:getDictLabel(order.refundType,'refundType' ,'' )}--%>
+            <c:if test="${order.refundType == 1}">
+                <font color="red">待发货</font>
             </c:if>
-            <c:if test="${order.settleStatus == 2}">
-                <font color="#ff8c00">部分结算</font>
+            <c:if test="${order.refundType == 2}">
+                <font color="#ff8c00">部分发货</font>
             </c:if>
-            <c:if test="${order.settleStatus == 3}">
-                <font color="green">已结算</font>
+            <c:if test="${order.refundType == 3}">
+                <font color="green">已发货</font>
             </c:if>
         </td>
-        </c:if>
-        <td>
-<%--            退款(退货)状态:${fns:getDictLabel(order.refundType,'refundType' ,'' )}--%>
-    <c:if test="${order.refundType == 1}">
-        <font color="red">待发货</font>
-    </c:if>
-    <c:if test="${order.refundType == 2}">
-        <font color="#ff8c00">部分发货</font>
-    </c:if>
-    <c:if test="${order.refundType == 3}">
-        <font color="green">已发货</font>
-    </c:if>
-        </td>
     </tr>
     <tr>
         <td>
-            机构:${order.bpOrderUserinfo.name}<c:if test="${order.organizeID == 3}"></c:if>
+            机构:${order.bpOrderUserinfo.name}
+            <c:if test="${order.organizeID == 3}"></c:if>
         </td>
         <td>
             收货人:${order.bpOrderUserinfo.shouHuoRen}
@@ -236,19 +255,23 @@
             订单金额:¥${order.payTotalFee}
             <c:if test="${not empty order.couponOrderRecord}">
                 <c:if test="${order.couponOrderRecord.couponType eq 0}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
+                            color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
                 </c:if>
                 <c:if test="${order.couponOrderRecord.couponType eq 1}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
+                            color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
                 </c:if>
                 <c:if test="${order.couponOrderRecord.couponType eq 2}">
                     <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
                 </c:if>
                 <c:if test="${order.couponOrderRecord.couponType eq 3}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
+                            color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
                 </c:if>
                 <c:if test="${order.couponOrderRecord.couponType eq 4}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
+                            color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
                 </c:if>
             </c:if>
             <c:if test="${not empty order.heheCouponRecord}">
@@ -295,27 +318,57 @@
         </td>
     </tr>
 </table>
-<c:if test="${not empty settleRecord}">
-    <div class="record-title">佣金结算记录:</div>
-    <table id="refundTable" class="table table-striped table-bordered table-condensed">
-        <tr>
-            <th class="table-order">序号</th>
-            <th class="table-id">子订单ID</th>
-            <th class="table-cell3">结算时间</th>
-            <th class="table-cell4">结算金额</th>
-        </tr>
-        <c:forEach items="${settleRecord}" var="settle" varStatus="s">
+<c:if test="${pageType==1}">
+    <c:if test="${not empty settleRecord}">
+        <div class="record-title">结算记录:</div>
+        <table id="refundTable" class="table table-striped table-bordered table-condensed">
             <tr>
-                <td>${s.index + 1}</td>
-                <td>${settle.shopOrderId}</td>
-                <td><fmt:formatDate value="${settle.settleTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
-                <td><fmt:formatNumber value="${settle.settleAmount}" type="currency"/></td>
+                <th class="table-order">序号</th>
+                <th class="table-id">子订单ID</th>
+                <th class="table-cell3">结算时间</th>
+                <th class="table-cell4">供应商结算金额</th>
+                <th class="table-cell4">佣金结算金额</th>
             </tr>
-        </c:forEach>
-    </table>
+            <c:forEach items="${settleRecord}" var="settle" varStatus="s">
+                <tr>
+                    <td>${s.index + 1}</td>
+                    <td>${settle.shopOrderId}</td>
+                    <td><fmt:formatDate value="${settle.settleTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+                    <td><fmt:formatNumber value="${settle.settleType ==1?settle.settleAmount:0}" type="currency"/></td>
+                    <td><fmt:formatNumber value="${settle.settleType ==2?settle.settleAmount:0}" type="currency"/></td>
+                </tr>
+            </c:forEach>
+        </table>
+    </c:if>
+    <c:if test="${empty settleRecord}">
+        <div class="record-title">结算记录: 无</div>
+    </c:if>
 </c:if>
-<c:if test="${empty settleRecord}">
-    <div class="record-title">佣金结算记录: 无</div>
+<c:if test="${pageType==2}">
+    <c:if test="${not empty splitRecord}">
+        <div class="record-title">分账记录:</div>
+        <table id="refundTable" class="table table-striped table-bordered table-condensed">
+            <tr>
+                <th class="table-order">序号</th>
+                <th class="table-id">子订单ID</th>
+                <th class="table-cell3">分账时间</th>
+                <th class="table-cell4">供应商分账金额</th>
+                <th class="table-cell5">采美分账金额</th>
+            </tr>
+            <c:forEach items="${splitRecord}" var="split" varStatus="s">
+                <tr>
+                    <td>${s.index + 1}</td>
+                    <td>${split.shopOrderId}</td>
+                    <td><fmt:formatDate value="${split.splitTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+                    <td><fmt:formatNumber value="${split.productType ==1?split.splitAccount:0}" type="currency"/></td>
+                    <td><fmt:formatNumber value="${split.productType ==3?split.splitAccount:0}" type="currency"/></td>
+                </tr>
+            </c:forEach>
+        </table>
+    </c:if>
+    <c:if test="${empty splitRecord}">
+        <div class="record-title">分账记录: 无</div>
+    </c:if>
 </c:if>
 
 <script type="text/javascript" src="${ctxStatic}/modules/bulkpurchase/loadAddress.js"></script>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/info/infoForm.jsp

@@ -123,7 +123,7 @@
 			<th><span class="red">*</span>状态:</th>
 			<td colspan="3">
 				<form:radiobutton path="enabledStatus" label="发布" value="1" checked="${empty info.enabledStatus?'checked':''}"/>
-				<form:radiobutton path="enabledStatus" label="保存草稿箱" value="0"/>
+				<form:radiobutton path="enabledStatus" label="暂不发布" value="0"/>
 			</td>
 		</tr>
 		<tr>
@@ -157,7 +157,7 @@
 		<tr>
 			<td colspan="4" style="text-align:center;">
 				<shiro:hasPermission name="info:info:edit">
-					<input id="btnSave" class="btn btn-primary" type="submit" value="保 存" onclick="checkInfo()"/>
+					<input id="btnSave" class="btn btn-primary" type="submit" value="提 交" onclick="checkInfo()"/>
 				</shiro:hasPermission>
 				<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
 			</td>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/info/infoList.jsp

@@ -281,11 +281,11 @@
 				<td>
 					<c:if test="${info.enabledStatus eq 1 }">
 						<font color="green">已发布</font>
-						<a href="javascript:void(0)" onclick="updateStatus('0','${info.id}','enabledStatus','${info.enabledStatus}');" style="cursor: pointer">保存草稿箱
+						<a href="javascript:void(0)" onclick="updateStatus('0','${info.id}','enabledStatus','${info.enabledStatus}');" style="cursor: pointer">暂不发布
 						</a>
 					</c:if>
 					<c:if test="${info.enabledStatus ne 1 }">
-						<font color="red">保存草稿箱</font>
+						<font color="red">暂不发布</font>
 						<a href="javascript:void(0)" onclick="updateStatus('1','${info.id}','enabledStatus','${info.enabledStatus}');" style="cursor: pointer">发布
 						</a>
 					</c:if>

+ 4 - 1
src/main/webapp/WEB-INF/views/modules/order/checkPaymentOrder.jsp

@@ -678,8 +678,11 @@
                 </c:forEach>
             </table>
             <div style="float:right">
+                <c:if test="${s.splitCount>0}">
+                    <a href="${ctx}/bulkpurchase/cmRefundsProduct/toSettleRecord?orderID=${s.orderID}&pageType=2">分账记录</a>
+                </c:if>
                 <c:if test="${s.settleRecordNum>0}">
-                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toSettleRecord?orderID=${s.orderID}">佣金结算记录</a>
+                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toSettleRecord?orderID=${s.orderID}&pageType=1">结算记录</a>
                 </c:if>
                 <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord?orderID=${s.orderID}&from=3">收付款记录</a>&nbsp;&nbsp;&nbsp;
                 <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID?orderID=${s.orderID}&from=3">用户退款/货记录</a>&nbsp;&nbsp;&nbsp;

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp

@@ -379,7 +379,7 @@
                                 已付款
                             </c:if>
                             <c:if test="${s.paying ne '1' && s.payStatus ne '3' }">
-                                <input type="checkbox" ${s.status eq 7 || (s.onlineFlag>0 && s.splitCode ne 'E1807059160') ?'disabled':''}
+                                <input type="checkbox" ${s.status eq 7 ?'disabled':''}
                                        data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}" data-isPayShopOtherFee="${s.payShopOtherFee}"/>
                             </c:if>
                         </c:if>

+ 22 - 5
src/main/webapp/WEB-INF/views/modules/order/cmSettlementList.jsp

@@ -344,7 +344,7 @@
             <table class="table table-striped table-bordered table-condensed pay-table">
                 <tr>
                     <th style="width:20px;">
-                        <input type="checkbox" class="checkShop" data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}" data-isPayShopOtherFee="${s.payShopOtherFee}" onclick="changeCheck()"/>
+                        <input type="checkbox" class="checkShop" data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}" data-isPayShopOtherFee="${s.payShopOtherFee}" onclick="changeCheck(this)"/>
                     </th>
                     <th>子订单编号(ID)</th>
                     <th colspan="3">订单编号(ID)</th>
@@ -623,11 +623,12 @@
 <div class="pagination">${page}</div>
 
 <script>
-    function changeCheck(){
+    function changeCheck(el){
         var checked = $('input[type=checkbox]:checked');
-        if (checked.length >= 1) {
+        if (checked.length > 1) {
             // $(".checkShop").attr('disabled','true');
             alertx("请最多选择一个子订单进行结算");
+            $(el).prop('checked',false);
             return false;
         }
     }
@@ -819,10 +820,11 @@
         });
 
         $('#apply').on('click', function () {
+            var shopOrderId='';
             var checked = $('.pay-wrapper input[type=checkbox]:checked'), params = '?';
             for (var i = 0; i < checked.length; i++) {
-                var shoporderId = $(checked[i]).attr('data-shoporderid');
-                params += ('&shopOrderIDs=' + shoporderId);
+                shopOrderId = $(checked[i]).attr('data-shoporderid');
+                params += ('&shopOrderIDs=' + shopOrderId);
             }
             if (checked.length < 1 || params == '?') {
                 alertx('请至少选择一个订单');
@@ -832,6 +834,21 @@
                 alertx('每次只能选择一个子订单进行结算申请');
                 return false;
             }
+            var flag=0;
+            debugger;
+            $.ajax({
+                url: "${ctx}/order/cmPayShop/settleTime",
+                data: {"shopOrderId":shopOrderId},
+                type: "POST",
+                async: false,
+                success: function(data){
+                    flag=data.flag;
+                }
+            });
+            if(flag===1){
+                alertx('该子订单暂未到结算时间,请于T+1后的工作日再申请结算(T指子订单分账时间)');
+                return false;
+            }
             window.location.href = '${ctx}/order/cmPayShop/settleEdit' + params;
         });
 

+ 57 - 36
src/main/webapp/WEB-INF/views/modules/order/cmSplitAccountList.jsp

@@ -305,16 +305,20 @@
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="pay-status">
-        <span style="color: red">点击右侧分账按钮,可将以下展示的所有子订单金额进行分账,将佣金分账给采美。 </span>
-        <input id="btnSubmit" class="btn btn-primary" type="submit" onclick="return confirmx('确定将展示的子订单全部分账吗?', '${ctx}/splitAccount/split')" value="手动分账"/>
+        <span style="color: red">每次选择一个子订单申请分账,系统将佣金分账给采美,付供应商的金额依然还在合利宝账户,需要再进行手动结算。 </span>
+<%--        <input id="btnSubmit" class="btn btn-primary" type="submit" onclick="return confirmx('确定将展示的子订单全部分账吗?', '${ctx}/splitAccount/split')" value="手动分账"/>--%>
     </div>
 </form:form>
 <sys:message content="${message}"/>
 <div class="pay-wrapper">
+    <button id="apply" class="t-btn" style="color:white;background-color:#2F6FAB">申请分账</button>
     <c:forEach items="${page.list}" var="s" varStatus="sIndex">
         <div class="pay-list-item">
             <table class="table table-striped table-bordered table-condensed pay-table">
                 <tr>
+                    <th style="width:20px;" rowspan="6">
+                        <input type="checkbox" class="checkShop" data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}" onclick="changeCheck(this)"/>
+                    </th>
                     <th>子订单编号(ID)</th>
                     <th colspan="3">订单编号(ID)</th>
                     <th colspan="2">订单金额</th>
@@ -504,25 +508,25 @@
                     </tr>
                 </c:forEach>
             </table>
-            <div class="pay-more-func">
-                <c:if test="${s.paying ne '1' and s.payStatus eq '1' and !s.modifyPayable}">
-                    <shiro:hasPermission name="order:cmPayShop:modifyPay">
-                        <a href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改成本</a>
-                    </shiro:hasPermission>
-                </c:if>
-                <c:if test="${(s.modifyPayable and s.paying ne '1') || s.payStatus eq '2'}">
-                    <a href="${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=${s.shopOrderID}">供应商差价</a>
-                </c:if>
-                <c:if test="${s.paying ne '1' and s.payStatus eq '2'}">
-                    <c:if test="${!s.modifyPayable || s.receiptStatus eq '3'}">
-                        <shiro:hasPermission name="order:cmPayShop:modifyPay">
-                            <a href="${ctx}/shopOrder/toApplyPayWipe?shopOrderID=${s.shopOrderID}">付款抹平</a>
-                        </shiro:hasPermission>
-                    </c:if>
-                </c:if>
-                <a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${s.shopOrderID}">应付备注</a>
-                <a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=${operatingMode}">退/付款记录</a>
-            </div>
+<%--            <div class="pay-more-func">--%>
+<%--                <c:if test="${s.paying ne '1' and s.payStatus eq '1' and !s.modifyPayable}">--%>
+<%--                    <shiro:hasPermission name="order:cmPayShop:modifyPay">--%>
+<%--                        <a href="${ctx}/shopOrder/toChangePayShopAmount?shopOrderID=${s.shopOrderID}">修改成本</a>--%>
+<%--                    </shiro:hasPermission>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${(s.modifyPayable and s.paying ne '1') || s.payStatus eq '2'}">--%>
+<%--                    <a href="${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=${s.shopOrderID}">供应商差价</a>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${s.paying ne '1' and s.payStatus eq '2'}">--%>
+<%--                    <c:if test="${!s.modifyPayable || s.receiptStatus eq '3'}">--%>
+<%--                        <shiro:hasPermission name="order:cmPayShop:modifyPay">--%>
+<%--                            <a href="${ctx}/shopOrder/toApplyPayWipe?shopOrderID=${s.shopOrderID}">付款抹平</a>--%>
+<%--                        </shiro:hasPermission>--%>
+<%--                    </c:if>--%>
+<%--                </c:if>--%>
+<%--                <a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${s.shopOrderID}">应付备注</a>--%>
+<%--                <a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=${operatingMode}">退/付款记录</a>--%>
+<%--            </div>--%>
         </div>
     </c:forEach>
 </div>
@@ -610,6 +614,16 @@
     <p style="text-align: center;"><font color="#1e90ff">暂无待分账子订单……</font></p>
 </c:if>
 <script>
+    function changeCheck(el){
+        var checked = $('input[type=checkbox]:checked');
+        if (checked.length > 1) {
+            // $(".checkShop").attr('disabled','true');
+            alertx("请最多选择一个子订单进行分账");
+            $(el).prop('checked',false);
+            return false;
+        }
+    }
+
     (function () {
         var payTableEle = $('.pay-table'),
             payProductEle = $('.pay-product-item');
@@ -798,22 +812,29 @@
         });
 
         $('#apply').on('click', function () {
-            var checked = $('.pay-wrapper input[type=checkbox]:checked'), params = '?';
-            for (var i = 0; i < checked.length; i++) {
-                var shoporderId = $(checked[i]).attr('data-shoporderid');
-                params += ('&shopOrderIDs=' + shoporderId);
-                var receiptStatus = $(checked[i]).attr('data-receiptStatus');
-                var modifyPayable = $(checked[i]).attr('data-modifyPayable');
-                if (modifyPayable && "3" != receiptStatus) {
-                    alertx('存在母订单线上支付尚未完成的情况,子订单(' + shoporderId + ')不能申请付款');
-                    return false;
+            top.$.jBox.confirm('确定对该子订单申请分账吗?','系统提示',function(v,h,f){
+                if(v=="ok"){
+                    var checked = $('.pay-wrapper input[type=checkbox]:checked'), params = '?';
+                    for (var i = 0; i < checked.length; i++) {
+                        var shoporderId = $(checked[i]).attr('data-shoporderid');
+                        params += ('&shopOrderIDs=' + shoporderId);
+                        var receiptStatus = $(checked[i]).attr('data-receiptStatus');
+                        var modifyPayable = $(checked[i]).attr('data-modifyPayable');
+                        if (modifyPayable && "3" != receiptStatus) {
+                            alertx('存在母订单线上支付尚未完成的情况,子订单(' + shoporderId + ')不能申请付款');
+                            return false;
+                        }
+                    }
+                    if (checked.length < 1 || params == '?') {
+                        alertx('请至少选择一个订单');
+                        return false;
+                    }
+                    window.location.href = '${ctx}/order/cmPayShop/splitEdit' + params;
                 }
-            }
-            if (checked.length < 1 || params == '?') {
-                alertx('请至少选择一个订单');
-                return false;
-            }
-            window.location.href = '${ctx}/order/cmPayShop/applyEdit' + params;
+            });
+
+
+
         });
 
         //付第三方

+ 7 - 7
src/main/webapp/WEB-INF/views/modules/user/behaviorNewOrder.jsp

@@ -41,20 +41,20 @@
     <c:if test="${cmBehaviorRecord.behaviorType eq '1'}">
         <li><a href="${ctx}/user/behavior/record/list?behaviorType=${cmBehaviorRecord.behaviorType}">用户行为记录</a></li>
     </c:if>
-    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
+    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
 
 </ul>
 <sys:message content="${message}"/>
-<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="ul-form">
         <ul class="nav nav-tabs">
-            <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
-            <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
-            <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
-            <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
-            <li class="active"><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
+            <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
+            <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
+            <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
+            <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
+            <li class="active"><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
         </ul>
     </div>
 </form:form>

+ 18 - 115
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordAgency.jsp

@@ -172,16 +172,16 @@
     <c:if test="${cmBehaviorRecord.behaviorType eq '1'}">
         <li><a href="${ctx}/user/behavior/record/list?behaviorType=${cmBehaviorRecord.behaviorType}">用户行为记录</a></li>
     </c:if>
-    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
+    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
 
 </ul>
 <div class="ul-form">
     <ul class="nav nav-tabs">
-        <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
-        <li class="active"><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
-        <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
-        <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
-        <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
+        <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
+        <li class="active"><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
+        <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
+        <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
+        <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
     </ul>
 </div>
 <form:form id="inputForm" modelAttribute="cmClubinfo" action="#" method="post"
@@ -235,18 +235,16 @@
                     <label class="control-label"><b>地址:</b></label>
                     <div class="controls">
                         <form:select path="provinceID" class="input-xlarge" id="province"
-                                     onchange="loadCity()" style="width:100px;">
+                                     onchange="loadCity()" disabled="true" style="width:100px;">
                             <form:option value="" label="省" provinceId=""/>
                         </form:select>
-                        <form:select path="cityID" class="input-xlarge" id="city" onchange="loadTown()"
+                        <form:select path="cityID" class="input-xlarge" id="city" onchange="loadTown()" disabled="true"
                                      style="width:100px;">
                             <form:option value="" label="市" cityId=""/>
                         </form:select>
-                        <form:select path="townID" class="input-xlarge" id="town" style="width:100px;">
+                        <form:select path="townID" class="input-xlarge" id="town" disabled="true" style="width:100px;">
                             <form:option value="" label="区"/>
                         </form:select>
-                        <%--<form:input path="address" id="address" name="address" class="input-xlarge userAddress" width="20px" maxlength="60"
-                                    placeholder="请填写会所详细的地址"/>--%>
                         ${newCmClub.address}
                     </div>
                 </div>
@@ -265,23 +263,12 @@
                 <div class="control-group">
                     <label class="control-label"><b>营业执照:</b></label>
                     <img width="100" height="100" src="${newCmClub.businessLicenseImage}">
-                    <%--<div class="controls">
-                        <form:hidden id="businessLicenseImage" name="businessLicenseImage" path="businessLicenseImage" htmlEscape="false"
-                                     maxlength="255" class="input-xlarge required"/>
-                        <sys:ckfinder input="businessLicenseImage" type="images" uploadPath="/photo"
-                                      selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                    </div>--%>
                 </div>
             </td>
             <td>
                 <div class="control-group">
                     <label class="control-label"><b>门头照:</b></label>
                     <img width="100" height="100" src="${newCmClub.headpic}">
-                    <%--<div class="controls">
-                        <form:hidden id="headpic" name="headpic" path="headpic" htmlEscape="false" maxlength="255"
-                                     class="input-xlarge"/>
-                        <sys:ckfinder input="headpic" type="images" uploadPath="/photo" maxWidth="100" maxHeight="100"/>
-                    </div>--%>
                 </div>
             </td>
         </tr>
@@ -305,67 +292,11 @@
                             <c:if test="${cmClubinfo.secondClubType eq '5'}"> - 美容院</c:if>
                             <c:if test="${cmClubinfo.secondClubType eq '6'}"> - 养生馆</c:if>
                             <c:if test="${cmClubinfo.secondClubType eq '7'}"> - 其他</c:if>
-<%--                            <input name="firstClubType" value="1" type="radio" ${cmClubinfo.firstClubType == "1" ? "checked" : ""}/>医美--%>
                         </div>
-                        <%--<div class="raw-beauty">
-                            <input name="firstClubType" value="2" type="radio" ${cmClubinfo.firstClubType == "2" ? "checked" : ""}/>生美
-                        </div>
-                        <div class="raw-beauty">
-                            <input name="firstClubType" value="3" type="radio" ${cmClubinfo.firstClubType == "3" ? "checked" : ""}/>项目公司
-                        </div>
-                        <div class="raw-beauty">
-                            <input name="firstClubType" value="4" type="radio" ${cmClubinfo.firstClubType == "4" ? "checked" : ""}/>个人
-                        </div>
-                        <div class="raw-beauty">
-                            <input name="firstClubType" value="5" type="radio" ${cmClubinfo.firstClubType == "5" ? "checked" : ""}/>其他
-                        </div>--%>
                     </div>
-                    <span class="err-tip"></span>
-                    <div class="med-option the-oradio" style="display: none" id="ejf">
-                        <div class="med-beauty">
-                            <%--<c:if test="${cmClubinfo.secondClubType eq '1'}">-诊所</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '2'}">-门诊</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '3'}">-医院</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '4'}">-其他</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '5'}">-美容院</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '6'}">-养生馆</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '7'}">-其他</c:if>--%>
-<%--                            <input name="secondClubType" value="1"--%>
-<%--                                                       type="radio"  ${cmClubinfo.secondClubType == "1" ? "checked" : ""}/>诊所--%>
-                        </div>
-                        <%--<div class="med-beauty"><input name="secondClubType" value="2"
-                                                       type="radio"  ${cmClubinfo.secondClubType == "2" ? "checked" : ""}/>门诊
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="3"
-                                                       type="radio" ${cmClubinfo.secondClubType == "3" ? "checked" : ""}/>医院
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="4"
-                                                       type="radio" ${cmClubinfo.secondClubType == "4" ? "checked" : ""}/>其他
-                        </div>
-                        <span class="err-tip"></span>--%>
-                    </div>
-                    <%--<div class="raw-option the-oradio" style="display: none" id="ej">
-                        <div class="med-beauty"><input name="secondClubType" value="5"
-                                                       type="radio"  ${cmClubinfo.secondClubType == "5" ? "checked" : ""}/>美容院
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="6"
-                                                       type="radio"  ${cmClubinfo.secondClubType == "6" ? "checked" : ""}/>养生馆
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="7"
-                                                       type="radio" ${cmClubinfo.secondClubType == "7" ? "checked" : ""}/>其他
-                        </div>
-                        <span class="err-tip"></span>
-                    </div>--%>
                     <div class="qualification control-group" style="display: none">
                         <label class="control-label"><b>医疗许可证:</b></label>
                         <img width="100" height="100" src="${cmClubinfo.medicalPracticeLicenseImg}">
-                        <%--<div class="controls" style="margin-bottom: 10px">
-                            <form:hidden id="medicalPracticeLicenseImg" path="medicalPracticeLicenseImg"
-                                         htmlEscape="false" maxlength="255"
-                                         class="input-xlarge"/>
-                            <sys:ckfinder input="medicalPracticeLicenseImg" type="images" uploadPath="/photo"
-                                          maxWidth="100" maxHeight="100"/>
-                        </div>--%>
                     </div>
                 </div>
                 <div class="control-group epart" style="display: none">
@@ -377,10 +308,7 @@
                 </div>
                 <div class="control-group" >
                     <label class="control-label"><b>主营内容:</b></label>
-<%--                    <div class="tags-area" id="clubArea"></div>--%>
-<%--                    <span class="err-tip" style="display: inline-block;margin-left:-55px;"></span>--%>
                     <font size="3">${cmClubinfo.mainpro}</font>
-<%--                    <input type="hidden" name="mainpro" value="${cmClubinfo.mainpro}" id="cMainPro">--%>
                 </div>
             </td>
         </tr>
@@ -421,20 +349,17 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>机构面积:</th>
-                    <td>${cmClubinfo.area}<%--<form:input path="area" name="area" htmlEscape="false" class="input-medium" onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.area}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>美容床数:</th>
-                    <td>${cmClubinfo.bedNums}<%--<form:input path="bedNums" name="bedNums" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
-                            <%--<input type="text" name="bedNums" value="${clubInfo.bedNums}">--%>
+                    <td>${cmClubinfo.bedNums}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>美容师数:</th>
-                    <td>${cmClubinfo.beauticians}<%--<form:input path="beauticians" name="beauticians" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
+                    <td>${cmClubinfo.beauticians}
                     </td>
                 </tr>
             </table>
@@ -444,20 +369,17 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>月业绩:</th>
-                    <td>${cmClubinfo.monthAchievement}<%--<form:input path="monthAchievement" name="monthAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.monthAchievement}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>促销业绩:</th>
-                    <td>${cmClubinfo.promotionAchievement}<%--<form:input path="promotionAchievement" name="promotionAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.promotionAchievement}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>年业绩:</th>
-                    <td>${cmClubinfo.yearAchievement}<%--<form:input path="yearAchievement" name="yearAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.yearAchievement}
                     </td>
                 </tr>
             </table>
@@ -467,26 +389,17 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>A类会员:</th>
-                    <td colspan="3" style="padding-top: 6px;">
-                        <%--<form:input path="cateA" name="cateA" htmlEscape="false" maxlength="11" class="cut-input-medium"
-                                    onkeyup="int(this)"/>--%>${cmClubinfo.cateA}人&nbsp;
-                        <%--<form:input path="consumeA" name="consumeA" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>--%>${cmClubinfo.consumeA}元
+                    <td colspan="3" style="padding-top: 6px;">${cmClubinfo.cateA}人&nbsp;${cmClubinfo.consumeA}元
                     </td>
                 </tr>
                 <tr height="28">
                     <th>B类会员:</th>
-                    <td colspan="3" style="padding-top: 6px;">
-                        <%--<form:input path="cateB" name="cateB"  htmlEscape="false" maxlength="11" class="cut-input-medium"
-                                    onkeyup="int(this)"/>--%>${cmClubinfo.cateB}人&nbsp;
-                        <%--<form:input path="consumeB" name="consumeB" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>--%>${cmClubinfo.consumeB}元
+                    <td colspan="3" style="padding-top: 6px;">${cmClubinfo.cateB}人&nbsp;${cmClubinfo.consumeB}元
                     </td>
                 </tr>
                 <tr height="28">
                     <th>C类会员:</th>
-                    <td colspan="3" style="padding-top: 6px;">
-                        <%--<form:input path="cateC" name="cateC" htmlEscape="false" maxlength="11" class="cut-input-medium"
-                                    onkeyup="int(this)"/>--%>${cmClubinfo.cateC}人&nbsp;
-                        <%--<form:input path="consumeC" name="consumeC" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>--%>${cmClubinfo.consumeC}元
+                    <td colspan="3" style="padding-top: 6px;">${cmClubinfo.cateC}人&nbsp;${cmClubinfo.consumeC}元
                     </td>
                 </tr>
             </table>
@@ -497,22 +410,16 @@
                 <tr height="28">
                     <th>最高业绩:</th>
                     <td>${cmClubinfo.highestAchievement}
-                        <%--<form:input path="highestAchievement" name="highestAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>到店人数:</th>
                     <td>${cmClubinfo.reachPepole}
-                        <%--<form:input path="reachPepole" name="reachPepole" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>成交人数:</th>
                     <td>${cmClubinfo.clinchPepole}
-                        <%--<form:input path="clinchPepole" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
                     </td>
                 </tr>
             </table>
@@ -521,13 +428,9 @@
             <tr height="28">
                 <th>店内所经营品牌及推广优势:</th>
                 <td colspan="10" width="25%">${cmClubinfo.brandSuperiority}
-                    <%--<form:textarea rows="7" cols="80" path="brandSuperiority" htmlEscape="false" cssStyle="width:90%;"
-                                   maxlength="200"/>--%>
                 </td>
                 <th>临近一次促销的模式及达成业绩:</th>
                 <td colspan="10" width="25%">${cmClubinfo.lastPromotion}
-                    <%--<form:textarea rows="7" cols="80" path="lastPromotion" htmlEscape="false" cssStyle="width:90%;"
-                                   maxlength="200"/>--%>
                 </td>
             </tr>
         </table>

+ 7 - 19
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordDetailsList.jsp

@@ -33,17 +33,17 @@
     <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
 
 </ul>
-<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}" 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}"/>
-    <c:if test="${cmBehaviorRecord.userIdentity == '2' or cmBehaviorRecord.userIdentity == '4'}">
+    <c:if test="${cmBehaviorRecord.companyType == '2'}">
         <div class="ul-form">
             <ul class="nav nav-tabs">
                 <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
-                <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
-                <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
-                <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
-                <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
+                <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
+                <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
+                <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
+                <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
             </ul>
         </div>
     </c:if>
@@ -54,7 +54,6 @@
     <tr>
         <th style="width: 350px;">页面路径</th>
         <th>访问来源</th>
-        <th>访问客户端</th>
         <th>页面类型</th>
         <th>页面标签</th>
         <th>商品图片</th>
@@ -76,7 +75,7 @@
                 </c:if>
             </td>
             <td>
-                <c:if test="${cmBehaviorRecord.accessSource == '0'}">
+                <c:if test="${cmBehaviorRecord.accessSource == '0' || cmBehaviorRecord.accessSource == '7'}">
                     直接访问
                 </c:if>
                 <c:if test="${cmBehaviorRecord.accessSource == '1'}">
@@ -97,17 +96,6 @@
                 <c:if test="${cmBehaviorRecord.accessSource == '6'}">
                     搜狗搜索
                 </c:if>
-                <c:if test="${cmBehaviorRecord.accessSource == '7'}">
-                    直接访问
-                </c:if>
-            </td>
-            <td>
-                <c:if test="${cmBehaviorRecord.accessClient == '0'}">
-                    网站
-                </c:if>
-                <c:if test="${cmBehaviorRecord.accessClient == '1'}">
-                    小程序
-                </c:if>
             </td>
             <td>${cmBehaviorRecord.pageTypes}</td>
             <td>${cmBehaviorRecord.pageLabel}</td>

+ 27 - 30
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordList.jsp

@@ -44,18 +44,24 @@
         <label>IP:</label>
             <form:input path="IP" htmlEscape="false" maxlength="15" cssStyle="width: 150px" class="input-mini"/>
         <label>公司名称:</label>
-            <form:input path="name" htmlEscape="false" cssStyle="width: 150px" class="input-mini"/>
+            <form:input path="corporateName" htmlEscape="false" cssStyle="width: 150px" class="input-mini"/>
         <label>公司类型:</label>
-            <form:select path="userIdentity" cssStyle="width: 150px" class="input-medium required">
+            <form:select path="companyType" cssStyle="width: 150px" class="input-medium required">
                 <form:option value="" label="请选择"/>
                 <form:option value="2" label="机构"/>
                 <form:option value="3" label="供应商"/>
                 <form:option value="1" label="游客"/>
             </form:select>
+        <label>访问客户端</label>
+        <form:select path="accessClient" cssStyle="width: 150px" class="input-medium required">
+            <form:option value="" label="请选择"/>
+            <form:option value="0" label="网站"/>
+            <form:option value="1" label="小程序"/>
+        </form:select>
         <label>联系人:</label>
-            <form:input path="userName" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
+            <form:input path="contacts" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
         <label>手机号码:</label>
-            <form:input path="contractMobile" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
+            <form:input path="phoneNumber" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
         <label>协销:</label>
             <form:input path="spName" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
         <div class="ys-kin" style="margin-top: 20px">
@@ -77,6 +83,7 @@
         <tr>
             <th>IP</th>
             <th>地区</th>
+            <th>访问客户端</th>
             <th>公司类型</th>
             <th>公司名称</th>
             <th>联系人</th>
@@ -101,17 +108,25 @@
                 ${cmBehaviorRecord.region}
             </c:if>
             </td>
+            <td>
+                <c:if test="${cmBehaviorRecord.accessClient == '0'}">
+                    网站
+                </c:if>
+                <c:if test="${cmBehaviorRecord.accessClient == '1'}">
+                    小程序
+                </c:if>
+            </td>
            <td>
-               <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
+               <c:if test="${cmBehaviorRecord.companyType eq 2}">
                    机构
                </c:if>
-               <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
+               <c:if test="${cmBehaviorRecord.companyType eq 3}">
                    供应商
                </c:if>
-               <c:if test="${cmBehaviorRecord.userID == '0'}">
+               <c:if test="${cmBehaviorRecord.companyType == 1}">
                    游客
                </c:if>
-               <c:if test="${cmBehaviorRecord.userID != '0' && (cmBehaviorRecord.userIdentity == null || cmBehaviorRecord.userIdentity == '')}">
+               <c:if test="${cmBehaviorRecord.userID != '0' && (cmBehaviorRecord.companyType == null || cmBehaviorRecord.companyType == '')}">
                    ---
                </c:if>
            </td>
@@ -123,31 +138,13 @@
             </c:if>
             <c:if test="${cmBehaviorRecord.userID != '0'}">
                <td>
-                   <c:if test="${cmBehaviorRecord.userIdentity eq 2}">
-                       ${cmBehaviorRecord.name}
-                   </c:if>
-                   <c:if test="${cmBehaviorRecord.userIdentity eq 4}">
-                       <c:if test="${cmBehaviorRecord.name ne cmBehaviorRecord.userName}">
-                           ${cmBehaviorRecord.name}
-                       </c:if>
-                       <c:if test="${cmBehaviorRecord.name eq cmBehaviorRecord.userName}">
-                           ---
-                       </c:if>
-                   </c:if>
-                   <c:if test="${cmBehaviorRecord.sname ne null || cmBehaviorRecord.sname eq ''}">
-                       ${cmBehaviorRecord.sname}
-                   </c:if>
+                   ${cmBehaviorRecord.corporateName}
                </td>
                <td>
-                   ${cmBehaviorRecord.userName}
+                   ${cmBehaviorRecord.contacts}
                </td>
                <td>
-                   <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
-                       ${cmBehaviorRecord.contractMobile}
-                   </c:if>
-                   <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
-                       ${cmBehaviorRecord.scontractMobile}
-                   </c:if>
+                   ${cmBehaviorRecord.phoneNumber}
                </td>
                <td>
                    <c:if test="${cmBehaviorRecord.spName ne null}">
@@ -163,7 +160,7 @@
            <td>${cmBehaviorRecord.accessDate}</td>
            <td>${cmBehaviorRecord.lastAccessTime}</td>
            <td>
-               <a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=1">查看详情</a>
+               <a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=1">查看详情</a>
            </td>
         </tr>
     </c:forEach>

+ 27 - 30
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordRossList.jsp

@@ -44,18 +44,24 @@
         <label>IP:</label>
         <form:input path="IP" htmlEscape="false" maxlength="15" cssStyle="width: 150px" class="input-mini"/>
         <label>公司名称:</label>
-        <form:input path="name" htmlEscape="false" maxlength="11" cssStyle="width: 150px" class="input-mini"/>
+        <form:input path="corporateName" htmlEscape="false" cssStyle="width: 150px" class="input-mini"/>
         <label>公司类型:</label>
-        <form:select path="userIdentity" cssStyle="width: 150px" class="input-medium required">
+        <form:select path="companyType" cssStyle="width: 150px" class="input-medium required">
             <form:option value="" label="请选择"/>
             <form:option value="2" label="机构"/>
             <form:option value="3" label="供应商"/>
             <form:option value="1" label="游客"/>
         </form:select>
+        <label>访问客户端</label>
+        <form:select path="accessClient" cssStyle="width: 150px" class="input-medium required">
+            <form:option value="" label="请选择"/>
+            <form:option value="0" label="网站"/>
+            <form:option value="1" label="小程序"/>
+        </form:select>
         <label>联系人:</label>
-        <form:input path="linkMan" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
+        <form:input path="contacts" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
         <label>手机号码:</label>
-        <form:input path="contractMobile" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
+        <form:input path="phoneNumber" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
         <label>协销:</label>
         <form:input path="spName" htmlEscape="false" maxlength="20" cssStyle="width: 150px" class="input-small"/>
         <div class="ys-kin" style="margin-top: 20px">
@@ -77,6 +83,7 @@
     <tr>
         <th>IP</th>
         <th>地区</th>
+        <th>访问客户端</th>
         <th>公司类型</th>
         <th>公司名称</th>
         <th>联系人</th>
@@ -103,16 +110,24 @@
                 </c:if>
             </td>
             <td>
-                <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
+                <c:if test="${cmBehaviorRecord.accessClient == '0'}">
+                    网站
+                </c:if>
+                <c:if test="${cmBehaviorRecord.accessClient == '1'}">
+                    小程序
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${cmBehaviorRecord.companyType eq 2}">
                     机构
                 </c:if>
-                <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
+                <c:if test="${cmBehaviorRecord.companyType eq 3}">
                     供应商
                 </c:if>
-                <c:if test="${cmBehaviorRecord.userID == '0'}">
+                <c:if test="${cmBehaviorRecord.companyType == 1}">
                     游客
                 </c:if>
-                <c:if test="${cmBehaviorRecord.userID != '0' && (cmBehaviorRecord.userIdentity == null || cmBehaviorRecord.userIdentity == '')}">
+                <c:if test="${cmBehaviorRecord.userID != '0' && (cmBehaviorRecord.companyType == null || cmBehaviorRecord.companyType == '')}">
                     ---
                 </c:if>
             </td>
@@ -124,31 +139,13 @@
             </c:if>
             <c:if test="${cmBehaviorRecord.userID != '0'}">
                 <td>
-                    <c:if test="${cmBehaviorRecord.userIdentity eq 2}">
-                        ${cmBehaviorRecord.cSname}
-                    </c:if>
-                    <c:if test="${cmBehaviorRecord.userIdentity eq 4}">
-                        <c:if test="${cmBehaviorRecord.cSname ne cmBehaviorRecord.userName}">
-                            ${cmBehaviorRecord.cSname}
-                        </c:if>
-                        <c:if test="${cmBehaviorRecord.cSname eq cmBehaviorRecord.userName}">
-                            ---
-                        </c:if>
-                    </c:if>
-                    <c:if test="${cmBehaviorRecord.sname ne null || cmBehaviorRecord.sname eq ''}">
-                        ${cmBehaviorRecord.sname}
-                    </c:if>
+                        ${cmBehaviorRecord.corporateName}
                 </td>
                 <td>
-                        ${cmBehaviorRecord.userName}
+                        ${cmBehaviorRecord.contacts}
                 </td>
                 <td>
-                    <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
-                        ${cmBehaviorRecord.contractMobile}
-                    </c:if>
-                    <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
-                        ${cmBehaviorRecord.scontractMobile}
-                    </c:if>
+                        ${cmBehaviorRecord.phoneNumber}
                 </td>
                 <td>
                     <c:if test="${cmBehaviorRecord.spName ne null}">
@@ -178,7 +175,7 @@
             <td>${cmBehaviorRecord.accessDuration}</td>
             <td>${cmBehaviorRecord.accessDate}</td>
             <td>
-                <a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=2">查看详情</a>
+                <a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=2">查看详情</a>
             </td>
         </tr>
     </c:forEach>

+ 7 - 7
src/main/webapp/WEB-INF/views/modules/user/behaviorRemarks.jsp

@@ -25,19 +25,19 @@
     <c:if test="${cmBehaviorRecord.behaviorType eq '1'}">
         <li><a href="${ctx}/user/behavior/record/list?behaviorType=${cmBehaviorRecord.behaviorType}">用户行为记录</a></li>
     </c:if>
-    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
+    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
 </ul>
 <br/>
-<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="ul-form">
         <ul class="nav nav-tabs">
-            <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
-            <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
-            <li class="active"><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
-            <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
-            <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
+            <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
+            <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
+            <li class="active"><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
+            <li><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
+            <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
         </ul>
     </div>
 </form:form>

+ 7 - 7
src/main/webapp/WEB-INF/views/modules/user/behaviorReport.jsp

@@ -257,19 +257,19 @@
     <c:if test="${cmBehaviorRecord.behaviorType eq '1'}">
         <li><a href="${ctx}/user/behavior/record/list?behaviorType=${cmBehaviorRecord.behaviorType}">用户行为记录</a></li>
     </c:if>
-    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
+    <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
 
 </ul>
-<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="ul-form">
         <ul class="nav nav-tabs">
-            <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
-            <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
-            <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
-            <li class="active"><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
-            <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&userIdentity=${cmBehaviorRecord.userIdentity}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
+            <li><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">访问详情</a></li>
+            <li><a href="${ctx}/user/behavior/record/recordAgency?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">机构信息</a></li>
+            <li><a href="${ctx}/user/behavior/record/behaviorRemarks?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">咨询记录</a></li>
+            <li class="active"><a href="${ctx}/user/behavior/record/behaviorReport?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">报备记录</a></li>
+            <li><a href="${ctx}/user/behavior/record/behaviorNewOrder?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&clubID=${cmBehaviorRecord.clubID}&companyType=${cmBehaviorRecord.companyType}&behaviorType=${cmBehaviorRecord.behaviorType}">订单信息</a></li>
         </ul>
     </div>
 </form:form>

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

@@ -128,7 +128,7 @@
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>描述:</label>
             <textarea id='describe' <c:if test="${empty describe}">placeholder="请输入该用户的行为信息,例如查看了什么商品或者文章,以及任何需要销售人员注意的信息"</c:if>
-					  name='describe' rows='5' cols='12' style="width: 700px" maxlength="200"><c:if test="${not empty describe}">${describe}</c:if><c:if test="${masBehavior ne ''}">,${masBehavior}</c:if></textarea>
+					  name='describe' rows='5' cols='12' style="width: 700px" maxlength="500"><c:if test="${not empty describe}">${describe}</c:if><c:if test="${masBehavior ne ''}">,${masBehavior}</c:if></textarea>
 			<textarea hidden id="masBehavior" path="masBehavior"  name="masBehavior" style="width: 700px; visibility: hidden" maxlength="200"><c:if test="${masBehavior ne ''}">,${masBehavior}</c:if></textarea>
 		</div><%--<c:if test="${masBehavior ne ''}">,${masBehavior}</c:if>--%>