ganxiaomao hace 5 años
padre
commit
2f763d1e19

+ 3 - 4
src/main/java/com/agent/action/audit/AuditDetailController.java

@@ -1806,10 +1806,9 @@ public class AuditDetailController extends AbstractController{
                     	list.add(pushRecord);
 
                     	//icegan--销售员如果有交担保金,则升级为贵宾会员
-						if(salesBean.getDeposit()>0){
-							saleBeanService.updateMemberLevelBySaleId(saleId, 1);
-						}
-					//icegan-判断销售人员
+						//if(salesBean.getDeposit()>0){
+							//saleBeanService.updateMemberLevelBySaleId(saleId, 1);
+						//}
             		}
 				}
 

+ 251 - 0
src/main/java/com/agent/action/deposit/DepositSaleController.java

@@ -0,0 +1,251 @@
+package com.agent.action.deposit;
+
+import com.agent.action.common.AbstractController;
+import com.agent.constans.CommonConstants;
+import com.agent.constans.ConfigConstants;
+import com.agent.model.bms.bean.UserBean;
+import com.agent.model.common.bean.PageResultBean;
+import com.agent.model.common.bean.ResultBean;
+import com.agent.model.deposit.bean.DepositBean;
+import com.agent.model.deposit.service.DepositBeanService;
+import com.agent.model.usercolumn.bean.UserColumnRoleBean;
+import com.agent.util.ExcelFileUtil;
+import com.agent.util.HttpResult;
+import com.agent.util.HttpUtils;
+import com.agent.util.StringUtils;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 销售员保证金操作
+ */
+@Controller
+@RequestMapping("/depositsale")
+public class DepositSaleController extends AbstractController {
+    private static Logger log = LoggerFactory.getLogger(DepositSaleController.class);
+
+    /**
+     * 保证金记录service
+     */
+    @Autowired
+    private DepositBeanService depositBeanService;
+    /**
+     * 中央后台保证金记录列表页
+     */
+    private final String PLAT_DEPOSIT_LIST = "deposit/plat/depositsalelist";
+    /**
+     * 代理商后台保证金记录列表页
+     */
+    private final String AGENT_DEPOSIT_LIST = "deposit/agent/depositsalelist";
+
+    @Value("${wjj.api.domain}")
+    private String wjjApiDomain;
+
+
+    /**
+     * 载入保证金记录列表页
+     * @param request
+     * @param response
+     * @return
+     * @throws IOException
+     */
+    @RequestMapping("/showDepositList.do")
+    public ModelAndView showDepositList(HttpServletRequest request,
+                                        HttpServletResponse response) throws Exception{
+        //获取登录信息
+        HttpSession session = request.getSession();
+        UserBean user = (UserBean)session.getAttribute(CommonConstants.USER_INFO);
+        ModelAndView mv = null;
+        //页面跳转
+        if(ConfigConstants.IS_ADMIN.equals(user.getIsAdmin())) {
+            mv = super.createJspView(PLAT_DEPOSIT_LIST);
+        }else {
+            mv = super.createJspView(AGENT_DEPOSIT_LIST);
+            //获取用户session信息中的字段权限,并组装成map带回页面
+            List<UserColumnRoleBean> roleList = user.getUserColumnRoleBeans();
+            if(roleList!=null && !roleList.isEmpty()){
+                for(UserColumnRoleBean role:roleList){
+                    if(role!=null){
+                        if(ConfigConstants.DEPOSIT_LIST.equals(role.getListCode())){
+                            mv.addObject(role.getColumnCode(), "1");
+                        }
+                    }
+                }
+            }
+        }
+        return mv;
+    }
+
+    /**
+     * 搜索保证金记录分页列表
+     * @param request
+     * @param response
+     */
+    @RequestMapping("/depositList.do")
+    public void depositList(HttpServletRequest request, HttpServletResponse response,
+                            @ModelAttribute DepositBean depositBean){
+        //返回页面数据
+        PageResultBean resultBean =  null;
+
+        try {
+            //获取登录信息
+            HttpSession session = request.getSession();
+            UserBean user = (UserBean)session.getAttribute(CommonConstants.USER_INFO);
+            //如果不是平台用户的话,则只能搜索到他本身的商家报价信息
+            if(!ConfigConstants.IS_ADMIN.equals(user.getIsAdmin())){
+                depositBean.setAgentID(user.getAgentId());
+            }
+            // 当前页码
+            String currentPage = super.getParameter(request, "currentPage");
+            // 分页记录数
+            String pageSize = super.getParameter(request, "pageSize");
+            int currentPageInt = 1;
+            int pageSizeInt = 10;
+            if(StringUtils.isNotEmpty(currentPage)){
+                try {
+                    currentPageInt = Integer.parseInt(currentPage);
+                } catch (Exception e) {
+                    resultBean = new PageResultBean(PageResultBean.FAIL_CODE,"请输入正确的页数!");
+                }
+            }
+            if(StringUtils.isNotEmpty(pageSize)){
+                try {
+                    pageSizeInt = Integer.parseInt(pageSize);
+                } catch (Exception e) {
+                    resultBean = new PageResultBean(PageResultBean.FAIL_CODE,"请输入正确的分页数!");
+                }
+            }
+
+            resultBean=depositBeanService.querySaleDepositRecordPage(depositBean,"",null,currentPageInt,pageSizeInt);
+
+            //获取用户session信息中的字段权限,并组装成map带回页面
+            List<UserColumnRoleBean> roleList = user.getUserColumnRoleBeans();
+            Map<String,String> columnMap = new HashMap<String,String>();
+            if(roleList!=null && !roleList.isEmpty()){
+                for(UserColumnRoleBean role:roleList){
+                    if(role!=null){
+                        if(ConfigConstants.DEPOSIT_LIST.equals(role.getListCode())){
+                            columnMap.put(role.getColumnCode(), role.getColumnName());
+                        }
+                    }
+                }
+            }
+            resultBean.setResult(columnMap);
+
+        } catch (Exception e) {
+            resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
+            log.error("depositList error!",e);
+        }finally{
+            super.printResult(request, response, resultBean.toString());
+        }
+
+    }
+
+    /**
+     * 退款
+     * @param request
+     * @param response
+     */
+    @RequestMapping("/refund.do")
+    public void refund(HttpServletRequest request, HttpServletResponse response){
+        //返回页面数据
+        ResultBean resultBean =  new ResultBean(ResultBean.SUCCESS_CODE,"成功!");
+        String id = super.getParameter(request, "id");
+        try {
+            if(StringUtils.isEmpty(id)){
+                resultBean = new ResultBean(ResultBean.FAIL_CODE,"请选择退款记录!");
+                return;
+            }
+
+            Map<String, Object> requestParameters = new HashMap<>();
+            requestParameters.put("id", id);
+            final HttpResult httpResult = HttpUtils.post(wjjApiDomain + "pay/applyRefund", requestParameters);
+            if (httpResult.getStatusCode() != 200) {
+                resultBean = new ResultBean(ResultBean.FAIL_CODE, "系统繁忙,请稍后再来!");
+            } else {
+                final String content = httpResult.getContent();
+                log.info("调用微信退款, 响应内容:{}", content);
+                final JSONObject jsonObject = JSON.parseObject(content);
+                final Integer code = jsonObject.getInteger("code");
+                if (code != 1) {
+                    resultBean = new ResultBean(ResultBean.FAIL_CODE, jsonObject.getString("message"));
+                }
+            }
+
+        } catch (Exception e) {
+            resultBean = new ResultBean(ResultBean.FAIL_CODE, "系统繁忙,请稍后再来!");
+            log.error("refund error!",e);
+        }finally{
+            super.printResult(request, response, resultBean.toString());
+        }
+    }
+
+    /**
+     * 导出保证金记录
+     * @param request
+     * @param response
+     */
+    @RequestMapping("/exportDeposit.do")
+    public void exportDeposit(HttpServletRequest request, HttpServletResponse response,
+                              @ModelAttribute DepositBean depositBean){
+        //返回页面数据
+        ResultBean resultBean =  new ResultBean(ResultBean.SUCCESS_CODE,"成功!");
+        try {
+            //获取登录信息
+            HttpSession session = request.getSession();
+            UserBean user = (UserBean)session.getAttribute(CommonConstants.USER_INFO);
+            //判断必要参数是否传递到后台
+            String[] queryCondition = new String[]{};
+            ResultBean flag = new ResultBean(ResultBean.SUCCESS_CODE,"成功!");
+            //删除场区
+            // 任务项数量 查询条件
+            StringBuilder conditionSql = new StringBuilder();
+            // 任务项 条件值
+            List<Object> conditions = new ArrayList<Object>();
+            for (int i = 0; i < queryCondition.length; i++) {
+                conditions.add(queryCondition[i]);
+                conditionSql.append("?");
+                if(i<queryCondition.length-1) {
+                    conditionSql.append(",");
+                }
+            }
+            String path = request.getSession().getServletContext().getRealPath("/")+ "/depositexcel/";;
+            flag = depositBeanService.createSaleDepositXlsx(depositBean,conditionSql.toString(),conditions,path,user);
+            if(!ResultBean.SUCCESS_CODE.equals(flag.getCode())){
+                resultBean = new ResultBean(ResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
+                return;
+            }
+            String filename = flag.getMessage();
+            String[] tempArr= filename.split("\\.");
+            //设置文件下载格式XLS
+            ExcelFileUtil.setXLSXHeader(request, response, tempArr[0]);
+            //获取文件
+            File upfile = new File(path+filename);
+            ExcelFileUtil.downloadFile(response.getOutputStream(),upfile);
+        } catch (Exception e) {
+            resultBean = new ResultBean(ResultBean.FAIL_CODE, "系统繁忙,请稍后再来!");
+            log.error("exportDeposit error!",e);
+        }/*finally{
+            super.pringResult(request, response, resultBean.toString());
+        }*/
+
+    }
+}

+ 13 - 0
src/main/java/com/agent/model/deposit/bean/DepositBean.java

@@ -66,6 +66,11 @@ public class DepositBean implements java.io.Serializable {
     
     /** 是否通票 */
     private String isCommon;
+
+	/**
+	 * icegan--新增,用户类型:1,车商;2,销售员
+	 */
+	private Integer userType=1;
     
     public String getId() {
 		return id;
@@ -211,6 +216,14 @@ public class DepositBean implements java.io.Serializable {
 		this.isCommon = isCommon;
 	}
 
+	public Integer getUserType() {
+		return userType;
+	}
+
+	public void setUserType(Integer userType) {
+		this.userType = userType;
+	}
+
 	@Override
     public String toString() {
         String value = "";

+ 12 - 0
src/main/java/com/agent/model/deposit/bpo/DepositBeanBpo.java

@@ -51,5 +51,17 @@ public class DepositBeanBpo {
         }
         return result;
     }
+
+    /**
+     * icegan--新增,销售员保证金--分页查询需导出保证金记录
+     * @param depositBean
+     * @param currentPageInt
+     * @param pageSizeInt
+     * @return
+     */
+    public PageResultBean querySaleDepositRecordPage(DepositBean depositBean, String conditionSql,
+                                                     List<Object> conditions, int currentPageInt, int pageSizeInt) {
+        return depositBeanDao.querySaleDepositRecordPage(depositBean, conditionSql, conditions, currentPageInt, pageSizeInt);
+    }
 	
 }

+ 75 - 0
src/main/java/com/agent/model/deposit/dao/DepositBeanDao.java

@@ -39,11 +39,13 @@ public class DepositBeanDao<BaseBean> extends BaseDaoImpl<BaseBean> {
         sql.append(" a.wx_pay_no,a.agent_pay_no,a.pay_amout,a.pay_status,a.refund_no,date_format(a.refund_create_time,'%Y-%m-%d %H:%i:%s') refund_create_time,a.is_common,date_format(a.pay_create_time,'%Y-%m-%d %H:%i:%s') pay_create_time ");
         sql.append(" from ").append(CommonConstants.TB_DEPOSIT).append(" a,").append(CommonConstants.TB_DIGGER_AGENT).append(" b");
         sql.append(" where a.da_id=b.id ");
+        sql.append(" and a.user_type=1 ");//icegan--新增,用户类型限制
 
         StringBuffer totalsql = new StringBuffer();
         totalsql.append(" select count(1)");
         totalsql.append(" from ").append(CommonConstants.TB_DEPOSIT).append(" a,").append(CommonConstants.TB_DIGGER_AGENT).append(" b");
         totalsql.append(" where a.da_id=b.id ");
+        totalsql.append(" and a.user_type=1 ");//icegan--新增,用户类型限制
 
         if(StringUtils.isNotBlank(depositBean.getDaID())){
             sql.append(" and b.da_id LIKE ?");
@@ -109,4 +111,77 @@ public class DepositBeanDao<BaseBean> extends BaseDaoImpl<BaseBean> {
         return (result>=1);
     }
 
+
+    /**
+     * icegan--新增,销售员保证金--分页查询需导出保证金记录
+     * @param depositBean
+     * @param currentPageInt
+     * @param pageSizeInt
+     * @return
+     */
+    public PageResultBean querySaleDepositRecordPage(DepositBean depositBean, String conditionSql,
+                                                 List<Object> conditions, int currentPageInt, int pageSizeInt) {
+        List<Object> params = new ArrayList<Object>();
+        StringBuffer sql = new StringBuffer();
+        sql.append(" select a.id,b.da_id,b.da_name,b.da_phone,b.da_wxh,b.da_wxnc,a.agent_id,a.agent_name,a.product_name,");
+        sql.append(" a.wx_pay_no,a.agent_pay_no,a.pay_amout,a.pay_status,a.refund_no,date_format(a.refund_create_time,'%Y-%m-%d %H:%i:%s') refund_create_time,a.is_common,date_format(a.pay_create_time,'%Y-%m-%d %H:%i:%s') pay_create_time ");
+        sql.append(" from ").append(CommonConstants.TB_DEPOSIT).append(" a,").append(CommonConstants.TB_DIGGER_AGENT).append(" b");
+        sql.append(" where a.da_id=b.id ");
+        sql.append(" and a.user_type=2 ");//icegan--新增,用户类型限制
+
+        StringBuffer totalsql = new StringBuffer();
+        totalsql.append(" select count(1)");
+        totalsql.append(" from ").append(CommonConstants.TB_DEPOSIT).append(" a,").append(CommonConstants.TB_DIGGER_AGENT).append(" b");
+        totalsql.append(" where a.da_id=b.id ");
+        totalsql.append(" and a.user_type=2 ");//icegan--新增,用户类型限制
+
+        if(StringUtils.isNotBlank(depositBean.getDaID())){
+            sql.append(" and b.da_id LIKE ?");
+            totalsql.append(" and b.da_id LIKE ?");
+            params.add("%"+depositBean.getDaID()+"%");
+        }
+        if(StringUtils.isNotBlank(depositBean.getProductName())){
+            sql.append(" and a.product_name LIKE ?");
+            totalsql.append(" and a.product_name LIKE ?");
+            params.add("%"+depositBean.getProductName()+"%");
+        }
+        if(StringUtils.isNotBlank(depositBean.getDaWxnc())){
+            sql.append(" and b.da_wxnc LIKE ?");
+            totalsql.append(" and b.da_wxnc LIKE ?");
+            params.add("%"+depositBean.getDaWxnc()+"%");
+        }
+        if(StringUtils.isNotBlank(depositBean.getDaName())){
+            sql.append(" and b.da_name LIKE ?");
+            totalsql.append(" and b.da_name LIKE ?");
+            params.add("%"+depositBean.getDaName()+"%");
+        }
+        if(StringUtils.isNotBlank(depositBean.getDaPhone())){
+            sql.append(" and b.da_phone LIKE ?");
+            totalsql.append(" and b.da_phone LIKE ?");
+            params.add("%"+depositBean.getDaPhone()+"%");
+        }
+        if(StringUtils.isNotBlank(depositBean.getDaWxh())){
+            sql.append(" and b.da_wxh LIKE ?");
+            totalsql.append(" and b.da_wxh LIKE ?");
+            params.add("%"+depositBean.getDaWxh()+"%");
+        }
+        if(StringUtils.isNotBlank(depositBean.getPayStatus())){
+            sql.append(" and a.pay_status = ?");
+            totalsql.append(" and a.pay_status = ?");
+            params.add(depositBean.getPayStatus());
+        }
+        if(StringUtils.isNotBlank(depositBean.getAgentID())){
+            sql.append(" and a.agent_id = ?");
+            totalsql.append(" and a.agent_id = ?");
+            params.add(depositBean.getAgentID());
+        }
+        if(StringUtils.isNotBlank(conditionSql) && conditions!=null && conditions.size()>0){
+            sql.append(" and a.id in (").append(conditionSql).append(")");
+            totalsql.append(" and a.id in (").append(conditionSql).append(")");
+            params.addAll(conditions);
+        }
+        sql.append(" order by a.pay_create_time desc,a.id desc");
+        return super.getPageResults(totalsql.toString(),sql.toString(), params.toArray(),
+                depositBeanConvert, currentPageInt, pageSizeInt);
+    }
 }

+ 225 - 0
src/main/java/com/agent/model/deposit/service/DepositBeanService.java

@@ -49,6 +49,18 @@ public class DepositBeanService{
         int currentPageInt, int pageSizeInt) {
         return depositBeanBpo.queryDepositRecordPage(depositBean,conditionSql,conditions,currentPageInt,pageSizeInt);
     }
+
+    /**
+     * icegan--新增,销售员保证金--分页查询需导出保证金记录
+     * @param depositBean
+     * @param currentPageInt
+     * @param pageSizeInt
+     * @return
+     */
+    public PageResultBean querySaleDepositRecordPage(DepositBean depositBean, String conditionSql,
+                                                     List<Object> conditions, int currentPageInt, int pageSizeInt) {
+        return depositBeanBpo.querySaleDepositRecordPage(depositBean, conditionSql, conditions, currentPageInt, pageSizeInt);
+    }
     
     /**
      * 根据ID退款
@@ -272,4 +284,217 @@ public class DepositBeanService{
         }
     }
 
+
+    /**
+     * icegan--新增,销售员保证金记录导出
+     * @param depositBean
+     * @param conditionSql
+     * @param conditions
+     * @param path
+     * @param user
+     * @return
+     */
+    public ResultBean createSaleDepositXlsx(DepositBean depositBean, String conditionSql, List<Object> conditions,
+                                        String path,UserBean user) {
+        //如果不是平台用户的话,则只能搜索到他本身的商家报价信息
+        Map<String,String> columnMap = new HashMap<String,String>();
+        if(!ConfigConstants.IS_ADMIN.equals(user.getIsAdmin())){
+            depositBean.setAgentID(user.getAgentId());
+            //获取用户session信息中的字段权限,并组装成map带回页面
+            List<UserColumnRoleBean> roleList = user.getUserColumnRoleBeans();
+            if(roleList!=null && !roleList.isEmpty()){
+                for(UserColumnRoleBean role:roleList){
+                    if(role!=null){
+                        if(ConfigConstants.DEPOSIT_LIST.equals(role.getListCode())){
+                            columnMap.put(role.getColumnCode(), role.getColumnName());
+                        }
+                    }
+                }
+            }
+        }
+
+        ResultBean resultBean = new ResultBean(ResultBean.SUCCESS_CODE,"成功");
+        FileOutputStream out = null;
+        Integer pageSize = 100;
+        String filename="deposit"+DateUtil.format(new Date(), DateUtil.yyyyMMddHHmmss)+".xlsx";
+        try {
+            SXSSFWorkbook  workbook = new SXSSFWorkbook(pageSize);
+            workbook.setCompressTempFiles(true);
+            File files = new File(path);
+            if (files==null ||!files.exists()) {
+                files.mkdirs();
+            }
+            out = new FileOutputStream(path + filename);
+
+            //循环读取临时表数据插入workbook对象
+            //当前写入次数
+            //int pageIndex = 1;
+            //当前sheet页页码
+            int sheetNum = 0;
+            PageResultBean page=null;
+            List<DepositBean> list = null;
+            List<String> strList = new ArrayList<String>();
+            String bodyStr="";
+            int startRowmun = 1;
+            //sheet页最大数据条数
+            int max = 60000;
+            //sheet页最大写入次数
+            int r = max/pageSize;
+            String heads = "";
+            //如果是平台用户的话,则导出所有字段,否则只导出有权限部分
+            if(ConfigConstants.IS_ADMIN.equals(user.getIsAdmin())){
+                heads += "车商ID,姓名,手机号码,微信昵称,商户名称,商品名称,微信支付单号,商户支付单号,支付金额(万),支付状态,支付创建时间,退款单号,退款创建时间";
+            }else{
+                if(StringUtils.isNotBlank(columnMap.get("csid"))){
+                    heads += "车商ID,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("xm"))){
+                    heads += "姓名,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("sjhm"))){
+                    heads += "手机号码,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("wxnc"))){
+                    heads += "微信昵称,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("spmc"))){
+                    heads += "商品名称,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("wxzfdh"))){
+                    heads += "微信支付单号,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("shzfdh"))){
+                    heads += "商户支付单号,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("zfje"))){
+                    heads += "支付金额(万),";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("zfzt"))){
+                    heads += "支付状态,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("zfsj"))){
+                    heads += "支付创建时间,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("tkdh"))){
+                    heads += "退款单号,";
+                }
+                if(StringUtils.isNotBlank(columnMap.get("tksj"))){
+                    heads += "退款创建时间,";
+                }
+                heads = heads.substring(0, heads.length()-1);
+            }
+            do {
+                if((startRowmun-1)%r==0){
+                    sheetNum=sheetNum+1;
+                }
+                page = querySaleDepositRecordPage(depositBean,conditionSql,conditions,startRowmun,pageSize);
+                list = (List<DepositBean>)page.getResultList();
+                if(list!=null && list.size()>0){
+                    strList.clear();
+                    for(DepositBean bean:list){
+                        bodyStr="";
+                        //如果是平台用户的话,则导出所有字段,否则只导出有权限部分
+                        if(ConfigConstants.IS_ADMIN.equals(user.getIsAdmin())){
+                            bodyStr += bean.getDaID()+",";
+                            bodyStr += bean.getDaName()+",";
+                            bodyStr += bean.getDaPhone()+",";
+                            bodyStr += bean.getDaWxnc()+",";
+                            // bodyStr += bean.getDaWxh()+",";
+                            bodyStr += bean.getAgentName()+",";
+                            bodyStr += bean.getProductName()+",";
+                            bodyStr += bean.getWxPayNo()+",";
+                            bodyStr += bean.getAgentPayNo()+",";
+                            bodyStr += bean.getPayAmout()+",";
+                            if("1".equals(bean.getPayStatus())) {
+                                bodyStr +="已支付,";
+                            }else {
+                                bodyStr +="未支付,";
+                            }
+                            bodyStr += bean.getPayTime()+",";
+                            bodyStr += bean.getRefundNo()+",";
+                            bodyStr += bean.getRefundTime();
+                        }else{
+                            if(StringUtils.isNotBlank(columnMap.get("csid"))){
+                                bodyStr += bean.getDaID()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("xm"))){
+                                bodyStr += bean.getDaName()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("sjhm"))){
+                                bodyStr += bean.getDaPhone()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("wxnc"))){
+                                bodyStr += bean.getDaWxnc()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("spmc"))){
+                                bodyStr += bean.getProductName()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("wxzfdh"))){
+                                bodyStr += bean.getWxPayNo()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("shzfdh"))){
+                                bodyStr += bean.getAgentPayNo()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("zfje"))){
+                                bodyStr += bean.getPayAmout()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("zfzt"))){
+                                String statusName;
+                                switch (bean.getPayStatus()) {
+                                    case "0":
+                                        statusName = "未支付";
+                                        break;
+                                    case "1":
+                                        statusName = "已支付";
+                                        break;
+                                    case "2":
+                                        statusName = "已退款";
+                                        break;
+                                    case "3":
+                                        statusName = "退款中";
+                                        break;
+                                    case "4":
+                                        statusName = "退款失败";
+                                        break;
+                                    default:
+                                        statusName = "";
+                                }
+                                bodyStr += statusName;
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("zfsj"))){
+                                bodyStr += bean.getPayTime()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("tkdh"))){
+                                bodyStr += bean.getRefundNo()+",";
+                            }
+                            if(StringUtils.isNotBlank(columnMap.get("tksj"))){
+                                bodyStr += bean.getRefundTime()+",";
+                            }
+                            bodyStr = bodyStr.substring(0, bodyStr.length()-1);
+                        }
+                        strList.add(bodyStr);
+                    }
+                }
+                ExcelFileUtil.createExcelFile(workbook, strList, heads, filename, startRowmun, pageSize, sheetNum);
+                startRowmun++;
+                log.info("--》  failFileName = " + filename + " 导出成功记录  从    " + startRowmun +"条到  "+ startRowmun*pageSize +"条" +"当前页 为 " + sheetNum );
+            } while (list.size() > 0);
+            list.clear();
+            //生成excel表格
+            workbook.write(out);
+            out.flush();
+            log.info("--》  生成excel表格 fileName = " + filename);
+            resultBean.setMessage(filename);
+            return resultBean;
+        } catch (Exception e) {
+            log.info("--》  createXlsx error! fileName = " + filename, e);
+            resultBean.setCode(ResultBean.FAIL_CODE);
+            return resultBean;
+        } finally{
+            // 释放资源
+            if(out != null){
+                IOUtils.closeQuietly(out);
+            }
+        }
+    }
 }

+ 333 - 0
src/main/webapp/WEB-INF/views/deposit/agent/depositsalelist.jsp

@@ -0,0 +1,333 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: icegan
+  Date: 2019/9/28
+  Time: 20:16
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page language="java" contentType="text/html; charset=utf-8"
+         pageEncoding="utf-8"%>
+<%@ include file="../../../taglibs/taglibs.jsp"%>
+<%pageContext.setAttribute("root", request.getContextPath()); %>
+<!doctype html>
+<html>
+<head>
+    <title>代理商置换系统-保证金管理</title>
+    <meta http-equiv="Cache-Control" content="no-siteapp">
+    <meta http-equiv="Cache-Control" content="no-transform">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+    <link rel="stylesheet" href="${root}/resources/js/light/css/jquery.lightbox-0.5.css" />
+    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/netstyle/css/main.css"/>
+    <script src="${root}/resources/js/jquery-1.7.js" type="text/javascript"></script>
+    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/sessionout.js"></script>
+    <script src="${root}/resources/netstyle/js/page.js" type="text/javascript"></script>
+    <script src="${root}/resources/js/light/js/jquery.lightbox-0.5.js" type="text/javascript"></script>
+    <script type="text/javascript">
+        var ctx = "${root}";
+    </script>
+
+</head>
+<body>
+<div>
+    <p class="main_r_t cc"><span class="span2">当前位置:</span><span>保证金管理</span>
+    </p>
+    <form id="queryDepositList">
+        <div class="act_list">
+            <div class="list_search1">
+                <c:if test="${csid eq '1'}">
+                    <span>车商ID:</span> <input type="text" name="daID" id = "query_daId"/>
+                </c:if>
+                <c:if test="${spmc eq '1'}">
+                    <span>商品名称:</span> <input type="text" name="productName" id = "query_productName"/>
+                </c:if>
+                <c:if test="${wxnc eq '1'}">
+                    <span>微信昵称:</span> <input type="text" name="daWxnc" id = "query_daWxnc"/>
+                </c:if>
+            </div>
+            <div class="list_search1">
+                <c:if test="${xm eq '1'}">
+                    <span>姓名:</span> <input type="text" name="daName" id = "query_daName"/>
+                </c:if>
+                <c:if test="${sjhm eq '1'}">
+                    <span>手机号码:</span> <input type="text" name="daPhone" id = "query_daPhone"/>
+                </c:if>
+                <c:if test="${zfzt eq '1'}">
+                    <span>支付状态:</span><div class="left2_3_search down tc2_search_11">
+                    <input type="hidden" name="payStatus" id="query_payStatus"/>
+                    <span class="wadeShow">全部</span>
+                    <ul style="width:200px;max-height:100px;overflow:auto;">
+                        <li wade="">全部</li>
+                        <li wade="1">已支付</li>
+                        <li wade="0">未支付</li>
+                        <li wade="2">已退款</li>
+                        <li wade="3">退款中</li>
+                        <li wade="4">退款失败</li>
+                    </ul>
+                </div>
+                </c:if>
+                <a class="list_button" style="background-color: #CE0000;" onclick="resetForm();">重置</a>
+                <a class="list_button" onclick="queryDepositList()">查询</a>
+                <a class="list_button" onclick="exportDepositList()">导出</a>
+            </div>
+            <div id="appendId" class="overflow_main"></div>
+        </div>
+    </form>
+</div>
+<div class="tc_newts" id="tishialert">
+    <div class="tcnewts_main">
+        <img class="newts_xxx"  onclick="qx_tan($('#tishitc'));" src="${pageContext.request.contextPath}/resources/images/tan_xxx.png">
+        <h3>温馨提示</h3>
+        <p id="tishiwen"></p>
+        <div class="newts_btn" style="text-align:center;"	><a class="btn2" onclick="qx_tan($('#tishialert'));" style="text-align: center;margin-right:0px;">我知道了</a></div>
+    </div>
+</div>
+
+<div class="tc_newts" id="tishitc">
+    <div class="tcnewts_main">
+        <img class="newts_xxx"  onclick="qx_tan($('#tishitc'));" src="${pageContext.request.contextPath}/resources/images/tan_xxx.png">
+        <h3>温馨提示</h3>
+        <p>
+            <span>确认要退还保证金吗?</span>
+            <%--<span>退款单号:</span> <input type="text" name="refundNo" id="refundNo"/>--%>
+        </p>
+        <div class="newts_btn"><a class="btn1" id="tishiqx">取消</a>&nbsp;&nbsp;<a class="btn2" id="tishiqr">确认</a></div>
+    </div>
+</div>
+
+<div class="public_prompt" id="tsalert">您输入的信息有误,请确认后重新输入</div>
+</body>
+<script src="${root}/resources/js/index.js"
+        type="text/javascript"></script>
+<script type="text/javascript">
+
+    var getHead={getDepositHead:function(obj){
+            var rowstr="<tr>";
+            if(obj["csid"]){
+                rowstr += "<th>车商ID</th>";
+            }
+            if(obj["xm"]){
+                rowstr += "<th>姓名</th>";
+            }
+            if(obj["sjhm"]){
+                rowstr += "<th>手机号码</th>";
+            }
+            if(obj["wxnc"]){
+                rowstr += "<th>微信昵称</th>";
+            }
+            if(obj["spmc"]){
+                rowstr += "<th>商品名称</th>";
+            }
+            if(obj["wxzfdh"]){
+                rowstr += "<th>微信支付单号</th>";
+            }
+            if(obj["shzfdh"]){
+                rowstr += "<th>商户支付单号</th>";
+            }
+            if(obj["zfje"]){
+                rowstr += "<th>支付金额(万)</th>";
+            }
+            if(obj["zfzt"]){
+                rowstr += "<th>支付状态</th>";
+            }
+            if(obj["zfsj"]){
+                rowstr += "<th>支付创建时间</th>";
+            }
+            if(obj["cz"]){
+                rowstr += "<th>操作</th>";
+            }
+            if(obj["tkdh"]){
+                rowstr += "<th>退款单号</th>";
+            }
+            if(obj["tksj"]){
+                rowstr += "<th>退款创建时间</th>";
+            }
+            rowstr += "</tr>";
+            return rowstr;
+        }};
+
+    var getListContext={getDepositList:function(headObj,bodyObj){
+            var rowstr = "";
+            for (var i = 0; i < bodyObj.length; i++) {
+                var bodyItem = bodyObj[i];
+                rowstr += "<tr>";
+                if(headObj["csid"]){
+                    rowstr += "<td><span>" +bodyItem.daID+ "</span></td>";
+                }
+                if(headObj["xm"]){
+                    rowstr += "<td><span>" +bodyItem.daName+ "</span></td>";
+                }
+                if(headObj["sjhm"]){
+                    rowstr += "<td><span>" +bodyItem.daPhone+ "</span></td>";
+                }
+                if(headObj["wxnc"]){
+                    rowstr += "<td><span>" +bodyItem.daWxnc+ "</span></td>";
+                }
+                if(headObj["spmc"]){
+                    rowstr += "<td><span>" +bodyItem.productName+ "</span></td>";
+                }
+                if(headObj["wxzfdh"]){
+                    rowstr += "<td><span>" +bodyItem.wxPayNo+ "</span></td>";
+                }
+                if(headObj["shzfdh"]){
+                    rowstr += "<td><span>" +bodyItem.agentPayNo+ "</span></td>";
+                }
+                if(headObj["zfje"]){
+                    rowstr += "<td><span>" +bodyItem.payAmout+ "</span></td>";
+                }
+                if(headObj["zfzt"]){
+                    var statusName = '';
+                    switch (bodyItem.payStatus) {
+                        case '0': statusName = '未支付'; break;
+                        case '1': statusName = '已支付'; break;
+                        case '2': statusName = '已退款'; break;
+                        case '3': statusName = '退款中'; break;
+                        case '4': statusName = '退款失败'; break;
+                        default:
+                            break;
+                    }
+                    rowstr += "<td><span>" + statusName + "</span></td>";
+                }
+                if(headObj["zfsj"]){
+                    rowstr += "<td><span>" +bodyItem.payTime+ "</span></td>";
+                }
+                if(headObj["cz"]){
+                    switch (bodyItem.payStatus) {
+                        case '1':
+                        case '4':
+                            rowstr += "<td><b class=\"td_b2\" onclick=\"confirmRefund('" + bodyItem.id + "')\">退还</b></td>";
+                            break;
+                        default:
+                            rowstr += '<td><span></span></td>';
+                            break;
+                    }
+                }
+                if(headObj["tkdh"]){
+                    rowstr += "<td><span>" +bodyItem.refundNo+ "</span></td>";
+                }
+                if(headObj["tksj"]){
+                    rowstr += "<td><span>" +bodyItem.refundTime+ "</span></td>";
+                }
+                rowstr += "</tr>";
+            }
+            return rowstr;
+        }};
+    var url=ctx+'/depositsale/depositList.do';
+    $(function(){
+        toDynamicQueryList('f',url, 'queryDepositList', 'getDepositHead', 'getDepositList', 'appendId');
+    });
+
+    //显示提示弹框
+    function tsalert(content){
+        $("#tsalert").html(content);
+        setTimeout(function(){
+            $("#tsalert").fadeIn();
+        },300);
+        setTimeout(function(){
+            $("#tsalert").fadeOut();
+        },2300);
+    }
+
+    function queryDepositList(){
+        toDynamicQueryList('f',url, 'queryDepositList', 'getDepositHead', 'getDepositList', 'appendId');
+    };
+
+    function confirmRefund(id){
+        tanKuangMsg($("#tishitc"));
+        $("#tishitc").find("#tishiqr").unbind().click(function(){
+            /*
+            var rn = $("#refundNo").val();
+            if(!rn){
+                tsalert("请输入退款单号!");
+                return false;
+            }
+            */
+            refund(id);
+        });
+        $('#tishitc').find('#tishiqx').unbind().click(function() {
+            qx_tan($('#tishitc'));
+        });
+    }
+
+    function refund(id){
+        $.ajax({
+            url:ctx+'/depositsale/refund.do',
+            type:'post',
+            data:{'id':id},
+            dataType :'json',
+            success:function(data){
+                tsalert(data.message);
+                queryDepositList();
+                qx_tan($('#tishitc'));
+            },
+            error:function(){
+                tsalert("系统繁忙,请稍后再试!");
+            }
+        });
+    }
+
+    /**
+     * 导出方法
+     */
+    function exportDepositList(){
+        var url = ctx+'/depositsale/exportDeposit.do?1=1';
+        if($("#query_daId").length>0){
+            url += '&daID='+$("#query_daId").val();
+        }
+        if($("#query_productName").length>0){
+            url += '&productName='+$("#query_productName").val();
+        }
+        if($("#query_daWxnc").length>0){
+            url += '&daWxnc='+$("#query_daWxnc").val();
+        }
+        if($("#query_payStatus").length>0){
+            url += '&payStatus='+$("#query_payStatus").val();
+        }
+        if($("#query_daName").length>0){
+            url += '&daName='+$("#query_daName").val();
+        }
+        if($("#query_daPhone").length>0){
+            url += '&daPhone='+$("#query_daPhone").val();
+        }
+        if($("#query_daWxh").length>0){
+            url += '&daWxh='+$("#query_daWxh").val();
+        }
+        window.location.href=url;
+    }
+
+
+    //重置表单搜索条件
+    function resetForm(){
+        $("#queryDepositList input").val("");
+        $("#queryDepositList .wadeShow").html("全部");
+    }
+
+</script>
+<style type="text/css">
+    .list_act_main span b {
+        font-weight: 400;
+        color: #038bcb;
+        cursor: pointer;
+        display: inline-block;
+        text-align: center;
+    }
+    #copy {
+        position: absolute;
+        top: 0;
+        left: 0;
+        opacity: 0;
+        z-index: -10;}
+    span input{
+        display:inline-block;
+        *zoom:1;
+        *display:inline;
+        vertical-align:middle;
+        height:24px;
+        line-height:24px;
+        padding:0 10px;
+        width:60%;
+        margin-right:10px;
+        border:1px solid #ccc;}
+</style>
+</html>
+

+ 230 - 0
src/main/webapp/WEB-INF/views/deposit/plat/depositsalelist.jsp

@@ -0,0 +1,230 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: icega
+  Date: 2019/9/28
+  Time: 20:19
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page language="java" contentType="text/html; charset=utf-8"
+         pageEncoding="utf-8"%>
+<%@ include file="../../../taglibs/taglibs.jsp"%>
+<%pageContext.setAttribute("root", request.getContextPath()); %>
+<!doctype html>
+<html>
+<head>
+    <title>中央后台-销售员保证金管理</title>
+    <meta http-equiv="Cache-Control" content="no-siteapp">
+    <meta http-equiv="Cache-Control" content="no-transform">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+    <link rel="stylesheet" href="${root}/resources/js/light/css/jquery.lightbox-0.5.css" />
+    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/netstyle/css/main.css"/>
+    <script src="${root}/resources/js/jquery-1.7.js" type="text/javascript"></script>
+    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/sessionout.js"></script>
+    <script src="${root}/resources/netstyle/js/page.js" type="text/javascript"></script>
+    <script src="${root}/resources/js/light/js/jquery.lightbox-0.5.js" type="text/javascript"></script>
+    <script type="text/javascript">
+        var ctx = "${root}";
+    </script>
+
+</head>
+<body>
+<div>
+    <p class="main_r_t cc"><span class="span2">当前位置:</span><span>.保证金管理</span>
+    </p>
+    <form id="queryDepositList">
+        <div class="act_list">
+            <div class="list_search1">
+                <span>车商ID:</span> <input type="text" name="daID" id = "query_daId"/>
+                <span>商品名称:</span> <input type="text" name="productName" id = "query_productName"/>
+                <span>微信昵称:</span> <input type="text" name="daWxnc" id = "query_daWxnc"/>
+                <span>支付状态:</span><div class="left2_3_search down tc2_search_11">
+                <input type="hidden" name="payStatus" id="query_payStatus"/>
+                <span class="wadeShow">全部</span>
+                <ul style="width:200px;max-height:100px;overflow:auto;">
+                    <li wade="">全部</li>
+                    <li wade="1">已支付</li>
+                    <li wade="0">未支付</li>
+                    <li wade="2">已退款</li>
+                    <li wade="3">退款中</li>
+                    <li wade="4">退款失败</li>
+                </ul>
+            </div>
+            </div>
+            <div class="list_search1">
+                <span>姓名:</span> <input type="text" name="daName" id = "query_daName"/>
+                <span>手机号码:</span> <input type="text" name="daPhone" id = "query_daPhone"/>
+                <!-- span>微信号:</span> <input type="text" name="daWxh" id = "query_daWxh"/-->
+                <a class="list_button" style="background-color: #CE0000;" onclick="resetForm();">重置</a>
+                <a class="list_button" onclick="queryDepositList()">查询</a>
+                <a class="list_button" onclick="exportDepositList()">导出</a>
+            </div>
+            <div id="appendId" class="overflow_main"></div>
+        </div>
+    </form>
+</div>
+<div class="tc_newts" id="tishialert">
+    <div class="tcnewts_main">
+        <img class="newts_xxx"  onclick="qx_tan($('#tishitc'));" src="${pageContext.request.contextPath}/resources/images/tan_xxx.png">
+        <h3>温馨提示</h3>
+        <p id="tishiwen"></p>
+        <div class="newts_btn" style="text-align:center;"	><a class="btn2" onclick="qx_tan($('#tishialert'));" style="text-align: center;margin-right:0px;">我知道了</a></div>
+    </div>
+</div>
+
+<div class="tc_newts" id="tishitc">
+    <div class="tcnewts_main">
+        <img class="newts_xxx"  onclick="qx_tan($('#tishitc'));" src="${pageContext.request.contextPath}/resources/images/tan_xxx.png">
+        <h3>温馨提示</h3>
+        <p>
+            <span>确认要退还保证金吗?</span>
+            <%--<span>退款单号:</span> <input type="text" name="refundNo" id="refundNo"/>--%>
+        </p>
+        <div class="newts_btn"><a onclick="qx_tan($('#tishitc'));">取消</a><a class="btn2" id="tishiqr">确认</a></div>
+    </div>
+</div>
+<div class="public_prompt" id="tsalert">您输入的信息有误,请确认后重新输入</div>
+</body>
+<script src="${root}/resources/js/index.js" type="text/javascript"></script>
+<script type="text/javascript">
+
+    var getHead={getDepositHead:function(){
+            var rowstr="<tr><th>车商ID</th><th>姓名</th><th>手机号码</th><th>微信昵称</th>";
+            rowstr += "<th>商户名称</th>";
+            rowstr += "<th>商品名称</th><th>微信支付单号</th><th>商户支付单号</th><th>支付金额(万)</th><th>支付状态</th><th>支付创建时间</th>";
+            rowstr += "<th>退款</th><th>退款单号</th><th>退款创建时间</th></tr>";
+            return rowstr;
+        }};
+
+    var getListContext={getDepositList:function(obj){
+            var rowstr="<tr><td><span>"+obj.daID+
+                "</span></td><td><span>"+obj.daName+"</span></td><td><span>"+obj.daPhone+"</span></td><td><span>"+
+                obj.daWxnc+"</span></td><td><span>"+obj.agentName+"</span></td>"+
+                "<td><span>"+obj.productName+"</span></td><td><span>"+obj.wxPayNo+"</span></td><td><span>"+obj.agentPayNo+"</span></td>"+
+                "<td><span>"+obj.payAmout+"</span></td>";
+            var statusName = '';
+            switch (obj.payStatus) {
+                case '0': statusName = '未支付'; break;
+                case '1': statusName = '已支付'; break;
+                case '2': statusName = '已退款'; break;
+                case '3': statusName = '退款中'; break;
+                case '4': statusName = '退款失败'; break;
+                default:
+                    break;
+            }
+            rowstr += "<td><span>" + statusName + "</span></td>";
+            rowstr += "<td><span>"+obj.payTime+"</span></td>";
+
+            switch (obj.payStatus) {
+                case '1':
+                case '4':
+                    rowstr += "<td><b class=\"td_b2\" onclick=\"confirmRefund('" + obj.id + "')\">退还</b></td>";
+                    break;
+                default:
+                    rowstr += '<td><span></span></td>';
+                    break;
+            }
+
+            rowstr += "<td><span>"+obj.refundNo+"</span></td>"+"<td><span>"+obj.refundTime+"</span></td></tr>";
+            return rowstr;
+        }};
+    var url=ctx+'/depositsale/depositList.do';
+    $(function(){
+        toQueryList('f',url, 'queryDepositList', 'getDepositHead', 'getDepositList', 'appendId');
+    });
+
+    //显示提示弹框
+    function tsalert(content){
+        $("#tsalert").html(content);
+        setTimeout(function(){
+            $("#tsalert").fadeIn();
+        },300);
+        setTimeout(function(){
+            $("#tsalert").fadeOut();
+        },2300);
+    }
+
+    function queryDepositList(){
+        toQueryList('f',url, 'queryDepositList', 'getDepositHead', 'getDepositList', 'appendId');
+    };
+
+    /**
+     * 导出方法
+     */
+    function exportDepositList(){
+        window.location.href=ctx+'/depositsale/exportDeposit.do?daID='+$("#query_daId").val()
+            +'&productName='+$("#query_productName").val()+'&daWxnc='+$("#query_daWxnc").val()
+            +'&payStatus='+$("#query_payStatus").val()+'&daName='+$("#query_daName").val()
+            +'&daPhone='+$("#query_daPhone").val();
+    }
+
+
+    //重置表单搜索条件
+    function resetForm(){
+        $("#queryDepositList input").val("");
+        $("#queryDepositList .wadeShow").html("全部");
+    }
+
+    function confirmRefund(id){
+        tanKuangMsg($("#tishitc"));
+        $("#tishitc").find("#tishiqr").unbind().click(function(){
+            /*
+            var rn = $("#refundNo").val();
+            if(!rn){
+                tsalert("请输入退款单号!");
+                return false;
+            }
+            */
+            refund(id);
+        });
+        $('#tishitc').find('#tishiqx').unbind().click(function() {
+            qx_tan($('#tishitc'));
+        });
+
+        function refund(id){
+            $.ajax({
+                url:ctx+'/depositsale/refund.do',
+                type:'post',
+                data:{'id':id},
+                dataType :'json',
+                success:function(data){
+                    tsalert(data.message);
+                    queryDepositList();
+                    qx_tan($('#tishitc'));
+                },
+                error:function(){
+                    tsalert("系统繁忙,请稍后再试!");
+                }
+            });
+        }
+
+    }
+</script>
+<style type="text/css">
+    .list_act_main span b {
+        font-weight: 400;
+        color: #038bcb;
+        cursor: pointer;
+        display: inline-block;
+        text-align: center;
+    }
+    #copy {
+        position: absolute;
+        top: 0;
+        left: 0;
+        opacity: 0;
+        z-index: -10;}
+    span input{
+        display:inline-block;
+        *zoom:1;
+        *display:inline;
+        vertical-align:middle;
+        height:24px;
+        line-height:24px;
+        padding:0 10px;
+        width:60%;
+        margin-right:10px;
+        border:1px solid #ccc;}
+</style>
+</html>
+