chengcm 5 gadi atpakaļ
vecāks
revīzija
ebc38185aa

+ 219 - 188
src/main/java/com/agent/action/audit/AuditDetailController.java

@@ -1083,7 +1083,6 @@ public class AuditDetailController extends AbstractController{
     public void addInfo(HttpServletRequest request, HttpServletResponse response,  @ModelAttribute DisplaceAuditBean displaceAuditBean){
         //返回页面数据
         PageResultBean resultBean =  new PageResultBean(PageResultBean.SUCCESS_CODE,"成功!");;
-
         try {
         	//获取登录信息
             HttpSession session = request.getSession();
@@ -1310,13 +1309,19 @@ public class AuditDetailController extends AbstractController{
 
 
 			//精品机判断是否是通票卖家
-			log.info("jpjgh===="+jpjgh);
+			log.info("1jpjgh===="+jpjgh);
 			log.info("saleId===="+displaceAuditBean.getSaleId());
-			if(jpjgh.equals(displaceAuditBean.getAgentId())){
-				String paltTpSet=displaceAuditService.findSaleInfoBySaleId(displaceAuditBean.getSaleId());
+			String saleId_f=StringUtils.isBlank(displaceAuditBean.getSaleId())?"":displaceAuditBean.getSaleId();
+			if(StringUtils.isBlank(displaceAuditBean.getSaleId())){
+				saleId_f=displaceAuditService.findDisPlaceInfoById(displaceAuditBean.getDisplaceId());
+			}
+			if(jpjgh.equals(displaceAuditBean.getAgentId())&&!("2").equals(displaceAuditBean.getIfDeposit())){
+				String paltTpSet=displaceAuditService.findSaleInfoBySaleId(saleId_f);
 				log.info("1paltTpSet===="+paltTpSet);
 				if(StringUtils.isNotBlank(paltTpSet)&&"0".equals(paltTpSet)){
 					displaceAuditBean.setIfDeposit("1");
+				}else{
+					displaceAuditBean.setIfDeposit("2");
 				}
 			}
 			// 补充信息
@@ -1325,14 +1330,20 @@ public class AuditDetailController extends AbstractController{
     	    	resultBean = new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
     	    	return;
     	    }
-
+			boolean flowFlag=false;
+			if(jpjgh.equals(displaceAuditBean.getAgentId())){
+				flowFlag=true;
+			}
         	String agentName = agentBean.getAgentName();
         	String appId = agentBean.getPubAppId();
         	String appSecret = agentBean.getPubAppSecret();
 
           //  String diggerUrl = TemplateConstants.ZHSH_DIGGER_URL + "?agentId=" + agentId + "&id=" + id;
 			String diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId="+displaceId+"&status="+displaceAuditBean+"&id=" + id;
-            String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
+			if("3".equals(displaceAuditBean.getUpType())){
+				diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/goodDetail" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
+			}
+			String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
             wxsms = wxsms.replaceAll("first", "有一台设备正在寻找买家");
             wxsms = wxsms.replaceAll("keyword1", sbmc+"");
 			if("3".equals(displaceAuditBean.getUpType())){
@@ -1348,156 +1359,206 @@ public class AuditDetailController extends AbstractController{
             List<PushRecordBean> list = new ArrayList<PushRecordBean>();
             PushRecordBean pushRecord = null;
 
-            // 发送车商信息
-            if(StringUtils.isNotBlank(ids)) {
-	            String[] diggers = ids.substring(0, ids.lastIndexOf(",")).split(",");
-	            for (int i = 0; i < diggers.length; i++) {
-	            	//获取车商bean,并获取车商微信openid和其他信息
-	                DiggerBean digger = diggerBeanService.queryDiggerByID(diggers[i]);
-	                if(digger == null){
-	                	continue;
-	                }
-	                String openId = digger.getWxOpenID();
-	                String wxnc = digger.getDaWxnc();
-	                String wxh = digger.getDaWxh();
-	                String name = digger.getDaName();
-	                String phone = digger.getDaPhone();
-
-	                // 组装车商微信内容
-	                Map<String,TemplateData> param1 = new HashMap<String,TemplateData>();
-	                param1.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
-	                param1.put("keyword1",new TemplateData(sbmc+"","#696969"));
-					if("3".equals(displaceAuditBean.getUpType())){
-						param1.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
-					}else{
-						param1.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
-					}
-	                param1.put("keyword3",new TemplateData(displaceAuditBean.getMoneyRange()+"万元","#696969"));
-	                param1.put("keyword4",new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"),"#696969"));
-	                param1.put("keyword5",new TemplateData(displaceAuditBean.getBail()+"万元","#696969"));
-	                param1.put("remark",new TemplateData("点击【详情】前往查看!","#696969"));
-
-	                if(StringUtils.isNotBlank(pushWx)){
-	                	 pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX, ConfigConstants.XXLB_SBSJ,
-	                 			appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
-	                     list.add(pushRecord);
-	                }
-
-	                if(StringUtils.isNotBlank(pushSms)){
-	               	 pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX, ConfigConstants.XXLB_SBSJ,
-	                			appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
-	                    list.add(pushRecord);
-	               }
+			if("1".equals(displaceAuditBean.getIfDeposit())&&flowFlag){
+				// 发送销售员信息
+				if(StringUtils.isNotBlank(saleId_f)) {
+					SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId_f);
+					if(salesBean != null){
+						String openId = salesBean.getWxOpenid();
+						String wxnc = salesBean.getSaleWxnc();
+						String wxh = salesBean.getSaleWxh();
+						String name = salesBean.getSaleName();
+						String phone = salesBean.getSalePhone();
+						String xqurl="https://www.xxinjiyuan.com/wjj-api/index.html#/join?agentId=GZZSNJ&displaceId=GZZSNJ-ZH0044&status=finished&id=5c8adc199c7f44a8ac398d9edbcd4914";
+						// String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
+						String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/payment?" + "?agentId=" + agentId +"&displaceId=" + displaceId;
+						// 组装销售员微信内容
+						Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
+						param2.put("first",new TemplateData("您上传的设备已审核通过,请及时确认上架","#696969"));
+						param2.put("keyword1",new TemplateData(wxnc,"#696969"));
+						param2.put("keyword2",new TemplateData(sbmc,"#696969"));
+						param2.put("keyword3",new TemplateData(pubTimeStr,"#696969"));
+						param2.put("keyword4",new TemplateData("待上架","#696969"));
+
+						String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
+						upsms = upsms.replace("sbmc", sbmc);
 
+						String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
+						wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
+						wxsms1 = wxsms1.replaceAll("keyword1", wxnc);
+						wxsms1 = wxsms1.replaceAll("keyword2", sbmc);
+						wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
+						wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
+						wxsms1 = wxsms1.replaceAll("remark", "点击详情立即确认");
+
+                    /*pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
+                			appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
+                    list.add(pushRecord);*/
+						pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1",ConfigConstants.XXLB_SBSJ,
+								appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
+						list.add(pushRecord);
+					}
 				}
-            }
 
-            // 发送微工程信息
-            if(StringUtils.isNotBlank(wgcids)) {
-            	String wgcAgentName = "";
-            	String wgcAppId = "";
-            	String wgcAppSecret = "";
-            	String wgcPriceLink = "";
-            	if("1".equals(agentBean.getIsAttent()) || "y".equals(agentBean.getIsAttent()) || ConfigConstants.WGC_ID.equals(agentId)) {
-            		 // 微工程信息
-            		AgentBean wgcBean = agentBeanService.getAgentBeanByAgentId(ConfigConstants.WGC_ID);
-            		wgcAgentName = wgcBean.getAgentName();;
-                	wgcAppId = wgcBean.getPubAppId();
-                	wgcAppSecret = wgcBean.getPubAppSecret();
-                	//wgcPriceLink = wgcBean.getPriceLink();
-					wgcPriceLink ="https://www.weigongcheng.net/wjj-api/index.html#/join?agentId=WGC000"+"&status="+displace.getAuditStatus()+"&id="+displace.getId();
-                	String[] wgcdiggers = wgcids.substring(0, wgcids.lastIndexOf(",")).split(",");
-                    for (int i = 0; i < wgcdiggers.length; i++) {
-                    	//获取车商bean,并获取车商微信openid和其他信息
-                        DiggerBean digger = diggerBeanService.queryDiggerByID(wgcdiggers[i]);
-                        if(digger == null){
-    	                	continue;
-    	                }
-                        String openId = digger.getWxOpenID();
-                        String wxnc = digger.getDaWxnc();
-                        String wxh = digger.getDaWxh();
-                        String name = digger.getDaName();
-                        String phone = digger.getDaPhone();
+				// 保存推送消息
+				pushRecordBeanService.saveRecords(list);
+			}else{
 
-                        // 组装车商微信内容
-                        Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
-                        param2.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
-                        param2.put("keyword1",new TemplateData(sbmc+"","#696969"));
+				// 发送车商信息
+				if(StringUtils.isNotBlank(ids)) {
+					String[] diggers = ids.substring(0, ids.lastIndexOf(",")).split(",");
+					for (int i = 0; i < diggers.length; i++) {
+						//获取车商bean,并获取车商微信openid和其他信息
+						DiggerBean digger = diggerBeanService.queryDiggerByID(diggers[i]);
+						if(digger == null){
+							continue;
+						}
+						String openId = digger.getWxOpenID();
+						String wxnc = digger.getDaWxnc();
+						String wxh = digger.getDaWxh();
+						String name = digger.getDaName();
+						String phone = digger.getDaPhone();
+
+						// 组装车商微信内容
+						Map<String,TemplateData> param1 = new HashMap<String,TemplateData>();
+						param1.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
+						param1.put("keyword1",new TemplateData(sbmc+"","#696969"));
 						if("3".equals(displaceAuditBean.getUpType())){
-							param2.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
+							param1.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
 						}else{
-							param2.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
+							param1.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
+						}
+						param1.put("keyword3",new TemplateData(displaceAuditBean.getMoneyRange()+"万元","#696969"));
+						param1.put("keyword4",new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"),"#696969"));
+						param1.put("keyword5",new TemplateData(displaceAuditBean.getBail()+"万元","#696969"));
+						param1.put("remark",new TemplateData("点击【详情】前往查看!","#696969"));
+
+						if(StringUtils.isNotBlank(pushWx)){
+							pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX, ConfigConstants.XXLB_SBSJ,
+									appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
+							list.add(pushRecord);
 						}
-                        param2.put("keyword3",new TemplateData(displaceAuditBean.getMoneyRange()+"万元","#696969"));
-                        param2.put("keyword4",new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"),"#696969"));
-                        param2.put("keyword5",new TemplateData(displaceAuditBean.getBail()+"万元","#696969"));
-                        param2.put("remark",new TemplateData("点击【详情】前往查看!","#696969"));
 
-                        wxsms = wxsms.replaceAll("keyword1", wxnc+"");
+						if(StringUtils.isNotBlank(pushSms)){
+							pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX, ConfigConstants.XXLB_SBSJ,
+									appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
+							list.add(pushRecord);
+						}
 
-                        if(StringUtils.isNotBlank(pushWx)){
-                        	pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
-                              		 wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
-                            list.add(pushRecord);
-                        }
-                        if(StringUtils.isNotBlank(pushSms)){
-                    	   pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
-                             		 wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
-                           list.add(pushRecord);
-                        }
-        			}
-            	}
-            }
+					}
+				}
 
-            // 发送销售员信息
-            if(StringUtils.isNotBlank(saleId)) {
-            	SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
-            	if(salesBean != null){
-            		String openId = salesBean.getWxOpenid();
-                    String wxnc = salesBean.getSaleWxnc();
-                    String wxh = salesBean.getSaleWxh();
-                    String name = salesBean.getSaleName();
-                    String phone = salesBean.getSalePhone();
+				// 发送微工程信息
+				if(StringUtils.isNotBlank(wgcids)) {
+					String wgcAgentName = "";
+					String wgcAppId = "";
+					String wgcAppSecret = "";
+					String wgcPriceLink = "";
+					if("1".equals(agentBean.getIsAttent()) || "y".equals(agentBean.getIsAttent()) || ConfigConstants.WGC_ID.equals(agentId)) {
+						// 微工程信息
+						AgentBean wgcBean = agentBeanService.getAgentBeanByAgentId(ConfigConstants.WGC_ID);
+						wgcAgentName = wgcBean.getAgentName();;
+						wgcAppId = wgcBean.getPubAppId();
+						wgcAppSecret = wgcBean.getPubAppSecret();
+						//wgcPriceLink = wgcBean.getPriceLink();
+						wgcPriceLink ="https://www.weigongcheng.net/wjj-api/index.html#/join?agentId=WGC000"+"&status="+displace.getAuditStatus()+"&id="+displace.getId();
+						String[] wgcdiggers = wgcids.substring(0, wgcids.lastIndexOf(",")).split(",");
+						for (int i = 0; i < wgcdiggers.length; i++) {
+							//获取车商bean,并获取车商微信openid和其他信息
+							DiggerBean digger = diggerBeanService.queryDiggerByID(wgcdiggers[i]);
+							if(digger == null){
+								continue;
+							}
+							String openId = digger.getWxOpenID();
+							String wxnc = digger.getDaWxnc();
+							String wxh = digger.getDaWxh();
+							String name = digger.getDaName();
+							String phone = digger.getDaPhone();
+
+							// 组装车商微信内容
+							Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
+							param2.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
+							param2.put("keyword1",new TemplateData(sbmc+"","#696969"));
+							if("3".equals(displaceAuditBean.getUpType())){
+								param2.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
+							}else{
+								param2.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
+							}
+							param2.put("keyword3",new TemplateData(displaceAuditBean.getMoneyRange()+"万元","#696969"));
+							param2.put("keyword4",new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"),"#696969"));
+							param2.put("keyword5",new TemplateData(displaceAuditBean.getBail()+"万元","#696969"));
+							param2.put("remark",new TemplateData("点击【详情】前往查看!","#696969"));
 
-                  //  String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
-					String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId="+displaceId+"&status="+displaceAuditBean+"&id=" + id;
+							wxsms = wxsms.replaceAll("keyword1", wxnc+"");
 
-                    // 组装销售员微信内容
-                    Map<String,TemplateData> param3 = new HashMap<String,TemplateData>();
-                    param3.put("first",new TemplateData("您上传的设备已上架成功,等待买家出价","#696969"));
-                    param3.put("keyword1",new TemplateData(wxnc,"#696969"));
-                    param3.put("keyword2",new TemplateData(sbmc,"#696969"));
-                    param3.put("keyword3",new TemplateData(pubTimeStr,"#696969"));
-                    param3.put("keyword4",new TemplateData("上架成功","#696969"));
-                    param3.put("remark",new TemplateData("赶快点击“详情”分享给大家吧!","#696969"));
+							if(StringUtils.isNotBlank(pushWx)){
+								pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
+										wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
+								list.add(pushRecord);
+							}
+							if(StringUtils.isNotBlank(pushSms)){
+								pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
+										wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
+								list.add(pushRecord);
+							}
+						}
+					}
+				}
 
-                    String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
-                    upsms = upsms.replace("sbmc", sbmc+"");
+				// 发送销售员信息
+				if(StringUtils.isNotBlank(saleId)) {
+					SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
+					if(salesBean != null){
+						String openId = salesBean.getWxOpenid();
+						String wxnc = salesBean.getSaleWxnc();
+						String wxh = salesBean.getSaleWxh();
+						String name = salesBean.getSaleName();
+						String phone = salesBean.getSalePhone();
 
-                    String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
-                    wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
-                    wxsms1 = wxsms1.replaceAll("keyword1", wxnc+"");
-                    wxsms1 = wxsms1.replaceAll("keyword2", sbmc+"");
-                    wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
-                    wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
-                    wxsms1 = wxsms1.replaceAll("remark", "赶快点击“详情”分享给大家吧!");
+						//  String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
+						String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId="+displaceId+"&status="+displaceAuditBean+"&id=" + id;
+
+						// 组装销售员微信内容
+						Map<String,TemplateData> param3 = new HashMap<String,TemplateData>();
+						param3.put("first",new TemplateData("您上传的设备已上架成功,等待买家出价","#696969"));
+						param3.put("keyword1",new TemplateData(wxnc,"#696969"));
+						param3.put("keyword2",new TemplateData(sbmc,"#696969"));
+						param3.put("keyword3",new TemplateData(pubTimeStr,"#696969"));
+						param3.put("keyword4",new TemplateData("上架成功","#696969"));
+						param3.put("remark",new TemplateData("赶快点击“详情”分享给大家吧!","#696969"));
+
+						String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
+						upsms = upsms.replace("sbmc", sbmc+"");
+
+						String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
+						wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
+						wxsms1 = wxsms1.replaceAll("keyword1", wxnc+"");
+						wxsms1 = wxsms1.replaceAll("keyword2", sbmc+"");
+						wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
+						wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
+						wxsms1 = wxsms1.replaceAll("remark", "赶快点击“详情”分享给大家吧!");
+
+						if(StringUtils.isNotBlank(pushWx)){
+							pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
+									appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
+							list.add(pushRecord);
+						}
+						if(StringUtils.isNotBlank(pushSms)){
+							pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
+									appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
+							list.add(pushRecord);
+						}
+
+					}
+				}
+
+				// 保存推送消息
+				pushRecordBeanService.saveRecords(list);
+
+			}
 
-                    if(StringUtils.isNotBlank(pushWx)){
-                    	pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
-                    			appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
-                        list.add(pushRecord);
-                    }
-                    if(StringUtils.isNotBlank(pushSms)){
-                    	pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
-                    			appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
-                        list.add(pushRecord);
-                    }
 
-            	}
-            }
 
-            // 保存推送消息
-           pushRecordBeanService.saveRecords(list);
         } catch (Exception e) {
             resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
             log.error("addInfo error!",e);
@@ -1721,7 +1782,10 @@ public class AuditDetailController extends AbstractController{
 				}
 			}
 
-
+			boolean flowFlag=false;
+			if(jpjgh.equals(displaceAuditBean.getAgentId())){
+				flowFlag=true;
+			}
 
         	// 记录id
             String id = super.getParameter(request, "id");
@@ -1761,10 +1825,10 @@ public class AuditDetailController extends AbstractController{
 			PushRecordBean pushRecord = null;
 			List<PushRecordBean> list = new ArrayList<PushRecordBean>();
 			//如果卖家不是通票会员,推送给卖家支付固定保证金
-			if("1".equals(displaceAuditBean.getIfDeposit())){
+			if("1".equals(displaceAuditBean.getIfDeposit())&&flowFlag){
 				// 发送销售员信息
-				if(StringUtils.isNotBlank(saleId)) {
-					SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
+				if(StringUtils.isNotBlank(saleId_f)) {
+					SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId_f);
 					if(salesBean != null){
 						String openId = salesBean.getWxOpenid();
 						String wxnc = salesBean.getSaleWxnc();
@@ -1773,7 +1837,7 @@ public class AuditDetailController extends AbstractController{
 						String phone = salesBean.getSalePhone();
 						String xqurl="https://www.xxinjiyuan.com/wjj-api/index.html#/join?agentId=GZZSNJ&displaceId=GZZSNJ-ZH0044&status=finished&id=5c8adc199c7f44a8ac398d9edbcd4914";
 						// String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
-						String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/payment?" + "?agentId=" + agentId +"&id=" + id;
+						String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/payment?" + "?agentId=" + agentId +"&displaceId=" + displaceId;
 						// 组装销售员微信内容
 						Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
 						param2.put("first",new TemplateData("您上传的设备已审核通过,请及时确认上架","#696969"));
@@ -1809,6 +1873,9 @@ public class AuditDetailController extends AbstractController{
 				// 反馈内容
 				//  String diggerUrl = TemplateConstants.ZHSH_DIGGER_URL + "?agentId=" + agentId + "&id=" + id;
 				String diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
+				if("3".equals(displaceAuditBean.getUpType())){
+					diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/goodDetail" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
+				}
 				String sms = TemplateConstants.ZHSH_DIGGER_UP_SMS;
 				sms = sms.replaceAll("agentName", agentName);
 				sms = sms.replaceAll("displaceId", displaceId);
@@ -1916,42 +1983,14 @@ public class AuditDetailController extends AbstractController{
 
     }
 
-
-
-
-
 	@RequestMapping("/appAddInfo2.do")
-	public void appAddInfo2(HttpServletRequest request, HttpServletResponse response,  @ModelAttribute DisplaceAuditBean displaceAuditBean){
+	public void appAddInfo2(String displaceId){
 		//返回页面数据
 		PageResultBean resultBean =  new PageResultBean(PageResultBean.SUCCESS_CODE,"成功!");;
 
 		try {
-
-
-			Double min=Double.parseDouble(displaceAuditBean.getMinPrice());
-			Double max=Double.parseDouble(displaceAuditBean.getMaxPrice());
-			Double moneyRang=Double.parseDouble(displaceAuditBean.getMoneyRange());
-
-			String displaceId = super.getParameter(request, "displaceId");
 			//获取置换信息
-			displaceAuditBean=displaceAuditService.queryAuditAllByDisplaceId(displaceId);
-
-
-
-			//修改状态为 已审核待上架
-
-/*
-        	  修改设备状态为 已审核已上架
-        	 */
-/*			if (null != displaceAuditBean.getAgentType() && displaceAuditBean.getAgentType() == 2) {
-				log.info("商家类型为代运营,更新为已审核待上架");
-				displaceAuditBean.setAuditStatus("4");
-			}
-			log.info("商家类型为自运营,更新为已审核待上架",displaceAuditBean.getAgentType());
-			if (displaceAuditBean.getAgentType() == 1) {
-				log.info("商家类型为自运营,更新为已审核待上架");
-				displaceAuditBean.setAuditStatus("4");
-			}*/
+			DisplaceAuditBean displaceAuditBean=displaceAuditService.queryAuditAllByDisplaceId(displaceId);
 
 			log.info("更新为已审核待上架");
 			displaceAuditBean.setAuditStatus("4");
@@ -1962,25 +2001,24 @@ public class AuditDetailController extends AbstractController{
 			log.info("saleId===="+displaceAuditBean.getSaleId());
 
 			// 记录id
-			String id = super.getParameter(request, "id");
+			String id = displaceAuditBean.getId();
 			// 车商ID
-			String ids = super.getParameter(request, "ids");
+			String ids = displaceAuditBean.getIds();
 			if(StringUtils.isEmpty(ids)) {
 				resultBean = new PageResultBean(PageResultBean.FAIL_CODE, "请选择推送车商!");
 				return;
 			}
 
 			// 销售员ID
-			String saleId = super.getParameter(request, "saleId");
+			String saleId = displaceAuditBean.getSaleId();
 			//取出带过来的置换ID
 			DisplaceAuditBean displace = displaceAuditService.queryAuditPageByDisplaceId(displaceId);
 			//设备名称
 			String sbmc = displace.getAttrContent().get("sbpp") + " " + displace.getAttrContent().get("sbxh") + " " + displace.getAttrContent().get("sblx");
 			// 发布时间
-			String pubTimeStr = super.getParameter(request, "pubTimeStr");
-			Date pubTime = null;
+			String pubTimeStr = "";
+			Date pubTime = displaceAuditBean.getPubTime();
 			try {
-				pubTime = DateUtil.parse(pubTimeStr, DateUtil.DEFAULT);
 				pubTimeStr = DateUtil.format(pubTime, "yyyy年MM月dd日 HH:mm");
 			} catch (Exception e) {
 				pubTimeStr = "";
@@ -1988,13 +2026,6 @@ public class AuditDetailController extends AbstractController{
 
 			//存储被推送人 ids
 			displaceAuditBean.setIds(ids);
-			// 补充信息
-			boolean flag = displaceAuditService.addInfoNew(displaceAuditBean);
-			if(!flag){
-				resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
-				return;
-			}
-
 			PushRecordBean pushRecord = null;
 			List<PushRecordBean> list = new ArrayList<PushRecordBean>();
 			String agentId=displaceAuditBean.getAgentId();
@@ -2113,7 +2144,7 @@ public class AuditDetailController extends AbstractController{
 			resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
 			log.error("addInfo error!",e);
 		}finally{
-			super.printResult(request, response, resultBean.toString());
+
 		}
 
 	}

+ 278 - 0
src/main/java/com/agent/action/audit/SendTempController.java

@@ -0,0 +1,278 @@
+package com.agent.action.audit;
+
+import com.agent.action.common.AbstractController;
+import com.agent.constans.CommonConstants;
+import com.agent.constans.ConfigConstants;
+import com.agent.constans.TemplateConstants;
+import com.agent.model.audit.bean.*;
+import com.agent.model.audit.service.DisplaceAuditService;
+import com.agent.model.bms.bean.UserBean;
+import com.agent.model.bms.service.BaseLoginService;
+import com.agent.model.common.bean.PageResultBean;
+import com.agent.model.common.bean.RegionBean;
+import com.agent.model.common.bean.ResultBean;
+import com.agent.model.digger.bean.DiggerBean;
+import com.agent.model.digger.service.DiggerBeanService;
+import com.agent.model.offer.service.OfferBeanService;
+import com.agent.model.pushrecord.bean.PushRecordBean;
+import com.agent.model.pushrecord.service.PushRecordBeanService;
+import com.agent.model.sale.bean.SalesBean;
+import com.agent.model.sale.service.SaleBeanService;
+import com.agent.model.shop.bean.AgentBean;
+import com.agent.model.shop.service.AgentBeanService;
+import com.agent.model.usercolumn.bean.UserColumnRoleBean;
+import com.agent.model.wxInterface.bean.TemplateData;
+import com.agent.util.*;
+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.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * 审核明细controller
+ *
+ */
+@RestController
+@RequestMapping("/sendTemp")
+public class SendTempController extends AbstractController{
+
+	private static Logger log = LoggerFactory.getLogger(SendTempController.class);
+
+	/**
+	 * 状态值1
+	 */
+	private final String STATE_1 = "1";
+
+    /**
+     * 报价service
+     */
+    @Autowired
+    private OfferBeanService offerBeanService;
+
+    /**
+     * 置换审核service
+     */
+    @Autowired
+    private DisplaceAuditService displaceAuditService;
+
+    /**
+     * 车商service
+     */
+    @Autowired
+    private DiggerBeanService diggerBeanService;
+
+    /**
+     * 信息记录service
+     */
+    @Autowired
+    private PushRecordBeanService pushRecordBeanService;
+
+    /**
+     * 销售员service
+     */
+    @Autowired
+    private SaleBeanService saleBeanService;
+
+    /**
+     * 代理商service
+     */
+    @Autowired
+    private AgentBeanService agentBeanService;
+
+    /**
+     * 公用service
+     */
+    @Autowired
+    private BaseLoginService baseLoginService;
+
+    @Value("${wjj.api.domain}")
+	private String apiDomain;
+
+    //精品机配置
+	@Value("${jpjgh}")
+	private String jpjgh;
+
+
+	@RequestMapping("/sendWXMessage.do")
+	public void sendWXMessage(String displaceId){
+		//返回页面数据
+		PageResultBean resultBean =  new PageResultBean(PageResultBean.SUCCESS_CODE,"成功!");;
+
+		try {
+			//获取置换信息
+			DisplaceAuditBean displaceAuditBean=displaceAuditService.queryAuditAllByDisplaceId(displaceId);
+
+			log.info("更新为已审核待上架");
+			displaceAuditBean.setAuditStatus("4");
+
+
+			//精品机判断是否是通票卖家
+			log.info("1jpjgh===="+jpjgh);
+			log.info("saleId===="+displaceAuditBean.getSaleId());
+
+			// 记录id
+			String id = displaceAuditBean.getId();
+			// 车商ID
+			String ids = displaceAuditBean.getIds();
+			if(StringUtils.isEmpty(ids)) {
+				resultBean = new PageResultBean(PageResultBean.FAIL_CODE, "请选择推送车商!");
+				return;
+			}
+
+			// 销售员ID
+			String saleId = displaceAuditBean.getSaleId();
+			//取出带过来的置换ID
+			DisplaceAuditBean displace = displaceAuditService.queryAuditPageByDisplaceId(displaceId);
+			//设备名称
+			String sbmc = displace.getAttrContent().get("sbpp") + " " + displace.getAttrContent().get("sbxh") + " " + displace.getAttrContent().get("sblx");
+			// 发布时间
+			String pubTimeStr = "";
+			Date pubTime = displaceAuditBean.getPubTime();
+			try {
+				pubTimeStr = DateUtil.format(pubTime, "yyyy年MM月dd日 HH:mm");
+			} catch (Exception e) {
+				pubTimeStr = "";
+			}
+
+			//存储被推送人 ids
+			displaceAuditBean.setIds(ids);
+			PushRecordBean pushRecord = null;
+			List<PushRecordBean> list = new ArrayList<PushRecordBean>();
+			String agentId=displaceAuditBean.getAgentId();
+			AgentBean agentBean = agentBeanService.getAgentBeanByAgentId(agentId);
+			if(agentBean == null) {
+				resultBean = new PageResultBean(PageResultBean.FAIL_CODE, "未查询到代理商信息!");
+				return;
+			}
+			String agentName = agentBean.getAgentName();
+			String appId =agentBean.getPubAppId();
+			String appSecret = agentBean.getPubAppSecret();
+			Date startTime = displaceAuditBean.getStartTime();
+			Date endTime = displaceAuditBean.getEndTime();
+
+			// 反馈内容
+			String diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
+			if("3".equals(displaceAuditBean.getUpType())){
+				diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/goodDetail" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
+			}
+			String sms = TemplateConstants.ZHSH_DIGGER_UP_SMS;
+			sms = sms.replaceAll("agentName", agentName);
+			sms = sms.replaceAll("displaceId", displaceId);
+			sms = sms.replaceAll("sbmc", sbmc);
+
+			String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
+			wxsms = wxsms.replaceAll("first", "有一台设备正在寻找买家");
+			wxsms = wxsms.replaceAll("keyword1", sbmc + "");
+			if ("3".equals(displaceAuditBean.getUpType())) {
+				wxsms = wxsms.replaceAll("keyword2", "最低价:" + displaceAuditBean.getMinPrice() + "万元-最高价:" + displaceAuditBean.getMaxPrice() + "万元");
+			} else {
+				wxsms = wxsms.replaceAll("keyword2", displaceAuditBean.getMinMoney() + "万元");
+			}
+			wxsms = wxsms.replaceAll("keyword3", displaceAuditBean.getMoneyRange() + "万元");
+			wxsms = wxsms.replaceAll("keyword4", DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"));
+			wxsms = wxsms.replaceAll("keyword5", displaceAuditBean.getBail() + "万元");
+			wxsms = wxsms.replaceAll("remark", "点击【详情】前往查看!");
+
+			//
+			// 发送车商信息
+			String[] diggers = ids.substring(0, ids.lastIndexOf(",")).split(",");
+			for (int i = 0; i < diggers.length; i++) {
+				//获取车商bean,并获取车商微信openid和其他信息
+				DiggerBean digger = diggerBeanService.queryDiggerByID(diggers[i]);
+				if (digger == null) {
+					continue;
+				}
+				String openId = digger.getWxOpenID();
+				String wxnc = digger.getDaWxnc();
+				String wxh = digger.getDaWxh();
+				String name = digger.getDaName();
+				String phone = digger.getDaPhone();
+
+				// 组装车商微信内容
+				Map<String, TemplateData> param1 = new HashMap<String, TemplateData>();
+				param1.put("first", new TemplateData("有一台设备正在寻找买家", "#696969"));
+				param1.put("keyword1", new TemplateData(sbmc + "", "#696969"));
+				if ("3".equals(displaceAuditBean.getUpType())) {
+					param1.put("keyword2", new TemplateData("最低价:" + displaceAuditBean.getMinPrice() + "万元-最高价:" + displaceAuditBean.getMaxPrice() + "万元", "#696969"));
+				} else {
+					param1.put("keyword2", new TemplateData(displaceAuditBean.getMinMoney() + "万元", "#696969"));
+				}
+				param1.put("keyword3", new TemplateData(displaceAuditBean.getMoneyRange() + "万元", "#696969"));
+				param1.put("keyword4", new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"), "#696969"));
+				param1.put("keyword5", new TemplateData(displaceAuditBean.getBail() + "万元", "#696969"));
+				param1.put("remark", new TemplateData("点击【详情】前往查看!", "#696969"));
+
+				wxsms = wxsms.replaceAll("keyword1", wxnc);
+			   /* pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
+						appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
+				list.add(pushRecord);*/
+				pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1", ConfigConstants.XXLB_SBSJ,
+						appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
+				list.add(pushRecord);
+			}
+
+			// 发送销售员信息
+			if (StringUtils.isNotBlank(saleId)) {
+				SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
+				if (salesBean != null) {
+					String openId = salesBean.getWxOpenid();
+					String wxnc = salesBean.getSaleWxnc();
+					String wxh = salesBean.getSaleWxh();
+					String name = salesBean.getSaleName();
+					String phone = salesBean.getSalePhone();
+					String xqurl = "https://www.xxinjiyuan.com/wjj-api/index.html#/join?agentId=GZZSNJ&displaceId=GZZSNJ-ZH0044&status=finished&id=5c8adc199c7f44a8ac398d9edbcd4914";
+					// String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
+					String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean + "&id=" + id;
+					// 组装销售员微信内容
+					Map<String, TemplateData> param2 = new HashMap<String, TemplateData>();
+					param2.put("first", new TemplateData("您上传的设备已上架成功,等待买家出价", "#696969"));
+					param2.put("keyword1", new TemplateData(wxnc, "#696969"));
+					param2.put("keyword2", new TemplateData(sbmc, "#696969"));
+					param2.put("keyword3", new TemplateData(pubTimeStr, "#696969"));
+					param2.put("keyword4", new TemplateData("上架成功", "#696969"));
+
+					String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
+					upsms = upsms.replace("sbmc", sbmc);
+
+					String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
+					wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
+					wxsms1 = wxsms1.replaceAll("keyword1", wxnc);
+					wxsms1 = wxsms1.replaceAll("keyword2", sbmc);
+					wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
+					wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
+					wxsms1 = wxsms1.replaceAll("remark", "赶快点击“详情”分享给大家吧!");
+
+					/*pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
+							appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
+					list.add(pushRecord);*/
+					pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1", ConfigConstants.XXLB_SBSJ,
+							appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
+					list.add(pushRecord);
+				}
+			}
+
+			// 保存推送消息
+			pushRecordBeanService.saveRecords(list);
+		} catch (Exception e) {
+			resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
+			log.error("addInfo error!",e);
+		}finally{
+
+		}
+
+	}
+
+}

+ 9 - 2
src/main/java/com/agent/action/loginfilter/LoginFilter.java

@@ -42,8 +42,13 @@ public class LoginFilter implements Filter {
         //排除不需要拦截的访问
         String url = request.getRequestURI().toString();  
         // 登陆url  
-        String loginUrl = request.getContextPath() + "/" + sessionOut; 
-        
+        String loginUrl = request.getContextPath() + "/" + sessionOut;
+
+
+        /**
+         * 添加过滤
+         */
+
         /* 
          * 注:在pattenURL中的全部不拦截 
          * url.indexOf(urlStr) > -1  表示urlStr在url中出现过,出现就不拦截 
@@ -106,6 +111,8 @@ public class LoginFilter implements Filter {
         pattenURL.add("/login/actIndex.do");
         // 授权登录
         pattenURL.add("/wx/wxlogin.do");
+
+        pattenURL.add("/sendTemp/sendWXMessage.do");
     }
 
 }

+ 1 - 1
src/main/java/com/agent/model/audit/dao/DisplaceAuditDao.java

@@ -504,7 +504,7 @@ public class DisplaceAuditDao<BaseBean> extends BaseDaoImpl<BaseBean> {
         List<Object> params = new ArrayList<Object>();
         StringBuffer sql = new StringBuffer();
         sql.append(" select a.id,a.agent_id,a.agent_name,a.displace_id,a.idea_price,a.pub_time,a.audit_time,a.journalist_name,");
-        sql.append(" a.journalist_tel,a.audit_status,a.sale_id,a.warranty_desc,a.others_desc,b.is_attent,a.start_time,a.end_time,a.is_kxc ");
+        sql.append(" a.journalist_tel,a.audit_status,a.sale_id,a.warranty_desc,a.others_desc,b.is_attent,a.start_time,a.end_time,a.is_kxc,if_deposit");
         sql.append(" from "+CommonConstants.TB_DISPLACE_AUDIT+" a left join "+ CommonConstants.TB_AGENT + " b on a.agent_id = b.agent_id and b.state = '1' where 1 = 1");
 
         StringBuffer totalsql = new StringBuffer();

+ 1 - 0
src/main/java/com/agent/model/audit/dao/convert/DisplaceAuditBeanConvert.java

@@ -48,6 +48,7 @@ public class DisplaceAuditBeanConvert  extends BaseIConvertBean{
 			bean.setPersistPrice(CommonUtil.moneyToWanYuan(super.getIntegerValue(map,"persist_price")+""));
 			bean.setIs_good(super.getStringValue(map,"is_good"));
 			bean.setIds(super.getStringValue(map,"ids"));
+			bean.setIfDeposit(super.getStringValue(map,"if_deposit"));
 			// 是否结束
 			if(bean.getEndTime()!=null && bean.getEndTime().getTime() < System.currentTimeMillis()){
 				bean.setIsEnd("1");

+ 14 - 2
src/main/webapp/WEB-INF/views/audit/goodAdminAuditDetailShow.jsp

@@ -852,9 +852,21 @@
 		});
 	}
 
-	function downFiles(){
+	$(function(){
+        var minPrice=parseFloat(${auditBean.minPrice});
+        $("#minPrice").val(minPrice);
 
-	}
+        var maxPrice=parseFloat(${auditBean.maxPrice});
+        $("#maxPrice").val(maxPrice);
+        var persistPrice=parseFloat(${auditBean.persistPrice});
+        $("#persistPrice").val(persistPrice);
+        var minMoney=parseFloat(${auditBean.minMoney});
+        $("#minMoney").val(minMoney);
+        var moneyRange=parseFloat(${auditBean.moneyRange});
+        $("#moneyRange").val(moneyRange);
+        var bail=parseFloat(${auditBean.bail});
+        $("#bail").val(bail);
+	})
 
 </script>
 </html>

+ 20 - 8
src/main/webapp/WEB-INF/views/audit/goodAdminAuditList.jsp

@@ -469,15 +469,27 @@ type="text/javascript"></script> --%>
                         rowstr += "<td><span>已驳回</span></td><td><span style='color:orange'>待上架</span></td>";
                         subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span></div>';
                     }else if(body.auditStatus == "1"){
-                        rowstr += "<td><span>已审核</span></td><td><span>已上架</span></td>";
-                        if(body.isAttent == "1" && body.isEnd ==  "1"){
-                            subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span><span onclick="reShelf(\'' + body.id + '\')">重新上架</span></div>';
-                        }else{
-                            subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span></div>';
-                        }
+                        if(body.ifDeposit=="2"){
+                            rowstr += "<td><span>已审核</span></td><td><span>已上架</span></td>";
+                            if(body.isAttent == "1" && body.isEnd ==  "1"){
+                                subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span><span onclick="reShelf(\'' + body.id + '\')">重新上架</span></div>';
+                            }else{
+                                subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span></div>';
+                            }
+						}else{
+                            rowstr += "<td><span>已审核</span></td><td><span style='color:orange'>待确认</span></td>";
+							subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span></div>';
+						}
+
                     }else if(body.auditStatus == "3"){
-                        rowstr += "<td><span>已审核</span></td><td><span>已上架</span></td>";
-                        subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span></div>';
+                        if(body.ifDeposit=="2"){
+                            rowstr += "<td><span>已审核</span></td><td><span>已上架</span></td>";
+                            subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span></div>';
+						}else{
+                            rowstr += "<td><span>已审核</span></td><td><span style='color:orange'>待确认</span></td>";
+                            subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span></div>';
+						}
+
                     }else if (body.auditStatus == "4") {
                         rowstr += "<td><span>已审核</span></td><td><span style='color:orange'>待上架</span></td>";
                         subMenuHtml = '<div class="menus" onmouseleave="hideMenu(this, \'' + body.id + '\')" style="display:none;" id="m' +body.id+ '"><span style="border-bottom: 1px dotted #7fce81;" onclick="showAuditDetail(\'' + body.id + '\')">查看</span><span onclick="shelf(\'' + body.id + '\')">上架审核</span></div>';

+ 8 - 7
src/main/webapp/resources/js/audit/goodAudit.js

@@ -212,7 +212,7 @@ function showAuditDetail(auditId){
 				for(var i=0;i<type.length;i++){
                     console.log("====="+type[i]);
 					if("1"==type[i]){
-                        html+='<label><input style="margin:-2px 4px 1px 0;vertical-align:middle;width:20px;" type="radio" id="upType1" name="upType" checked="checked" value="1" onchange="chooseType(this)"/>置换报价</label>';
+                        html+='<label><input style="margin:-2px 4px 1px 0;vertical-align:middle;width:20px;" type="radio" id="upType1" name="upType" value="1" onchange="chooseType(this)"/>置换报价</label>';
 					}
                     if("2"==type[i]){
                         html+='<label><input style="margin:-2px 4px 1px 0;vertical-align:middle;width:20px;" type="radio" id="upType2" name="upType" value="2" onchange="chooseType(this)"/>网络竞销</label>';
@@ -231,9 +231,10 @@ function showAuditDetail(auditId){
 					}
 				}
                 $("#agent_rule_type").append(html);
-				$("#bail").val(auditBean.bail);
-				$("#minMoney").val(auditBean.minMoney);
-				$("#moneyRange").val(auditBean.moneyRange);
+                $("#agent_rule_type").find('input').eq(0).attr("checked",true);
+				$("#bail").val(Math.round(auditBean.bail*100)/100);
+				$("#minMoney").val(Math.round(auditBean.minMoney*100)/100);
+				$("#moneyRange").val(Math.round(auditBean.moneyRange*100)/100);
 				$("#timeDelay").val(auditBean.timeDelay);
 				$("#saleId").attr("wade",auditBean.saleId);
 				$("#query_saleId").val(auditBean.saleId);
@@ -255,9 +256,9 @@ function showAuditDetail(auditId){
 					$(".agentInfo").hide();
 				}
 				console.log("====="+auditBean.minPrice);
-				$("#minPrice").val(auditBean.minPrice);
-                $("#maxPrice").val(auditBean.maxPrice);
-                $("#persistPrice").val(auditBean.persistPrice);
+				$("#minPrice").val(Math.round(auditBean.minPrice*100)/100);
+                $("#maxPrice").val(Math.round(auditBean.maxPrice*100)/100);
+                $("#persistPrice").val(Math.round(auditBean.persistPrice*100)/100);
 
                 // $('input[name=is_good][value=' + auditBean.is_good + ']').attr('checked', 'checked');