From 54e6e80a9a837cbebc43a82b00c1bc60d0bf0dc3 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 12 Jul 2022 16:49:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E7=BB=AD?= =?UTF-8?q?=E8=B4=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weixin/WeiXinEvaluationController.java | 27 ++++++++- .../open/model/weixin/EvaluationModel.java | 9 +++ .../src/main/webapp/static/js/report.js | 46 ++++++++++++++- .../src/main/webapp/static/style/wx.css | 2 +- .../main/webapp/weiXinEvaluation/bhreport.ftl | 57 ++++++++++++++++++- 5 files changed, 131 insertions(+), 10 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java index 272979fca..587b3888d 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java @@ -918,6 +918,19 @@ public class WeiXinEvaluationController { return jsonMmodel; } + public Object saveBhLoanAction(EvaluationModel model){ + JsonModel jsonMmodel = new JsonModel(); + if(StringUtils.isNotBlank(model.getEvaluationId())){ + FjtEvaluation fjtEvaluation = fjtEvaluationService.findEvaluationById(Long.valueOf(model.getEvaluationId())); + if(fjtEvaluation != null && fjtEvaluation.getLoan()!=model.getLoan()){ + fjtEvaluation.setLoan(model.getLoan()); + fjtEvaluation.setLastUpdated(new Date()); + fjtEvaluationService.updateEvaluation(fjtEvaluation); + } + } + return jsonMmodel; + } + //ˢÐÂÉóº˼Û public Object refreshAuditPriceAction(EvaluationModel model){ JsonModel jsonMmodel = new JsonModel(); @@ -1106,9 +1119,15 @@ public class WeiXinEvaluationController { public Object checkImageAction(EvaluationModel model){ JsonModel jsonModel = new JsonModel(); if (StringUtils.isNotBlank(model.getEvaluationId())){ - List datas = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 3); + List datas3 = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 3); Map data = new HashMap(); - data.put("count", datas.size()); + data.put("count_3", datas3.size()); + + FjtEvaluation evaluation = fjtEvaluationService.findEvaluationById(Long.valueOf(model.getEvaluationId())); + if(evaluation!=null && evaluation.getLoan()!=null && evaluation.getLoan()==1){ + List datas5 = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 5); + data.put("count_5", datas5.size()); + } jsonModel.setJsonModel(data); } return jsonModel; @@ -1287,7 +1306,7 @@ public class WeiXinEvaluationController { FjtUsers fjtUser = fjtUsersService.findById(Long.valueOf(userId)); UsersDetail usersDetail = usersDetailService.findById(fjtUser.getId()); try { - String id = new ObjectId().toString(); + List uploadfiles = new ArrayList(); for (CommonsMultipartFile file : files) { if (file.getSize() == 0 ) { @@ -1319,6 +1338,8 @@ public class WeiXinEvaluationController { } catch (IOException e) { //´¦ÀíÒ쳣ÐÅϢ } + String id = new ObjectId().toString(); + reportFileAttach = new ReportFileAttach(); reportFileAttach.setEvaluationId(Integer.valueOf(model.getEvaluationId())); reportFileAttach.setQueryId(model.getQueryId()); diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java b/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java index 8de0977f8..20f093053 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java @@ -45,6 +45,7 @@ public class EvaluationModel extends BaseModel{ private Map loanInfoMap; private Integer hopePrice; private String remark; + private Integer loan; // private String preCode;//²³º£½ӿÚ--¥Å̱àÂë // private String preName;//²³º£½ӿÚ--¥ÅÌÃû³Æ // private String countryCode;//²³º£½ӿÚ--ÇøÓò±àÂë @@ -317,4 +318,12 @@ public class EvaluationModel extends BaseModel{ public void setAddress(String address) { this.address = address; } + + public Integer getLoan() { + return loan; + } + + public void setLoan(Integer loan) { + this.loan = loan; + } } diff --git a/projects/fangjia-open/src/main/webapp/static/js/report.js b/projects/fangjia-open/src/main/webapp/static/js/report.js index 92ef631b5..12d52f2a2 100644 --- a/projects/fangjia-open/src/main/webapp/static/js/report.js +++ b/projects/fangjia-open/src/main/webapp/static/js/report.js @@ -190,6 +190,36 @@ $('#submitRemark').on('click', function () { } }); +$('#submitLoan').on('click', function () { + var opt = $("#submitLoan").text(); + if(opt == "修改"){ + $(this).parent().find("span").eq(1).hide() + $("input[name=loan]").removeClass("dn"); + $("#submitLoan").text("保存"); + }else{ + var loan = $("input[name=loan]").val(); + if(loan == ""){ + $.toast("请输入是否续贷"); + }else{ + $.ajax({ + url:"saveBhLoan", + data:{ + evaluationId:eId, + loan:loan + }, + dataType:"json", + success:function(data){ + $("#submitLoan").remove(); + $("input[name=loan]").remove(); + $("#refreshPrice0").show(); + location.href ="bhreport?evaluationId="+eId; + } + }) + } + } +}); + + $('#refreshPrice,#refreshPrice0').on('click', function () { $.ajax({ url:"refreshAuditPrice", @@ -308,10 +338,20 @@ $('.formal_btn').on('click', function () { }, dataType:"json", success:function(data){ - if(data && data.count>0){ - clickFormalReport() + if(isLoan && isLoan==1){ + if(data.count_5==0){ + $.alert('请上传产调报告或权籍!'); + }else if(data.count_3==0){ + $.alert('请上传房屋照片!'); + }else{ + clickFormalReport() + } }else{ - $.alert('请上传房屋照片!'); + if(data.count_3==0){ + $.alert('请上传房屋照片!'); + }else{ + clickFormalReport() + } } } }) diff --git a/projects/fangjia-open/src/main/webapp/static/style/wx.css b/projects/fangjia-open/src/main/webapp/static/style/wx.css index 269a1a00e..0e85e8a93 100644 --- a/projects/fangjia-open/src/main/webapp/static/style/wx.css +++ b/projects/fangjia-open/src/main/webapp/static/style/wx.css @@ -134,7 +134,7 @@ input::-webkit-input-placeholder{ .inputTopic01{margin-bottom:-1px;} .inputTopic01 .topicTitle,.inputTopic02 .topicTitle{margin-right:0;border:none;line-height:2.5rem;} .inputTopic01 .topicTitle .input_price{width:20%;padding-left:5px;} -.inputTopic02 .topicTitle .input_lender{width:40%;padding-left:5px;} +.inputTopic02 .topicTitle .input_lender{width:39%;padding-left:5px;line-height: 28px;} .inputTopic02 .topicTitle .input_cardId{width:35%;padding-left:5px;} .submit_btn{width:90px;border-left:solid 1px #e7e7e7;float:right;padding-right:0;text-align:center;cursor:pointer;} .left01{float:left;margin-right:8%;} diff --git a/projects/fangjia-open/src/main/webapp/weiXinEvaluation/bhreport.ftl b/projects/fangjia-open/src/main/webapp/weiXinEvaluation/bhreport.ftl index 165012ff6..d6d340434 100644 --- a/projects/fangjia-open/src/main/webapp/weiXinEvaluation/bhreport.ftl +++ b/projects/fangjia-open/src/main/webapp/weiXinEvaluation/bhreport.ftl @@ -132,6 +132,18 @@ + +
@@ -139,7 +151,7 @@ <#if reportFileMap??>
已上传文件: - <#if reportFileMap["1"]??>询价单(${reportFileMap["1"]?size}) + <#if reportFileMap["5"]??>产调报告或权籍(${reportFileMap["5"]?size}) <#if reportFileMap["2"]??> <#if reportFileMap["3"]??> <#if reportFileMap["4"]??> @@ -456,6 +468,10 @@