This commit is contained in:
2022-07-13 13:34:53 +08:00
9 changed files with 163 additions and 26 deletions
@@ -1847,6 +1847,9 @@ public class DataUtil {
//
// System.out.println(FourUpSixInto("258.393", 2));
String href = encodePicUrl("62afd81d303c3f827833bb03", "o", "upload");
String link = "http://static.fangjia.com/stc/fs/"+href;
System.out.println(link);
}
}
@@ -182,10 +182,10 @@
</div>
</div>
</div>
<div class="overview_right adBoxApp03">
<p><label>扫码下载<em>“有房”APP</em></label><br><small>更多次的评估,更好的体验</small></p>
<img src="${staticUrl}/images/fangjia/v5/app_wx_gujia02.png">
</div>
<#-- <div class="overview_right adBoxApp03">-->
<#-- <p><label>扫码下载<em>“有房”APP</em></label><br><small>更多次的评估,更好的体验</small></p>-->
<#-- <img src="${staticUrl}/images/fangjia/v5/app_wx_gujia02.png">-->
<#-- </div>-->
</div>
<!-- PC端 -->
@@ -105,6 +105,7 @@ public class FjtEvaluation implements SqlEntity{
private String certificateAddress; //产证地址
private Date downPdfDate;//下载报告时间
private Integer loan ;//是否续贷 1:是 0:否
@GeneratedValue(strategy = GenerationType.AUTO)
@Id
@@ -773,6 +774,15 @@ public class FjtEvaluation implements SqlEntity{
this.downPdfDate = downPdfDate;
}
@Column(name = "loan")
public Integer getLoan() {
return loan;
}
public void setLoan(Integer loan) {
this.loan = loan;
}
@Override
public String toString() {
return "FjtEvaluation{" +
@@ -11,7 +11,7 @@ public class ReportFileAttach implements SqlEntity {
private Integer userId;
private Integer evaluationId;
private String queryId;
private Integer fileClass;
private Integer fileClass;//1:询价单 2:产证 3:房屋照片 4:其它附件 5:产调报告或权籍
private String fileName;
private String fileId;
@@ -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<ReportFileAttach> datas = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 3);
List<ReportFileAttach> datas3 = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 3);
Map<String, Integer> data = new HashMap<String, Integer>();
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<ReportFileAttach> 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<File> uploadfiles = new ArrayList<File>();
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());
@@ -45,6 +45,7 @@ public class EvaluationModel extends BaseModel{
private Map<String, Object> 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;
}
}
@@ -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",
@@ -301,21 +331,34 @@ $('.download_btn').on('click', function () {
/* 下载评估报告 */
$('.formal_btn').on('click', function () {
$.ajax({
url:"checkImage",
data:{
evaluationId:eId
},
dataType:"json",
success:function(data){
if(data && data.count>0){
clickFormalReport()
}else{
$.alert('请上传房屋照片!');
if(isLoan!=null) {
$.ajax({
url:"checkImage",
data:{
evaluationId:eId
},
dataType:"json",
success:function(data){
if(isLoan==1){
if(data.count_5==0){
$.alert('请上传产调报告或权籍!');
}else if(data.count_3==0){
$.alert('请上传房屋照片!');
}else{
clickFormalReport()
}
}else{
if(data.count_3==0){
$.alert('请上传房屋照片!');
}else{
clickFormalReport()
}
}
}
}
})
})
}else{
$.alert('请选择是否续贷!');
}
});
function clickFormalReport(){
@@ -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%;}
@@ -132,6 +132,18 @@
</div>
</#if>
<div class="topic inputTopic02" id="inputTopic02b" style="border-bottom:none;margin-bottom:0;">
<div class="topicTitle topicTitle01">
<span>是否续贷:</span>
<input class="input_lender" name="loan" id="loan" type="hidden" required/>
<p class="di"><a href="#" class="create-actions01"><#if fjtEvaluation.loan?? && fjtEvaluation.loan==1>是<#elseif fjtEvaluation.loan?? && fjtEvaluation.loan==0>否<#else>请选择</#if></a></p>
<a class="submit_btn" id="submitLoan" style="border-left: none;"><#if fjtEvaluation.loan??>修改<#else>提交</#if></a>
</div>
<div class="topicTitle topicTitle01" style="color: #F4A460;font-size: 12px;line-height: 20px;margin-top: -5px;">
注:如出具正式报告时,需上传产调报告或权籍
</div>
</div>
<form id="fileForm" enctype="multipart/form-data" method="post" name="fileForm">
<input type="hidden" name="evaluationId" value="${fjtEvaluation.id}">
<input type="hidden" name="queryId" value="<#if bohaiEvaluationAudit??>${bohaiEvaluationAudit.queryId}</#if>">
@@ -139,7 +151,7 @@
<#if reportFileMap??>
<div class="topicTitle topicTitle01 ">
<span>已上传文件:</span>
<#if reportFileMap["1"]??><span>询价单(${reportFileMap["1"]?size})</span></#if>
<#if reportFileMap["5"]??><span>产调报告或权籍(${reportFileMap["5"]?size})</span></#if>
<#if reportFileMap["2"]??><label style="margin-left: 10px;">产证(${reportFileMap["2"]?size})</label></#if>
<#if reportFileMap["3"]??><label style="margin-left: 10px;">房屋照片(${reportFileMap["3"]?size})</label></#if>
<#if reportFileMap["4"]??><label style="margin-left: 10px;">其它附件(${reportFileMap["4"]?size})</label></#if>
@@ -456,6 +468,10 @@
<script type="text/javascript">
var eId = '${fjtEvaluation.id!}';
var role = ${role}
var isLoan = null
<#if fjtEvaluation?? && fjtEvaluation.loan??>
isLoan = ${fjtEvaluation.loan}
</#if>
showOtherSource(eId);
//showTradeReference(eId);
showHouseReference(eId);
@@ -522,11 +538,11 @@
label: true
},
{
text: '询价单',
text: '产调报告或权籍(必填)',
bold: true,
onClick: function () {
$("a.create-actions08").empty().text(this.text).addClass("selected")
$("#fileClass").val("1")
$("#fileClass").val("5")
$("input[name=reportFiles]").attr("accept","image/*")
}
},
@@ -576,6 +592,41 @@ function changeFile(d){
// }
}
}
$(document).on('click', '.create-actions01', function () {
var buttons1 = [
{
text: '请选择是否续贷',
label: true
},
{
text: '是',
bold: true,
onClick: function () {
$("#loan").empty().text(this.text).addClass("selected")
$(".create-actions01").text(this.text)
$("#loan").val("1")
}
},
{
text: '否',
onClick: function () {
$("#loan").empty().text(this.text).addClass("selected")
$(".create-actions01").text(this.text)
$("#loan").val("0")
}
}
];
var buttons2 = [
{
text: '取消',
bg: 'gray'
}
];
var groups = [buttons1, buttons2];
$.actions(groups);
});
</script>
</body>
</html>